Changeset 496

Show
Ignore:
Timestamp:
05/16/08 23:04:18 (8 months ago)
Author:
aarkerio
Message:

Message interfase

Location:
trunk/app
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/config/sql/postgresql/karamelo.sql

    r436 r496  
    5858 
    5959\i ./webquests.sql 
     60\i ./result_webquests.sql 
    6061\i ./vclassrooms_webquests.sql 
    6162\i ./treasures.sql 
    6263\i ./treasures_vclassrooms.sql 
     64\i ./result_treasures.sql 
    6365 
    6466\i ./tests.sql 
     
    6668\i ./questions.sql 
    6769\i ./answers.sql 
    68 \i ./results.sql 
     70\i ./results.sql       --test results 
     71\i ./participations.sql 
    6972 
    7073\i ./shares.sql 
     
    7376 
    7477-- Next I am not sure 
    75 \i ./communities.sql 
    76 \i ./communities_users.sql 
     78\i ./communities.sql   -- this tables will be used on 0.3 
     79\i ./communities_users.sql  
    7780\i ./wikis.sql 
    7881\i ./wiki_revisions.sql 
    79 \i ./settings.sql 
     82\i ./settings.sql         
    8083\i ./upload_revisions.sql 
    8184\i ./uploads.sql 
    82  
    83  
    84  
    85  
    86  
    87  
    88  
    89  
  • trunk/app/config/sql/postgresql/users.sql

    r446 r496  
    2424-- passwd = "karamelo" 
    2525INSERT INTO users("username", "pwd", "name", "email", "group_id", "active", "cv", "quote", "name_blog")  
    26 VALUES ('admin', 'f713c27c6cfc028ce4f756ea692dcf80af42846c', 'John Smith', 'john@site.edu',  
     26VALUES ('admin', '3916784b451c011b7ec822fb9bb66cfc3b5dbf0e', 'John Smith', 'john@site.edu',  
    27271, 
    28281, 
     
    3030'"Nonviolence is a weapon of the strong", Gandhi',  
    3131'The Lost Forest'); 
    32  
  • trunk/app/controllers/colleges_controller.php

    r415 r496  
    2626 public function isAuthorized()  
    2727 {       
    28     if (isset( $this->params[Configure::read('Routing.admin')] ))  
    29     { 
    30         if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 )  // admin and teachers 
    31         { 
    32         return true; 
    33         }  
    34     }  
    35     return false;  // go away !! 
     28   if (isset( $this->params[Configure::read('Routing.admin')] )): 
     29        if ($this->Auth->user('group_id') == 1 || $this->Auth->user('group_id') == 2 ):  // admin and teachers 
     30         return true; 
     31    endif;  
     32   endif;  
     33  return false;  // go away !! 
    3634 } 
    3735 
     
    5048 } 
    5149       
    52   /*** ======ADMIN METHODS === *****/ 
     50 /*** ======ADMIN METHODS === *****/ 
    5351 public function admin_listing()  
    5452 {       
    5553        $this->layout = 'admin'; 
    5654         
    57         $conditions      = array("id"=>1); 
    58         $fields          = array("id", "name", "email", "urlbase", "description", "keywords"); 
    59         $order           = "College.id DESC"; 
     55        $conditions      = array('id'=>1); 
     56        $fields          = array('id', 'name', 'email', 'urlbase', 'description', 'keywords'); 
     57        $order           = 'College.id DESC'; 
    6058        $data            = $this->College->find($conditions, $fields); 
    61         $this->pageTitle = $data['College']['title']; 
     59        $this->pageTitle = $data['College']['name']; 
    6260 
    6361        $this->set('data', $data);  
     
    6866     $this->layout    = 'admin'; 
    6967      
    70      if ( empty( $this->data["College"] ) ) 
    71      { 
     68     if ( empty( $this->data['College'] ) ): 
    7269         $this->College->id  = $id; 
    7370          
    7471         $this->data      = $this->College->read(); 
    7572          
    76      } 
    77      else 
    78      {    
     73      else: 
     74    
    7975         $this->Sanitize = new Sanitize; 
    8076          
    81          $this->Sanitize->html($this->data["College"]["name"]); 
     77         $this->Sanitize->html($this->data['College']['name']); 
    8278          
    83          $this->Sanitize->html($this->data["College"]["description"]); 
     79         $this->Sanitize->html($this->data['College']['description']); 
    8480          
    85          if ($this->College->save($this->data["College"])) 
    86          {    
    87              if ( $this->data["College"]["end"] == 1 ) 
    88              { 
     81         if ($this->College->save($this->data['College'])):    
     82       if ( $this->data['College']["end"] == 1 ): 
    8983                                 $this->redirect('/admin/colleges/listing'); 
    90              }  
    91              else  
    92              { 
    93                                  $this->msgFlash('Data saved', '/admin/colleges/edit/'.$this->data["College"]["id"]); 
    94              } 
    95         } 
    96      } 
     84              
     85       else:  
     86              
     87                                 $this->msgFlash('Data saved', '/admin/colleges/edit/'.$this->data['College']['id']); 
     88           endif; 
     89    endif; 
     90    endif; 
    9791  } 
    9892} 
  • trunk/app/models/user.php

    r480 r496  
    112112    
    113113    if ( !empty($this->data['User']['pwd']) ): 
    114            die( debug($this->data['User']['pwd'])); 
     114          
    115115          if ( strlen($this->data['User']['pwd']) < 6):   // only if pwd is big enough 
    116116                 unset($this->data['User']['pwd']);       
  • trunk/app/views/news/display.ctp

    r409 r496  
    3737    <span style="font-size:7pt;">Permalink:</span> <br /> 
    3838    <?php echo $html->link( 
    39                'http://'.$_SERVER['SERVER_NAME'].'/news/view/'.$val['News']['id'],  
    40                            'http://'.$_SERVER['SERVER_NAME'].'/news/view/'.$val['News']['id'] 
     39               'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$val['News']['id'], 
     40                           'http://'.$_SERVER['HTTP_HOST'].'/news/view/'.$val['News']['id'] 
    4141               );  
    4242?>