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' );
`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',
KEY `received` (`received`),
KEY `moderated` (`moderated`),
KEY `visible` (`visible`),
+ KEY `spam` (`spam`),
KEY `starred` (`starred`),
KEY `bookmark` (`bookmark`),
KEY `deleted` (`deleted`),
'verb' => ACTIVITY_TAG,
'otype' => 'item'
));
+
if(! $community_page)
return;
<?php
-define( 'UPDATE_VERSION' , 1120 );
+define( 'UPDATE_VERSION' , 1121 );
/**
*
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`) ");
+
+}