Index: trunk/admin/install.php =================================================================== diff -u -N -r259 -r271 --- trunk/admin/install.php (.../install.php) (revision 259) +++ trunk/admin/install.php (.../install.php) (revision 271) @@ -1382,8 +1382,8 @@ $ado = inst_GetADODBConnection(); $PhraseTable = GetTablePrefix()."ImportPhrases"; $EventTable = GetTablePrefix()."ImportEvents"; - $ado->Execute("DROP TABLE $PhraseTable"); - $ado->Execute("DROP TABLE $EventTable"); + $ado->Execute("DROP TABLE IF EXISTS $PhraseTable"); + $ado->Execute("DROP TABLE IF EXISTS $EventTable"); $Id = $_POST["lang"]; Index: trunk/kernel/include/usersession.php =================================================================== diff -u -N -r269 -r271 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 269) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 271) @@ -147,7 +147,7 @@ //Delete associated adata first $sql = sprintf("DELETE FROM ".GetTablePrefix()."SessionData WHERE SessionKey = '%s'", $this->Get("SessionKey")); $this->adodbConnection->Execute($sql); - $sql = sprintf("DROP TABLE %s%s_search",GetTablePrefix(), $this->Get("SessionKey")); + $sql = sprintf("DROP TABLE IF EXISTS %s%s_search",GetTablePrefix(), $this->Get("SessionKey")); $this->adodbConnection->Execute($sql); $sql = sprintf("DELETE FROM ".GetTablePrefix()."UserSession WHERE SessionKey = '%s'", $this->Get("SessionKey")); $this->adodbConnection->Execute($sql); @@ -630,7 +630,7 @@ if(!$rs || $rs->EOF) { //echo "Dropping Table $tables[$i]
\n"; - @$this->adodbConnection->Execute("DROP TABLE ".$tables[$i]); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$tables[$i]); } } } Index: trunk/kernel/include/portalgroup.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 13) +++ trunk/kernel/include/portalgroup.php (.../portalgroup.php) (revision 271) @@ -473,7 +473,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); $sql = "DELETE FROM ".GetTablePrefix()."UserGroup WHERE GroupId<1"; $this->adodbConnection->Execute($sql); Index: trunk/kernel/include/itemreview.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 13) +++ trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 271) @@ -535,7 +535,7 @@ } $sql = "DELETE FROM ".$this->SourceTable." WHERE ItemId=$ResourceId AND ReviewId NOT IN (".implode(",",$idlist).")"; $this->adodbConnection->Execute($sql); - @$this->adodbConnection->Execute("DROP TABLE ".$edit_table); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$edit_table); } Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -N -r230 -r271 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 230) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 271) @@ -455,7 +455,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); $query = "SELECT * FROM ".$this->SourceTable." WHERE $idfield = -1"; $insert = "CREATE TABLE ".$edit_table." ".$query; if($objSession->HasSystemPermission("DEBUG.LIST")) @@ -518,15 +518,15 @@ } $rs->MoveNext(); } - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function PurgeEditTable() { global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function &GetEmailEventObject($EventName,$Type=0,$LangId=NULL) Index: trunk/admin/config/config_lang.php =================================================================== diff -u -N -r13 -r271 --- trunk/admin/config/config_lang.php (.../config_lang.php) (revision 13) +++ trunk/admin/config/config_lang.php (.../config_lang.php) (revision 271) @@ -202,8 +202,8 @@ $PhraseTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportPhrases"; $EventTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportEvents"; - $ado->Execute("DROP TABLE $PhraseTable"); - $ado->Execute("DROP TABLE $EventTable"); + $ado->Execute("DROP TABLE IF EXISTS $PhraseTable"); + $ado->Execute("DROP TABLE IF EXISTS $EventTable"); } $objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0); Index: trunk/kernel/action.php =================================================================== diff -u -N -r269 -r271 --- trunk/kernel/action.php (.../action.php) (revision 269) +++ trunk/kernel/action.php (.../action.php) (revision 271) @@ -2189,14 +2189,14 @@ $p->Create(); } } - $ado->Execute("DROP TABLE ".$objPhraseList->SourceTable); + $ado->Execute("DROP TABLE IF EXISTS ".$objPhraseList->SourceTable); } if( GetVar('MissingLangEditStatus') == 2 ) { $table = $objSession->GetSessionKey()."_".$ThemeId."_labels"; $ado = GetADODBConnection(); - $ado->Execute("DROP TABLE ".$table); + $ado->Execute("DROP TABLE IF EXISTS ".$table); } /* Ban Rule Edit */ Index: trunk/kernel/include/searchitems.php =================================================================== diff -u -N -r191 -r271 --- trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 191) +++ trunk/kernel/include/searchitems.php (.../searchitems.php) (revision 271) @@ -437,7 +437,7 @@ //echo $SelectSQL."

