Changeset 788

Show
Ignore:
Timestamp:
10/01/08 20:21:44 (7 weeks ago)
Author:
aarkerio
Message:

Update unit testing

Location:
trunk/app
Files:
5 modified

Legend:

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

    r778 r788  
    55 "lang" varchar(80) NOT NULL UNIQUE 
    66); 
    7 INSERT INTO langs (code, lang) VALUES ('es_MX', 'Spanish Argentina'); 
    8 INSERT INTO langs (code, lang) VALUES ('es_MX', 'Spanish Spain'); 
     7INSERT INTO langs (code, lang) VALUES ('es_AR', 'Spanish Argentina'); 
     8INSERT INTO langs (code, lang) VALUES ('es_ES', 'Spanish Spain'); 
    99INSERT INTO langs (code, lang) VALUES ('es_MX', 'Spanish Mexico'); 
    1010INSERT INTO langs (code, lang) VALUES ('en_US', 'English USA'); 
  • trunk/app/controllers/confirms_controller.php

    r785 r788  
    3535      
    3636     if ($this->User->save($this->data) && $this->Confirm->delete($data['Confirm']['id'])): 
    37                  $this->flash(__('Your account has been activated', true), '/users/login', 1); 
     37                 $this->flash(__('Your account has been activated', true), '/', 2); 
    3838     endif; 
    3939   else: 
    40              $this->flash('There is not such account', '/users/login', 2); 
     40             $this->flash('There is not such account', '/', 2); 
    4141   endif; 
    4242 } 
  • trunk/app/controllers/users_controller.php

    r785 r788  
    268268  $this->Sanitize = new Sanitize; 
    269269   
    270   $this->Sanitize->html($this->data["User"]["name"]); 
    271    
    272   $this->Sanitize->html($this->data["User"]["username"]); 
    273    
    274   $this->Sanitize->html($this->data["User"]["description"]); 
    275    
    276   $this->Sanitize->html($this->data["User"]["email"]); 
     270  $this->Sanitize->html($this->data['User']['name']); 
     271   
     272  $this->Sanitize->html($this->data['User']['username']); 
     273   
     274  $this->Sanitize->html($this->data['User']['cv']); 
     275   
     276  $this->Sanitize->html($this->data['User']['email']); 
    277277   
    278278  // adds new classroom to database 
    279279  if (!empty($this->data['User'])) 
    280280  { 
    281    $message     = array("oops"=>"Oooppps!"); 
     281   $message     = array('oops'=>'Oooppps!'); 
    282282    
    283283   /** Check Passwd **/ 
     
    292292   /** username check **/ 
    293293   if (strlen($this->data['User']['username']) < 5): 
    294        $message['pwd_username'] = "The username has less than 5 characters "; 
     294       $message['pwd_username'] = 'The username has less than 5 characters '; 
    295295   endif; 
    296296     
    297297   /** name check **/ 
    298298   if (strlen($this->data['User']['name']) < 5): 
    299        $message['pwd_username'] = "The name is too short"; 
     299       $message['pwd_username'] = 'The name is too short'; 
    300300   endif; 
    301301     
    302302    if (strpos($this->data['User']['pwd'], ' ')):  // pwd no spaces 
    303        $message['username_spaces'] = "Your password should not contain spaces"; 
     303       $message['username_spaces'] = 'Your password should not contain spaces'; 
    304304    endif; 
    305305     
    306306    /** description check **/ 
    307     if (strlen($this->data['User']['description']) < 5): 
    308        $message['description_too_short'] = "C'mon pal, talk us about you!"; 
     307    if (strlen($this->data['User']['cv']) < 5): 
     308       $message['description_too_short'] = 'C\'mon pal, talk us about you!'; 
    309309    endif; 
    310310     
    311311    /** email check **/ 
    312312    if ($this->Adds->validEmail($this->data['User']['email']) === false): 
    313        $message['pwd_username'] = "Typed email is invalid"; 
     313       $message['pwd_username'] = 'Email is invalid'; 
    314314    endif; 
    315315     
     
    332332     
    333333    if ( $this->data['User']['code'] != $code ): 
    334         $message['wrong_code'] = "The code is incorrect, please put in contact with your school webmaster."; 
     334        $message['wrong_code'] = 'The code is incorrect, please put in contact with your school webmaster.'; 
    335335    endif; 
    336336     
     
    345345        $this->data['Confirm']['user_id']  = $this->User->getLastInsertID();   // the user id 
    346346        $this->data['Confirm']['secret']   = $this->Adds->genPassword(14);     // secret confirm ID 
    347      
    348     $this->User->Confirm->create(); 
    349347         
    350348         // put the user in confirm model, this is, waiting for user confirmation trough email 
  • trunk/app/views/entries/admin_comments.ctp

    r776 r788  
    22echo $html->div('title_section', __('Comments in your eduBlog', true)); 
    33//debug($data); 
     4if ( count($data) < 1 ): 
     5  echo '<h1>'.__('No comments yet', true) .'</h1>';; 
     6endif; 
     7 
    48foreach($data as $v): 
    59 $tmp  = $html->para(null, 'Entry: '.$html->link($v['Entry']['title'], 'http://'.$_SERVER['HTTP_HOST'].'/entries/view/'.$session->read('Auth.User.username').'/'.$v['Entry']['id']), array('style'=>'font-size:14pt;font-weigth:bold;')); 
  • trunk/app/views/users/register.ctp

    r627 r788  
    4343     
    4444    echo $html->div(null, '<br />');   
    45     echo $form->label('User.description', __('About you and your interests', true) ) . '<br />'; 
    46     echo $form->textarea('User.description', array("rows"=>4, "cols"=>50)).'<br />';  
     45    echo $form->label('User.cv', __('About you and your interests', true) ) . '<br />'; 
     46    echo $form->textarea('User.cv', array('rows'=>4, 'cols'=>50)).'<br />';  
    4747         
    4848    $tmp = $html->link(__('I read and I do agree with terms', true),'#header',