infrastructure for future stuff

This commit is contained in:
friendica 2013-06-19 18:06:14 -07:00
parent 9d03da1348
commit 4f06905a18
5 changed files with 33 additions and 18 deletions

View File

@ -41,7 +41,7 @@ require_once('include/features.php');
define ( 'RED_PLATFORM', 'Red Matrix' ); define ( 'RED_PLATFORM', 'Red Matrix' );
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R'); define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 ); define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1044 ); define ( 'DB_UPDATE_VERSION', 1045 );
define ( 'EOL', '<br />' . "\r\n" ); define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@ -117,7 +117,7 @@ define ( 'DEFAULT_DB_ENGINE', 'MyISAM' );
define ( 'SSL_POLICY_NONE', 0 ); define ( 'SSL_POLICY_NONE', 0 );
define ( 'SSL_POLICY_FULL', 1 ); define ( 'SSL_POLICY_FULL', 1 );
define ( 'SSL_POLICY_SELFSIGN', 2 ); define ( 'SSL_POLICY_SELFSIGN', 2 ); // NOT supported in Red
/** /**
@ -313,18 +313,24 @@ define ( 'XCHAN_FLAGS_HIDDEN', 0x0001);
* Tag/term types * Tag/term types
*/ */
define ( 'TERM_UNKNOWN', 0 ); define ( 'TERM_UNKNOWN', 0 );
define ( 'TERM_HASHTAG', 1 ); define ( 'TERM_HASHTAG', 1 );
define ( 'TERM_MENTION', 2 ); define ( 'TERM_MENTION', 2 );
define ( 'TERM_CATEGORY', 3 ); define ( 'TERM_CATEGORY', 3 );
define ( 'TERM_PCATEGORY', 4 ); define ( 'TERM_PCATEGORY', 4 );
define ( 'TERM_FILE', 5 ); define ( 'TERM_FILE', 5 );
define ( 'TERM_SAVEDSEARCH', 6 ); define ( 'TERM_SAVEDSEARCH', 6 );
define ( 'TERM_HAVETHING', 7 );
define ( 'TERM_WANTTHING', 8 );
define ( 'TERM_OBJ_POST', 1 ); define ( 'TERM_LIKETHING', 9 );
define ( 'TERM_OBJ_PHOTO', 2 ); define ( 'TERM_NOLIKETHING', 10 );
define ( 'TERM_OBJ_POST', 1 );
define ( 'TERM_OBJ_PHOTO', 2 );
define ( 'TERM_OBJ_PROFILE', 3 );
define ( 'TERM_OBJ_CHANNEL', 4 );
define ( 'TERM_OBJ_OBJECT', 5 );
define ( 'TERM_OBJ_THING', 6 );
/** /**

View File

@ -826,13 +826,15 @@ CREATE TABLE IF NOT EXISTS `term` (
`type` tinyint(3) unsigned NOT NULL, `type` tinyint(3) unsigned NOT NULL,
`term` char(255) NOT NULL, `term` char(255) NOT NULL,
`url` char(255) NOT NULL, `url` char(255) NOT NULL,
`imgurl` char(255) NOT NULL,
PRIMARY KEY (`tid`), PRIMARY KEY (`tid`),
KEY `oid` (`oid`), KEY `oid` (`oid`),
KEY `otype` (`otype`), KEY `otype` (`otype`),
KEY `type` (`type`), KEY `type` (`type`),
KEY `term` (`term`), KEY `term` (`term`),
KEY `uid` (`uid`), KEY `uid` (`uid`),
KEY `aid` (`aid`) KEY `aid` (`aid`),
KEY `imgurl` (`imgurl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tokens` ( CREATE TABLE IF NOT EXISTS `tokens` (

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1044 ); define( 'UPDATE_VERSION' , 1045 );
/** /**
* *
@ -548,3 +548,11 @@ ADD INDEX ( `comment_policy` ) ");
return UPDATE_SUCCESS; return UPDATE_SUCCESS;
return UPDATE_FAILED; return UPDATE_FAILED;
} }
function update_r1044() {
$r = q("ALTER TABLE `term` ADD `imgurl` CHAR( 255 ) NOT NULL ,
ADD INDEX ( `imgurl` ) ");
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}

View File

@ -102,8 +102,7 @@ function like_content(&$a) {
$post_type = (($item['resource_type'] === 'photo') ? $t('photo') : t('status')); $post_type = (($item['resource_type'] === 'photo') ? $t('photo') : t('status'));
$links = array(array('rel' => 'alternate','type' => 'text/html', $links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $item['plink']));
'href' => z_root() . '/display/' . $item['mid']));
$objtype = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE ); $objtype = (($item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
$body = $item['body']; $body = $item['body'];

View File

@ -1 +1 @@
2013-06-18.348 2013-06-19.349