From 49c9860e6191ecebaa80c66e49b81132dd80990f Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Thu, 9 Sep 2010 19:20:35 -0700 Subject: [PATCH] fix item --- database.sql | 1 + mod/item.php | 2 +- update.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/database.sql b/database.sql index 22a55ceb08..de6b2fe830 100644 --- a/database.sql +++ b/database.sql @@ -178,6 +178,7 @@ CREATE TABLE IF NOT EXISTS `item` ( KEY `uid` (`uid`), KEY `contact-id` (`contact-id`), KEY `type` (`type`), + KEY `wall` (`wall`), KEY `parent` (`parent`), KEY `parent-uri` (`parent-uri`), KEY `created` (`created`), diff --git a/mod/item.php b/mod/item.php index 5e4f54ce0a..554ff46ac2 100644 --- a/mod/item.php +++ b/mod/item.php @@ -116,7 +116,7 @@ function item_post(&$a) { $r = q("INSERT INTO `item` (`uid`,`type`,`wall`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `author-name`, `author-link`, `author-avatar`, `created`, `edited`, `changed`, `uri`, `title`, `body`, `location`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`) - VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", + VALUES( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )", intval($profile_uid), dbesc($post_type), intval($wall), diff --git a/update.php b/update.php index a39450579a..5ae473be69 100644 --- a/update.php +++ b/update.php @@ -16,4 +16,5 @@ function update_1000() { function update_1001() { q("ALTER TABLE `item` ADD `wall` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `type` "); + q("ALTER TABLE `item` ADD INDEX ( `wall` )"); }