Changeset 5954 for sandbox/webservice/api/json-rpc/Catalog.php
- Timestamp:
- 04/16/12 17:34:31 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/json-rpc/Catalog.php
r5889 r5954 4 4 5 5 class Catalog extends Expresso { 6 var $ userPrefs;6 var $searchCharactersNumber; 7 7 var $userId; 8 8 9 9 public function __construct(){ 10 $this->userPrefs = $this->getUserPreferences(); 10 $prefs = $GLOBALS['phpgw']->preferences->read(); 11 $this-> searchCharactersNumber = $prefs['expressoMail']['search_characters_number']; 11 12 } 12 13 13 14 private function getUserId(){ 14 15 $userProfile = $this->getUserProfile(); 15 return $userProfile[' account_id'];16 return $userProfile['contactID']; 16 17 } 17 18 … … 29 30 } 30 31 elseif($params['contactType'] == 2){ 31 if($this-> userPrefs['search_characters_number']<= strlen($search))32 if($this-> searchCharactersNumber <= strlen($search)) 32 33 return $this->getGlobalContacts($search, $params['contactID']); 33 34 else{ 34 $this-> error = str_replace("%1",$this->userPrefs['search_characters_number'],"Your search argument must be longer than %1 characters."); 35 $this-> error = Errors::get(Errors::CATALOG_MIN_ARGUMENT_SEARCH); 36 $this-> error = str_replace("%1",$this-> searchCharactersNumber,$this->error); 35 37 return $this->getResponse(); 36 38 }
Note: See TracChangeset
for help on using the changeset viewer.