Current time: 05-20-2024, 05:51 PM Hello There, Guest! (LoginRegister)


Post Reply 
Domain Update Problem
Author Message
CHBIE Offline
Junior Member
*

Posts: 225
Joined: May 2008
Reputation: 11
Post: #1
Domain Update Problem
Hi Leute, wo wird in domain_edit.php die Übergabe an die DB geregelt!

domain_cgi ist normalerweise der letzte Eintrag in der Domain DB, ich habe aber einen Eintrag mehr.

Wenn ich nun die Domain editiere wird der Eintrag vom Formular, für meinen Zusatzeintrag, in die spalte von domain_cgi geschrieben!

Wo werden diese Daten für die DB aufbereitet?

Das gleiche Problem hatte ich beim Benutzer anlegen auch, dort lag es an einem fehlenden
Code:
,?

Kann mir bitte jemand helfen.

Gruss CHBIE
01-14-2009 09:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
CHBIE Offline
Junior Member
*

Posts: 225
Joined: May 2008
Reputation: 11
Post: #2
RE: Domain Update Problem
Im nachfolgendem Code ist der Wurm drin, nur finde ich ihn nicht ;-)

Das wäre der Code in der ./include/ispc_functions.php:
Code:
function update_user_props ( $user_id, $props ) {

    $sql = Database::getInstance();

    list (
           $sub_current, $sub_max,
           $als_current, $als_max,
           $mail_current, $mail_max,
           $ftp_current, $ftp_max,
           $sql_db_current, $sql_db_max,
           $sql_user_current, $sql_user_max,
           $traff_max, $disk_max,
           $domain_php, $domain_cgi, $domain_software_allowed) = explode (";", $props);
           //$domain_ip_id, $domain_php, $domain_cgi) = explode (";", $props);

         //have to check if PHP and/or CGI and/or IP change
         $domain_last_modified =  time();

    $query = <<<SQL_QUERY
        select
            domain_name
        from
            domain
        where
            domain_id  = ?
          and
            domain_php = ?
          and
            domain_cgi = ?
       and
        domain_software_allowed = ?
SQL_QUERY;

    $rs = exec_query($sql, $query, array($user_id, $domain_php, $domain_cgi, $domain_software_allowed));

    if ($rs -> RecordCount() == 0) {
        // mama mia, we have to rebuild the system entry for this domain
        // and also all domain alias and subdomains

        $update_status = Config::get('ITEM_CHANGE_STATUS');

        // check if we have to wait some system update
        check_for_lock_file();
        // ... and go update

        // update the domain
        $query = <<<SQL_QUERY
        update
            domain
        set
            domain_last_modified = ?,
            domain_mailacc_limit = ?,
            domain_ftpacc_limit = ?,
            domain_traffic_limit = ?,
            domain_sqld_limit = ?,
            domain_sqlu_limit = ?,
            domain_status = ?,
            domain_alias_limit = ?,
            domain_subd_limit = ?,
            domain_disk_limit = ?,
            domain_php = ?,
            domain_cgi = ?,
            domain_software_allowed = ?
        where
            domain_id  = ?
SQL_QUERY;

        $rs = exec_query($sql, $query, array($domain_last_modified,
                                         $mail_max,
                                         $ftp_max,
                                         $traff_max,
                                         $sql_db_max,
                                         $sql_user_max,
                                         $update_status,
                                         $als_max,
                                         $sub_max,
                                         $disk_max,
                                         $domain_php,
                                         $domain_cgi,
                                         $domain_software_allowed,
                                         $user_id));

$domain_software_allowed wird immer in $domain_cgi reingeschrieben!
01-15-2009 06:18 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)