aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-10 13:43:35 -0800
committerfriendica <info@friendica.com>2012-02-10 13:43:35 -0800
commitd79c3351ea6692478a490f4225ea1009863dd65f (patch)
tree4cc9d5470c70913c0317e49b21601fd80fe7e781
parentb346f4464c230af4636c61397decd03eadb18e9a (diff)
downloadvolse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.tar.gz
volse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.tar.bz2
volse-hubzilla-d79c3351ea6692478a490f4225ea1009863dd65f.zip
db installation sync
-rwxr-xr-xboot.php4
-rwxr-xr-xdatabase.sql2
-rwxr-xr-xinclude/items.php1
-rwxr-xr-xupdate.php18
4 files changed, 22 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index 9573408f0..1909abbed 100755
--- a/boot.php
+++ b/boot.php
@@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '2.3.1247' );
+define ( 'FRIENDICA_VERSION', '2.3.1248' );
define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
-define ( 'DB_UPDATE_VERSION', 1120 );
+define ( 'DB_UPDATE_VERSION', 1121 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/database.sql b/database.sql
index 8abaa5a93..0b03149e9 100755
--- a/database.sql
+++ b/database.sql
@@ -226,6 +226,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`pubmail` tinyint(1) NOT NULL DEFAULT '0',
`moderated` tinyint(1) NOT NULL DEFAULT '0',
`visible` tinyint(1) NOT NULL DEFAULT '0',
+ `spam` tinyint(1) NOT NULL DEFAULT '0',
`starred` tinyint(1) NOT NULL DEFAULT '0',
`bookmark` tinyint(1) NOT NULL DEFAULT '0',
`unseen` tinyint(1) NOT NULL DEFAULT '1',
@@ -247,6 +248,7 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `received` (`received`),
KEY `moderated` (`moderated`),
KEY `visible` (`visible`),
+ KEY `spam` (`spam`),
KEY `starred` (`starred`),
KEY `bookmark` (`bookmark`),
KEY `deleted` (`deleted`),
diff --git a/include/items.php b/include/items.php
index 3c30e99aa..5e3f9a60a 100755
--- a/include/items.php
+++ b/include/items.php
@@ -985,6 +985,7 @@ function tag_deliver($uid,$item_id) {
'verb' => ACTIVITY_TAG,
'otype' => 'item'
));
+
if(! $community_page)
return;
diff --git a/update.php b/update.php
index dc3cc0e56..9e3f22ef1 100755
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1120 );
+define( 'UPDATE_VERSION' , 1121 );
/**
*
@@ -1021,3 +1021,19 @@ q("ALTER TABLE `contact` ADD `closeness` TINYINT( 2 ) NOT NULL DEFAULT '99' AFTE
q("update contact set closeness = 0 where self = 1");
q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
}
+
+
+function update_1120() {
+
+ // item table update from 1119 did not get into database.sql file.
+ // might be missing on new installs. We'll check.
+
+ $r = q("describe item");
+ if($r && count($r)) {
+ foreach($r as $rr)
+ if($rr['Field'] == 'spam')
+ return;
+ }
+ q("ALTER TABLE `item` ADD `spam` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` , ADD INDEX (`spam`) ");
+
+}