Changeset 4726 in subversion
- Timestamp:
- May 3, 2011 4:42:27 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
plugins/password/README (modified) (1 diff)
-
plugins/password/config.inc.php.dist (modified) (1 diff)
-
plugins/password/drivers/directadmin.php (modified) (8 diffs)
-
roundcubemail/program/localization/pt_BR/messages.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/password/README
r4595 r4726 178 178 -------------------------------------------- 179 179 180 You can specify which host to connect to via 'password_directadmin_host' 181 and what port via 'password_direactadmin_port'. See config.inc.php.dist file 182 for more info. 180 You can specify which host to connect to via 'password_directadmin_host' (don't 181 forget to use tcp:// or ssl://) and what port via 'password_direactadmin_port'. 182 The password enforcement with plenty customization can be done directly by 183 DirectAdmin, please see http://www.directadmin.com/features.php?id=910 184 See config.inc.php.dist file for more info. 183 185 184 186 -
trunk/plugins/password/config.inc.php.dist
r4546 r4726 213 213 // -------------------------- 214 214 // The host which changes the password 215 // Use 'ssl://serverip' instead of 'tcp://serverip' when running DirectAdmin over SSL. 215 // Use 'ssl://host' instead of 'tcp://host' when running DirectAdmin over SSL. 216 // The host can contain the following macros that will be expanded as follows: 217 // %h is replaced with the imap host (from the session info) 218 // %d is replaced with the domain part of the username (if the username is an email) 216 219 $rcmail_config['password_directadmin_host'] = 'tcp://localhost'; 217 220 -
trunk/plugins/password/drivers/directadmin.php
r4507 r4726 6 6 * Driver to change passwords via DirectAdmin Control Panel 7 7 * 8 * @version 1. 08 * @version 1.2 9 9 * @author Victor Benincasa <vbenincasa@gmail.com> 10 10 * … … 22 22 $da_host = $rcmail->config->get('password_directadmin_host'); 23 23 $da_port = $rcmail->config->get('password_directadmin_port'); 24 25 if(strpos($da_user, '@') === false) return array('code' => PASSWORD_ERROR, 'message' => 'Change the SYSTEM user password through control panel!'); 26 27 $da_host = str_replace('%h', $_SESSION['imap_host'], $da_host); 28 $da_host = str_replace('%d', $rcmail->user->get_username('domain'), $da_host); 24 29 25 30 $Socket->connect($da_host,$da_port); … … 35 40 $response = $Socket->fetch_parsed_body(); 36 41 37 //console("DA error response: $response[text] [$da_user]"); 38 39 if($Socket->result_status_code <> 200) 40 return PASSWORD_CONNECT_ERROR; 41 elseif($response['error'] == 1){ //Error description: $response[text] 42 return PASSWORD_ERROR; 43 }else 42 //DEBUG 43 //console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]"); 44 45 if($Socket->result_status_code != 200) 46 return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]); 47 elseif($response['error'] == 1) 48 return array('code' => PASSWORD_ERROR, 'message' => strip_tags($response['text'])); 49 else 44 50 return PASSWORD_SUCCESS; 45 51 … … 58 64 * @author Phi1 'l0rdphi1' Stier <l0rdphi1@liquenox.net> 59 65 * @package HTTPSocket 60 * @version 2. 666 * @version 2.7 (Updated by Victor Benincasa <vbenincasa@gmail.com>) 61 67 */ 62 68 class HTTPSocket { 63 69 64 var $version = '2. 6';70 var $version = '2.7'; 65 71 66 72 /* all vars are private except $error, $query_cache, and $doFollowLocationHeader */ … … 317 323 318 324 } 319 320 list($this->result_header, $this->result_body) = explode("\r\n\r\n", $this->result,2);325 326 list($this->result_header,$this->result_body) = preg_split("/\r\n\r\n/",$this->result,2); 321 327 322 328 if ($this->bind_host) … … 379 385 if ($asArray) 380 386 { 381 return explode("\n",$this->fetch_body());387 return preg_split("/\n/",$this->fetch_body()); 382 388 } 383 389 … … 439 445 function fetch_header( $header = '' ) 440 446 { 441 $array_headers = explode("\r\n",$this->result_header);442 447 $array_headers = preg_split("/\r\n/",$this->result_header); 448 443 449 $array_return = array( 0 => $array_headers[0] ); 444 450 unset($array_headers[0]); … … 446 452 foreach ( $array_headers as $pair ) 447 453 { 448 list($key,$value) = explode(": ", $pair,2);454 list($key,$value) = preg_split("/: /",$pair,2); 449 455 $array_return[strtolower($key)] = $value; 450 456 } -
trunk/roundcubemail/program/localization/pt_BR/messages.inc
r4687 r4726 39 39 $messages['loading'] = 'Carregando...'; 40 40 $messages['uploading'] = 'Enviando anexo...'; 41 $messages['uploadingmany'] = 'Enviando anexos...'; 41 42 $messages['loadingdata'] = 'Carregando informações...'; 42 43 $messages['checkingmail'] = 'Verificando se há novas mensagens...';
Note: See TracChangeset
for help on using the changeset viewer.
