summaryrefslogtreecommitdiff
path: root/modules/comment
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-02-28 06:37:28 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-02-28 06:37:28 +0000
commitc04ff8e02f01691dc2e325efc523e43f3aebaf95 (patch)
tree8fbdfe90c1bb04b9b8b74500904c09f126430e19 /modules/comment
parentad56995bafffeca89c44b07cb4f25da7b36a1a99 (diff)
Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
Diffstat (limited to 'modules/comment')
-rw-r--r--modules/comment/controllers/admin_comments.php2
-rw-r--r--modules/comment/helpers/comment_installer.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/controllers/admin_comments.php b/modules/comment/controllers/admin_comments.php
index 47e354af..c1a30bd2 100644
--- a/modules/comment/controllers/admin_comments.php
+++ b/modules/comment/controllers/admin_comments.php
@@ -57,7 +57,7 @@ class Admin_Comments_Controller extends Admin_Controller {
public function index() {
// Get rid of old deleted/spam comments
Database::instance()->query(
- "DELETE FROM `[comments]` " .
+ "DELETE FROM {comments} " .
"WHERE state IN ('deleted', 'spam') " .
"AND unix_timestamp(now()) - updated > 86400 * 7");
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php
index a7852d05..5c5e9f03 100644
--- a/modules/comment/helpers/comment_installer.php
+++ b/modules/comment/helpers/comment_installer.php
@@ -23,7 +23,7 @@ class comment_installer {
$version = module::get_version("comment");
if ($version == 0) {
- $db->query("CREATE TABLE IF NOT EXISTS `[comments]` (
+ $db->query("CREATE TABLE IF NOT EXISTS {comments} (
`author_id` int(9) default NULL,
`created` int(9) NOT NULL,
`guest_email` varchar(128) default NULL,
@@ -58,10 +58,10 @@ class comment_installer {
static function uninstall() {
$db = Database::instance();
- $sql = "SELECT `item_id` FROM `[comments]`";
+ $sql = "SELECT `item_id` FROM {comments}";
module::event("item_related_update_batch", $sql);
- $db->query("DROP TABLE IF EXISTS `[comments]
+ $db->query("DROP TABLE IF EXISTS {comments]
`;");
module::delete("comment");
}