Changeset 548

Show
Ignore:
Timestamp:
04/14/05 14:39:52 (8 years ago)
Author:
benoitg
Message:

2005-04-14 Benoit Gr�goire <bock@…>

  • Content.php: Fix db reference;
Location:
trunk/wifidog-auth
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/ChangeLog

    r546 r548  
     12005-04-14 Benoit Grégoire  <bock@step.polymtl.ca> 
     2        * Content.php:  Fix db reference; 
     3 
    142005-04-14 Benoit Grégoire  <bock@step.polymtl.ca> 
    25        * Fix Content object enumeration preventing usage of admin interface 
  • trunk/wifidog-auth/wifidog/classes/Content.php

    r546 r548  
    309309        public function getAdminInterface($subclass_admin_interface = null) 
    310310        { 
     311                                global $db; 
    311312                $html = ''; 
    312313                $html .= "<div class='admin_container'>\n"; 
     
    409410        public function processAdminInterface() 
    410411        { 
     412                global $db; 
    411413                if ($this->getContentType() == 'Content') /* The object hasn't yet been typed */ 
    412414                { 
     
    424426                                        { 
    425427                                                $title_id = $title->GetId(); 
    426                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET title = '$title_id' WHERE content_id = '$this->id'", FALSE); 
     428                                                $db->ExecSqlUpdate("UPDATE content SET title = '$title_id' WHERE content_id = '$this->id'", FALSE); 
    427429                                        } 
    428430                                } 
     
    433435                                        if (!empty ($_REQUEST[$name]) && $_REQUEST[$name] == true) 
    434436                                        { 
    435                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET title = NULL WHERE content_id = '$this->id'", FALSE); 
     437                                                $db->ExecSqlUpdate("UPDATE content SET title = NULL WHERE content_id = '$this->id'", FALSE); 
    436438                                                $title->delete(); 
    437439                                        } 
     
    449451                                        { 
    450452                                                $description_id = $description->GetId(); 
    451                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET description = '$description_id' WHERE content_id = '$this->id'", FALSE); 
     453                                                $db->ExecSqlUpdate("UPDATE content SET description = '$description_id' WHERE content_id = '$this->id'", FALSE); 
    452454                                        } 
    453455                                } 
     
    458460                                        if (!empty ($_REQUEST[$name]) && $_REQUEST[$name] == true) 
    459461                                        { 
    460                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET description = NULL WHERE content_id = '$this->id'", FALSE); 
     462                                                $db->ExecSqlUpdate("UPDATE content SET description = NULL WHERE content_id = '$this->id'", FALSE); 
    461463                                                $description->delete(); 
    462464                                        } 
     
    474476                                        { 
    475477                                                $project_info_id = $project_info->GetId(); 
    476                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET project_info = '$project_info_id' WHERE content_id = '$this->id'", FALSE); 
     478                                                $this->db->ExecSqlUpdate("UPDATE content SET project_info = '$project_info_id' WHERE content_id = '$this->id'", FALSE); 
    477479                                        } 
    478480                                } 
     
    483485                                        if (!empty ($_REQUEST[$name]) && $_REQUEST[$name] == true) 
    484486                                        { 
    485                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET project_info = NULL WHERE content_id = '$this->id'", FALSE); 
     487                                                $this->db->ExecSqlUpdate("UPDATE content SET project_info = NULL WHERE content_id = '$this->id'", FALSE); 
    486488                                                $project_info->delete(); 
    487489                                        } 
     
    499501                                        { 
    500502                                                $sponsor_info_id = $sponsor_info->GetId(); 
    501                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET sponsor_info = '$sponsor_info_id' WHERE content_id = '$this->id'", FALSE); 
     503                                                $this->db->ExecSqlUpdate("UPDATE content SET sponsor_info = '$sponsor_info_id' WHERE content_id = '$this->id'", FALSE); 
    502504                                        } 
    503505                                } 
     
    508510                                        if (!empty ($_REQUEST[$name]) && $_REQUEST[$name] == true) 
    509511                                        { 
    510                                                 $this->mBd->ExecSqlUpdate("UPDATE content SET sponsor_info = NULL WHERE content_id = '$this->id'", FALSE); 
     512                                                $this->db->ExecSqlUpdate("UPDATE content SET sponsor_info = NULL WHERE content_id = '$this->id'", FALSE); 
    511513                                                $sponsor_info->delete(); 
    512514                                        }