Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xerora
committed
Oct 14, 2013
1 parent
1ea4d07
commit 00c9cac
Showing
4 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
<?php defined('COT_CODE') or die('Wrong URL'); | ||
|
||
if(!(bool)$db->query("SHOW INDEXES FROM `cot_tag_references` WHERE `Key_name`='tag_area_item'")->fetch()) | ||
require_once cot_incfile('tags', 'plug'); | ||
|
||
if(!$db->indexExists($db_tag_references, 'tag_area_item', array('tag_area', 'tag_item'))) | ||
{ | ||
$db->query("ALTER TABLE `cot_tag_references` ADD INDEX `tag_area_item` (`tag_area`, `tag_item`)"); | ||
$db->addIndex($db_tag_references, 'tag_area_item', array('tag_area', 'tag_item')); | ||
} | ||
|
||
if((bool)$db->query("SHOW INDEXES FROM `cot_tag_references` WHERE `Key_name`='tag_item'")->fetch()) | ||
if($db->indexExists($db_tag_references, 'tag_item')) | ||
{ | ||
$db->query("ALTER TABLE `cot_tag_references` DROP INDEX `tag_item`"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters