aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--database.sql1
-rw-r--r--mod/item.php2
-rw-r--r--update.php1
3 files changed, 3 insertions, 1 deletions
diff --git a/database.sql b/database.sql
index 22a55ceb0..de6b2fe83 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 5e4f54ce0..554ff46ac 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 a39450579..5ae473be6 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` )");
}