- Timestamp:
- 01/14/09 16:26:13 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/inc/class.uiconfig.inc.php
r597 r608 160 160 $dir = $GLOBALS['phpgw']->common->get_app_dir($appname) . "/inc"; 161 161 $options = ' '; 162 if (is_dir($dir)) { 163 if ($dh = opendir($dir)) { 164 while (($file = readdir($dh)) !== false) { 162 if (is_dir($dir)) 163 { 164 if ($dh = opendir($dir)) 165 { 166 while (($file = readdir($dh)) !== false) 167 { 165 168 $temp = explode(".",$file); 166 if((substr($temp[1],0,5)=='login') && ($temp[0]=='class')) { 169 if( (substr($temp[1],0,5) =='login') && ($temp[0] == 'class') ) 170 { 167 171 $options .= "<option value='".$temp[1]."'"; 168 172 if($current_config['expressoAdmin_loginGenScript'] == $temp[1]) … … 181 185 if($appname=="admin") { 182 186 /* 183 * FCK editor para o termo de aceite187 * FCK editor to agree term 184 188 */ 185 189 include_once("news_admin/inc/fckeditor.php"); 186 $texto_termo_aceite = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : '';187 190 $oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]'); 188 191 $oFCKeditor->BasePath = 'news_admin/templates/celepar/fckeditor/'; 189 192 $oFCKeditor->ToolbarSet = 'Basic'; 190 $oFCKeditor->Value = $texto_termo_aceite;193 $oFCKeditor->Value = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : ''; 191 194 $t->set_var('agree_term_input',$oFCKeditor->Create()); 192 195 } -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r594 r608 386 386 $classe = new ReflectionClass($this->current_config['expressoAdmin_loginGenScript']); 387 387 388 if(!$classe->implementsInterface('login')) { 389 return array("status" => False, "msg" => "A classe geradora de logins não implementa a interface login (Se você for um usuário, contacte o suporte)"); 390 } 391 392 $gerador = $classe->newInstance(); 393 394 $login = $gerador->generate_login($params["first_name"],$params["second_name"],$this->ldap); 388 if(!$classe->implementsInterface('login')) 389 { 390 return array( 391 "status" => False, 392 "msg" => lang("Login interface not implemented (contact suport)") 393 ); 394 } 395 396 $login = $classe->newInstance()->generate_login($params["first_name"],$params["second_name"],$this->ldap); 395 397 396 398 /* 397 Se o algoritmo gerar um login que já existe, colocamos um número no final do398 login gerado, resultando em um login não existente399 */400 while(true) {401 $filter = "(uid=$login)";402 $search = ldap_search($this->ldap, $context, $filter, $justthese);403 $ entries = ldap_count_entries($this->ldap,$search);404 if ($entries==0)399 If login exists, it concatenates a number to the end. 400 resulting in a new login 401 */ 402 $i = 1; 403 while($i < 1000) // Limit of 1000 equal names 404 { 405 $search = ldap_search($this->ldap, $context, "(uid=".$login.")", $justthese); 406 if (ldap_count_entries($this->ldap,$search) == 0) 405 407 break; 406 else { 407 $login.=$i; 408 else 409 { 410 if ($i > 1) // If login have a number, remove the number and put the new one 411 $login=substr($login,0,strlen($login)-strlen($i)).$i; 412 else 413 $login.=$i; 408 414 $i++; 409 415 }
Note: See TracChangeset
for help on using the changeset viewer.