aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-09-09 19:20:35 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-09-09 19:20:35 -0700
commit49c9860e6191ecebaa80c66e49b81132dd80990f (patch)
tree0afb308c9d5800808108c9ea230abe6b72bf6a87
parent887a8add2d927111c51167ef8b9700d03fe69e91 (diff)
downloadvolse-hubzilla-49c9860e6191ecebaa80c66e49b81132dd80990f.tar.gz
volse-hubzilla-49c9860e6191ecebaa80c66e49b81132dd80990f.tar.bz2
volse-hubzilla-49c9860e6191ecebaa80c66e49b81132dd80990f.zip
fix item
-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` )");
}