\n"; if($InitTable) { - $this->adodbConnection->Execute("DROP TABLE ".$this->ResultTable); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$this->ResultTable); //$indexSQL = "(INDEX(Relevance), INDEX(ItemId), INDEX(ItemType), INDEX sorting (EdPick,Relevance)) "; $full_sql = "CREATE TABLE ".$this->ResultTable." ".$indexSQL.$SelectSQL; //echo $full_sql."
\n"; Index: trunk/admin/email/do_send.php =================================================================== diff -u -N -r35 -r271 --- trunk/admin/email/do_send.php (.../do_send.php) (revision 35) +++ trunk/admin/email/do_send.php (.../do_send.php) (revision 271) @@ -281,7 +281,7 @@ echo $o."\n"; break; case "email_send_complete": - $sql = "DROP TABLE $table"; + $sql = "DROP TABLE IF EXISTS $table"; $ado->Execute($sql); $o = ""; $o .= int_subsection_title_ret($PageTitle); Index: trunk/admin/category/category_maint.php =================================================================== diff -u -N -r214 -r271 --- trunk/admin/category/category_maint.php (.../category_maint.php) (revision 214) +++ trunk/admin/category/category_maint.php (.../category_maint.php) (revision 271) @@ -80,7 +80,7 @@ $objEditItems->SourceTable = $objSession->GetEditTable("Category"); $table = $objEditItems->SourceTable; //echo "Dropping Table..
\n"; - @$ado->Execute("DROP TABLE $table"); + @$ado->Execute("DROP TABLE IF EXISTS $table"); if($objCatList->CurrentCategoryID()>0) { Index: trunk/kernel/include/advsearch.php =================================================================== diff -u -N -r80 -r271 --- trunk/kernel/include/advsearch.php (.../advsearch.php) (revision 80) +++ trunk/kernel/include/advsearch.php (.../advsearch.php) (revision 271) @@ -159,7 +159,7 @@ $SelectSQL .= " WHERE ".$WhereClause; } $SelectSQL .= " GROUP BY $idField "; - $this->adodbConnection->Execute("DROP TABLE ".$this->ResultTable); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$this->ResultTable); $full_sql = "CREATE TABLE ".$this->ResultTable." ".$indexSQL.$SelectSQL; $this->adodbConnection->Execute($full_sql); Index: trunk/kernel/include/image.php =================================================================== diff -u -N -r18 -r271 --- trunk/kernel/include/image.php (.../image.php) (revision 18) +++ trunk/kernel/include/image.php (.../image.php) (revision 271) @@ -329,6 +329,7 @@ function DeleteFromPending() { + global $pathtoroot; $ThumbPath = $pathtoroot.$this->Get("ThumbPath"); $FullPath = $pathtoroot.$this->Get("LocalPath"); @@ -926,7 +927,8 @@ { $i->CopyFromPending(); - $t = $i->Get("LocalPath"); + $t = $i->Get("LocalPath"); + $p = pathinfo($t); $p_arr = explode("/", $p['dirname']); if (eregi("pending", $p_arr[count($p_arr)-1])) @@ -989,7 +991,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); if(is_array($idlist)) { $list = implode(",",$idlist); @@ -1096,7 +1098,7 @@ $edit_table = $objSession->GetEditTable($this->SourceTable); $this->DeletePendingFiles($edit_table); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function GetNextImageIndex($ResourceId) Index: trunk/admin/backup/backup2.php =================================================================== diff -u -N -r13 -r271 --- trunk/admin/backup/backup2.php (.../backup2.php) (revision 13) +++ trunk/admin/backup/backup2.php (.../backup2.php) (revision 271) @@ -239,7 +239,7 @@ function GetTableCreate($conn, $table, $crlf="\n") { - $schema_create = 'DROP TABLE ' . $table . ';' . $crlf; + $schema_create = 'DROP TABLE IF EXISTS ' . $table . ';' . $crlf; $schema_create .="# --------------------------------------------------------".$crlf; $conn->Execute("SET SQL_QUOTE_SHOW_CREATE = 0"); $result = $conn->Execute("SHOW CREATE TABLE $table"); @@ -281,7 +281,7 @@ unset($rs); if(strlen($schema_create)) { - $schema_create = str_replace("DROP TABLE ".GetTablePrefix(),"DROP TABLE ",$schema_create); + $schema_create = str_replace("DROP TABLE IF EXISTS ".GetTablePrefix(),"DROP TABLE ",$schema_create); $schema_create = str_replace("CREATE TABLE ".GetTablePrefix(),"CREATE TABLE ",$schema_create); while(strlen($schema_create && substr($schema_create,-1)!=")")) { Index: trunk/admin/install/install_lib.php =================================================================== diff -u -N -r256 -r271 --- trunk/admin/install/install_lib.php (.../install_lib.php) (revision 256) +++ trunk/admin/install/install_lib.php (.../install_lib.php) (revision 271) @@ -616,7 +616,7 @@ $sql_tests[] = 'ALTER TABLE test_table ADD COLUMN new_col varchar(10)'; $sql_tests[] = 'SELECT * FROM test_table'; $sql_tests[] = 'DELETE FROM test_table'; - $sql_tests[] = 'DROP TABLE test_table'; + $sql_tests[] = 'DROP TABLE IF EXISTS test_table'; foreach($sql_tests as $sql_test) { Index: trunk/admin/import/import.php =================================================================== diff -u -N -r247 -r271 --- trunk/admin/import/import.php (.../import.php) (revision 247) +++ trunk/admin/import/import.php (.../import.php) (revision 271) @@ -147,8 +147,8 @@ ##############creating a temproary table have to be here if ($_POST["Action"]=="Import") { - $portalconn->Execute("DROP TABLE ".$TablePrefix."import"); - $portalconn->Execute("DROP TABLE ".$TablePrefix."importcat"); + $portalconn->Execute("DROP TABLE IF EXISTS ".$TablePrefix."import"); + $portalconn->Execute("DROP TABLE IF EXISTS ".$TablePrefix."importcat"); $temptable = "CREATE TABLE ".$TablePrefix."import (otname varchar(40), oid int(11), ocustomid int(11), oparentid int(11), ntname varchar(40), nid int(11), nrid int(11), npid int(11)) "; $portalconn->Execute($temptable); Index: trunk/kernel/include/portaluser.php =================================================================== diff -u -N -r267 -r271 --- trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 267) +++ trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 271) @@ -991,7 +991,7 @@ unset($c); $rs->MoveNext(); } - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function PurgeEditTable() Index: trunk/kernel/include/relationship.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/relationship.php (.../relationship.php) (revision 13) +++ trunk/kernel/include/relationship.php (.../relationship.php) (revision 271) @@ -11,6 +11,7 @@ $this->id_field = "RelationshipId"; $this->NoResourceId = 1; $this->expanded=FALSE; + GetModuleArray(); if($id) { if(!$expanded) @@ -24,21 +25,44 @@ function LoadExpanded($id) { + global $objModules; $pre = GetTablePrefix(); $reltable = $this->tablename; - $sql = "SELECT trim(concat(ifnull(".$pre."Category.name,' '), ifnull(".$pre."Link.name,' '),ifnull(".$pre."News.title,' '), ifnull(".$pre."Topic.TopicText,' '))) as ItemName,"; - $sql .=" ELT(rel.targettype, '".admin_language("la_Text_Category")."' ,'".admin_language("la_Text_Article"); - $sql .="' ,'".admin_language("la_Text_Topic")."','".admin_language("la_Text_Link")."') as ItemType,"; - $sql .=" ELT(rel.type+1,'".admin_language("la_Text_OneWay")."','".admin_language("la_Text_Reciprocal")."') as RelationType,"; - $sql .=" RelationshipId, rel.TargetId,rel.TargetType,rel.SourceId,rel.SourceType, rel.Type, rel.Enabled, rel.Priority, "; - $sql .=" ELT(rel.enabled+1,'Disabled','Enabled') as Status FROM ".$reltable." as rel "; - $sql .=" LEFT JOIN ".$pre."Category ON ".$pre."Category.ResourceId=rel.TargetId "; - $sql .="LEFT JOIN ".$pre."Link ON ".$pre."Link.ResourceId=rel.TargetId "; - $sql .="LEFT JOIN ".$pre."News ON ".$pre."News.ResourceId=rel.TargetId "; - $sql .="LEFT JOIN ".$pre."Topic ON ".$pre."Topic.ResourceId=rel.TargetId "; - $sql .="WHERE rel.RelationshipId=".$id; - $rs=$this->adodbConnection->Execute($sql); + // ==== build sql depending on modules installed: begin ==== + $prefix = GetTablePrefix(); + $modules = $objModules->GetModuleList(); + $sql_source = $objModules->ExecuteFunction('GetModuleInfo', 'rel_list'); + + $sql_templates['ItemName'] = 'IFNULL('.$prefix."%s.%s,' ')"; + $sql_templates['TableJoin'] = 'LEFT JOIN '.$prefix."%1\$s ON ".$prefix."%1\$s.ResourceId = rel.TargetId"; + $sql_templates['TargetName'] = "IF(rel.TargetType = %s, '%s', %s)"; + + $sql = "SELECT TRIM(CONCAT(%s)) AS ItemName, %s AS ItemType,". + GetELT('rel.Type+1', Array('la_Text_OneWay','la_Text_Reciprocal')).' AS RelationType,'. + "RelationshipId, rel.Priority AS Priority, rel.Type as Type, rel.Enabled as Enabled,". + "rel.TargetId, rel.TargetType, rel.SourceId, rel.SourceType,". + GetELT('rel.Enabled+1', Array('la_Text_Disabled','la_Text_Enabled')).' AS Status '. + 'FROM '.$reltable.' AS rel %s WHERE rel.RelationshipId = '.$id; + + $sql_parts = Array(); + $sql_parts['TargetName'] = "''"; + foreach($modules as $module) + { + $sql_parts['ItemName'][] = sprintf($sql_templates['ItemName'], $sql_source[$module]['MainTable'], $sql_source[$module]['ItemNameField']); + $sql_parts['TableJoin'][] = sprintf($sql_templates['TableJoin'], $sql_source[$module]['MainTable']); + + $sql_parts['TargetName'] = sprintf( $sql_templates['TargetName'], + $sql_source[$module]['TargetType'], + admin_language($sql_source[$module]['ItemNamePhrase']), + $sql_parts['TargetName']); + } + $sql = sprintf($sql, implode(', ',$sql_parts['ItemName']), $sql_parts['TargetName'], implode(' ',$sql_parts['TableJoin'])); + // ==== build sql depending on modules installed: end ==== + + //echo "SQL: ".$sql.'
'; + + $rs = $this->adodbConnection->Execute($sql); if($rs && !$rs->EOF) { $data = $rs->fields; @@ -75,8 +99,7 @@ global $objItemTypes; /*returns the table row in an array for the item this relationship points to */ - $type=$this->Get("TargetType"); - + $type = $this->Get("TargetType"); $Item = $objItemTypes->GetItem($type); $table = $Item->Get("SourceTable"); $titlefield = $Item->Get("TitleField"); @@ -357,7 +380,7 @@ $edit_table = $objSession->GetEditTable($this->SourceTable); $idlist = array(); - $sql = "DROP TABLE $edit_table"; + $sql = "DROP TABLE IF EXISTS $edit_table"; $this->adodbConnection->Execute($sql); } @@ -403,7 +426,7 @@ echo $sql."
\n"; $this->adodbConnection->Execute($sql); -// $this->adodbConnection->Execute("DROP TABLE $edit_table"); +// $this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } } Index: trunk/kernel/include/language.php =================================================================== diff -u -N -r228 -r271 --- trunk/kernel/include/language.php (.../language.php) (revision 228) +++ trunk/kernel/include/language.php (.../language.php) (revision 271) @@ -170,7 +170,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - $this->adodbConnection->Execute("DROP TABLE $edit_table"); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function GetPhrase($Phrase,$Lang, $no_db=FALSE) @@ -543,7 +543,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - $this->adodbConnection->Execute("DROP TABLE $edit_table"); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } } Index: trunk/kernel/include/events.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/events.php (.../events.php) (revision 13) +++ trunk/kernel/include/events.php (.../events.php) (revision 271) @@ -71,7 +71,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - $this->adodbConnection->Execute("DROP TABLE $edit_table"); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } function &GetEmailEventObject($EventName,$LangId=NULL) Index: trunk/kernel/startup.php =================================================================== diff -u -N -r268 -r271 --- trunk/kernel/startup.php (.../startup.php) (revision 268) +++ trunk/kernel/startup.php (.../startup.php) (revision 271) @@ -2,6 +2,7 @@ /* startup.php: this is the primary startup sequence for in-portal services */ + if( file_exists($pathtoroot.'debug.php') && !defined('DEBUG_MODE') ) include_once($pathtoroot.'debug.php'); if( !defined('DEBUG_MODE') ) error_reporting(0); Index: trunk/admin/category/addrelation.php =================================================================== diff -u -N -r13 -r271 --- trunk/admin/category/addrelation.php (.../addrelation.php) (revision 13) +++ trunk/admin/category/addrelation.php (.../addrelation.php) (revision 271) @@ -70,8 +70,6 @@ $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; -//print_r($_GET); -//print_r($_POST); require_once($pathtoroot."kernel/startup.php"); //admin only util $rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); @@ -130,6 +128,7 @@ $RelationId = $_POST["itemlist"]; } + $Rel = new clsRelationship(); $Rel->tablename = $objEditItems->SourceTable; $Rel->LoadExpanded($RelationId); @@ -148,15 +147,11 @@ } $item = $Rel->GetTargetItemData(); - $envar = "env=" . BuildEnv() . "&en=$en"; - $section = 'in-portal:editcategory_relation'; $ado = GetADODBConnection(); - - /* page header */ print <<Get("Name")."' - ".prompt_language("la_Text_Relation"); -$title .= " ".prompt_language("la_Text_to")." '".$item[$item["TitleField"]]."'"; +$title .= " ".prompt_language("la_Text_to")." '".$item["TitleField"]."'"; $objCatToolBar = new clsToolBar(); @@ -211,7 +206,7 @@ > Index: trunk/admin/config/importlang_progress.php =================================================================== diff -u -N -r13 -r271 --- trunk/admin/config/importlang_progress.php (.../importlang_progress.php) (revision 13) +++ trunk/admin/config/importlang_progress.php (.../importlang_progress.php) (revision 271) @@ -285,8 +285,8 @@ } else { - $ado->Execute("DROP TABLE $PhraseTable"); - $ado->Execute("DROP TABLE $EventTable"); + $ado->Execute("DROP TABLE IF EXISTS $PhraseTable"); + $ado->Execute("DROP TABLE IF EXISTS $EventTable"); $url = $adminURL."/config/config_lang.php?env=".BuildEnv(); } stats(prompt_language("la_event_import_progress"),$Offset,$Total); Index: trunk/kernel/include/category.php =================================================================== diff -u -N -r133 -r271 --- trunk/kernel/include/category.php (.../category.php) (revision 133) +++ trunk/kernel/include/category.php (.../category.php) (revision 271) @@ -2182,7 +2182,7 @@ unset($r); $rs->MoveNext(); } - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); //$this->UpdateMissingCacheData(); } Index: trunk/kernel/include/itemtypes.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/itemtypes.php (.../itemtypes.php) (revision 13) +++ trunk/kernel/include/itemtypes.php (.../itemtypes.php) (revision 271) @@ -91,7 +91,7 @@ $dest_table = $objSession->GetEditTable("UserItems"); // $objSession->GetSessionKey()."_UserItems"; if($ClearTable) { - @$this->adodbConnection->Execute("DROP TABLE ".$dest_table); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS ".$dest_table); $sql = "CREATE TABLE ".$dest_table." ("; $sql .="PortalUserId INT, "; $sql .="ResourceId INT, "; Index: trunk/kernel/include/modules.php =================================================================== diff -u -N -r268 -r271 --- trunk/kernel/include/modules.php (.../modules.php) (revision 268) +++ trunk/kernel/include/modules.php (.../modules.php) (revision 271) @@ -695,7 +695,7 @@ } return FALSE; } - +//echo "Before Stuff
"; LogEntry("Loading Modules\n"); /* get the module list from the database */ $adodbConnection = GetADODBConnection(); Index: trunk/kernel/include/custommetadata.php =================================================================== diff -u -N -r129 -r271 --- trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 129) +++ trunk/kernel/include/custommetadata.php (.../custommetadata.php) (revision 271) @@ -208,7 +208,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); if(is_array($idlist)) { $list = implode(",",$idlist); @@ -265,7 +265,7 @@ } $rs->MoveNext(); } - @$this->adodbConnection->Execute("DROP TABLE $edit_table"); + @$this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } } /* clsCustomDataList */ Index: trunk/admin/config/missing_label_search.php =================================================================== diff -u -N -r13 -r271 --- trunk/admin/config/missing_label_search.php (.../missing_label_search.php) (revision 13) +++ trunk/admin/config/missing_label_search.php (.../missing_label_search.php) (revision 271) @@ -135,7 +135,7 @@ $LangId = $_GET["LangId"]; $ThemeId = $_GET["theme"]; $table = $objSession->GetSessionTable("_".$ThemeId."_labels"); - @$ado->Execute("DROP TABLE $table "); + @$ado->Execute("DROP TABLE IF EXISTS $table "); $Phrases = new clsPhraseList(); $query = "SELECT * FROM ".$Phrases->SourceTable." WHERE PhraseId = -1"; $insert = "CREATE TABLE ".$table." ".$query; Index: trunk/kernel/include/theme.php =================================================================== diff -u -N -r13 -r271 --- trunk/kernel/include/theme.php (.../theme.php) (revision 13) +++ trunk/kernel/include/theme.php (.../theme.php) (revision 271) @@ -727,7 +727,7 @@ global $objSession; $edit_table = $objSession->GetEditTable($this->SourceTable); - $this->adodbConnection->Execute("DROP TABLE $edit_table"); + $this->adodbConnection->Execute("DROP TABLE IF EXISTS $edit_table"); } Index: trunk/admin/templates/cat_select_element.tpl =================================================================== diff -u -N -r13 -r271 --- trunk/admin/templates/cat_select_element.tpl (.../cat_select_element.tpl) (revision 13) +++ trunk/admin/templates/cat_select_element.tpl (.../cat_select_element.tpl) (revision 271) @@ -6,6 +6,6 @@ ">: - + \ No newline at end of file
- () + ()