tbrehm
2012-01-18 91e1bacc034def374dfbf9a6241835f3546f07a0
- Fixed a timezone warning in updater.
- Fixed a database password encryption error in remote API.
- Fixed database add example script.
- Added examply for new query syntax for forwards.
5 files modified
30 ■■■■■ changed files
install/update.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/remoting_lib.inc.php 13 ●●●●● patch | view | raw | blame | history
remoting_client/examples/mail_forward_get.php 1 ●●●● patch | view | raw | blame | history
remoting_client/examples/sites_database_add.php 10 ●●●● patch | view | raw | blame | history
remoting_client/examples/soap_config.php 4 ●●●● patch | view | raw | blame | history
install/update.php
@@ -96,7 +96,7 @@
$conf["mysql"]["ispconfig_password"] = $conf_old["db_password"];
$conf['language'] = $conf_old['language'];
if($conf['language'] == '{language}') $conf['language'] = 'en';
$conf['timezone'] = $conf_old['timezone'];
$conf['timezone'] = (isset($conf_old['timezone']))?$conf_old['timezone']:'UTC';
if($conf['timezone'] == '{timezone}' or trim($conf['timezone']) == '') $conf['timezone'] = 'UTC';
if(isset($conf_old["dbmaster_host"])) $conf["mysql"]["master_host"] = $conf_old["dbmaster_host"];
interface/lib/classes/remoting_lib.inc.php
@@ -536,11 +536,16 @@
                                                if($field['formtype'] == 'PASSWORD') {
                                                        $sql_insert_key .= "`$key`, ";
                                                        if($field['encryption'] == 'CRYPT') {
                                                                $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
                                                                $record[$key] = $app->auth->crypt_password(stripslashes($record[$key]));
                                                                $sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
                                                        } elseif ($field['encryption'] == 'MYSQL') {
                                                                $sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), ";
                                                        } elseif ($field['encryption'] == 'CLEARTEXT') {
                                                                $sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
                                                        } else {
                                                                $record[$key] = md5($record[$key]);
                                                                $record[$key] = md5(stripslashes($record[$key]));
                                                                $sql_insert_val .= "'".$app->db->quote($record[$key])."', ";
                                                        }
                                                        $sql_insert_val .= "'".$record[$key]."', ";
                                                } elseif ($field['formtype'] == 'CHECKBOX') {
                                                        $sql_insert_key .= "`$key`, ";
                                                        if($record[$key] == '') {
@@ -645,7 +650,7 @@
                foreach($primary_id as $key => $val) {
                    $key = $app->db->quote($key);
                    $val = $app->db->quote($val);
                    if(strpos($val,'%')) {
                    if(stristr($val,'%')) {
                        $sql_where .= "$key like '$val' AND ";
                    } else {
                        $sql_where .= "$key = '$val' AND ";
remoting_client/examples/mail_forward_get.php
@@ -18,6 +18,7 @@
    $forwarding_id = 1;
    
    $mail_forwarding_record = $client->mail_forward_get($session_id, $forwarding_id);
    // $mail_forwarding_record = $client->mail_forward_get($session_id, array('source' => '%@test.int'));
    print_r($mail_forwarding_record);
    
remoting_client/examples/sites_database_add.php
@@ -18,12 +18,12 @@
    $client_id = 1;
    $params = array(
            'server_id' => 1,
            'type' => 'y',
            'database_name' => 'db_o',
            'database_user' => 'test',
            'database_password' => 'test',
            'type' => 'mysql',
            'database_name' => 'db_name1',
            'database_user' => 'db_name1',
            'database_password' => 'db_name1',
            'database_charset' => 'UTF8',
            'remote_access' => 'y',
            'remote_access' => 'n',
            'remote_ips' => '',
            'active' => 'y'
            );
remoting_client/examples/soap_config.php
@@ -8,7 +8,7 @@
$soap_uri = 'http://localhost:8080/ispconfig3/interface/web/remote/';
*/
$soap_location = 'http://192.168.0.110:8080/remote/index.php';
$soap_uri = 'http://192.168.0.110:8080/remote/';
$soap_location = 'http://192.168.0.105:8080/remote/index.php';
$soap_uri = 'http://192.168.0.105:8080/remote/';
?>