This commit is contained in:
jeroenpraat 2016-02-25 02:05:16 +01:00
commit f12b0fe316
9 changed files with 46 additions and 9 deletions

View File

@ -50,7 +50,7 @@ define ( 'RED_VERSION', trim(file_get_contents('version.inc')));
define ( 'STD_VERSION', '1.2.4' ); define ( 'STD_VERSION', '1.2.4' );
define ( 'ZOT_REVISION', 1 ); define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1163 ); define ( 'DB_UPDATE_VERSION', 1164 );
/** /**

View File

@ -325,7 +325,8 @@ function get_plugin_info($plugin){
'description' => '', 'description' => '',
'author' => array(), 'author' => array(),
'maintainer' => array(), 'maintainer' => array(),
'version' => '' 'version' => '',
'requires' => ''
); );
if (!is_file("addon/$plugin/$plugin.php")) if (!is_file("addon/$plugin/$plugin.php"))
@ -383,6 +384,22 @@ function check_plugin_versions($info) {
} }
} }
if(array_key_exists('requires',$info)) {
$arr = explode(',',$info['requires']);
$found = true;
if($arr) {
foreach($arr as $test) {
$test = trim($test);
if(! $test)
continue;
if(! in_array($test,get_app()->plugins))
$found = false;
}
}
if(! $found)
return false;
}
return true; return true;
} }

View File

@ -230,6 +230,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_w_like` int(10) unsigned NOT NULL DEFAULT '0', `channel_w_like` int(10) unsigned NOT NULL DEFAULT '0',
`channel_removed` tinyint(1) NOT NULL DEFAULT '0', `channel_removed` tinyint(1) NOT NULL DEFAULT '0',
`channel_system` tinyint(1) NOT NULL DEFAULT '0', `channel_system` tinyint(1) NOT NULL DEFAULT '0',
`channel_moved` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`channel_id`), PRIMARY KEY (`channel_id`),
UNIQUE KEY `channel_address_unique` (`channel_address`), UNIQUE KEY `channel_address_unique` (`channel_address`),
KEY `channel_account_id` (`channel_account_id`), KEY `channel_account_id` (`channel_account_id`),
@ -268,7 +269,8 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_w_like` (`channel_w_like`), KEY `channel_w_like` (`channel_w_like`),
KEY `channel_removed` (`channel_removed`), KEY `channel_removed` (`channel_removed`),
KEY `channel_system` (`channel_system`), KEY `channel_system` (`channel_system`),
KEY `channel_lastpost` (`channel_lastpost`) KEY `channel_lastpost` (`channel_lastpost`),
KEY `channel_moved` (`channel_moved`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `chat` ( CREATE TABLE IF NOT EXISTS `chat` (

View File

@ -225,6 +225,7 @@ CREATE TABLE "channel" (
"channel_w_like" bigint NOT NULL DEFAULT '128', "channel_w_like" bigint NOT NULL DEFAULT '128',
"channel_removed" smallint NOT NULL DEFAULT '0', "channel_removed" smallint NOT NULL DEFAULT '0',
"channel_system" smallint NOT NULL DEFAULT '0', "channel_system" smallint NOT NULL DEFAULT '0',
"channel_moved" text NOT NULL DEFAULT '',
PRIMARY KEY ("channel_id"), PRIMARY KEY ("channel_id"),
UNIQUE ("channel_address") UNIQUE ("channel_address")
); );
@ -265,6 +266,7 @@ create index "channel_dirdate" on channel ("channel_dirdate");
create index "channel_lastpost" on channel ("channel_lastpost"); create index "channel_lastpost" on channel ("channel_lastpost");
create index "channel_removed" on channel ("channel_removed"); create index "channel_removed" on channel ("channel_removed");
create index "channel_system" on channel ("channel_system"); create index "channel_system" on channel ("channel_system");
create index "channel_moved" on channel ("channel_moved");
CREATE TABLE "chat" ( CREATE TABLE "chat" (
"chat_id" serial NOT NULL, "chat_id" serial NOT NULL,
"chat_room" bigint NOT NULL DEFAULT '0', "chat_room" bigint NOT NULL DEFAULT '0',

View File

@ -1,6 +1,6 @@
<?php <?php
define( 'UPDATE_VERSION' , 1163 ); define( 'UPDATE_VERSION' , 1164 );
/** /**
* *
@ -2004,3 +2004,18 @@ function update_r1162() {
return UPDATE_SUCCESS; return UPDATE_SUCCESS;
return UPDATE_FAILED; return UPDATE_FAILED;
} }
function update_r1163() {
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
$r1 = q("alter table channel add channel_moved text not null default '' ");
$r2 = q("create index \"channel_channel_moved\" on channel (\"channel_moved\") ");
}
else {
$r1 = q("alter table channel add channel_moved char(255) not null default '' ");
$r2 = q("alter table channel add index ( channel_moved ) ");
}
if($r1 && $r2)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}

View File

@ -1275,7 +1275,7 @@ function admin_page_plugins(&$a){
'$str_minversion' => t('Minimum project version: '), '$str_minversion' => t('Minimum project version: '),
'$str_maxversion' => t('Maximum project version: '), '$str_maxversion' => t('Maximum project version: '),
'$str_minphpversion' => t('Minimum PHP version: '), '$str_minphpversion' => t('Minimum PHP version: '),
'$str_requires' => t('Requires: '),
'$disabled' => t('Disabled - version incompatibility'), '$disabled' => t('Disabled - version incompatibility'),
'$admin_form' => $admin_form, '$admin_form' => $admin_form,

View File

@ -35,8 +35,6 @@ function xrd_init(&$a) {
header("Content-type: application/xrd+xml"); header("Content-type: application/xrd+xml");
$tpl = get_markup_template('view/xrd_person.tpl');
$o = replace_macros(get_markup_template('xrd_person.tpl'), array( $o = replace_macros(get_markup_template('xrd_person.tpl'), array(
'$nick' => $r[0]['channel_address'], '$nick' => $r[0]['channel_address'],
'$accturi' => $uri, '$accturi' => $uri,
@ -51,7 +49,7 @@ function xrd_init(&$a) {
// '$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['channel_address'] . '/mention', // '$salmen' => $a->get_baseurl() . '/salmon/' . $r[0]['channel_address'] . '/mention',
'$modexp' => 'data:application/magic-public-key,' . $salmon_key, '$modexp' => 'data:application/magic-public-key,' . $salmon_key,
'$subscribe' => $a->get_baseurl() . '/follow?url={uri}', '$subscribe' => $a->get_baseurl() . '/follow?url={uri}',
// '$bigkey' => salmon_key($r[0]['pubkey']) '$bigkey' => salmon_key($r[0]['channel_pubkey'])
)); ));

View File

@ -4,7 +4,7 @@ I'm the web server at {{$sitename}};
The Hubzilla developers released update {{$update}} recently, The Hubzilla developers released update {{$update}} recently,
but when I tried to install it, something went terribly wrong. but when I tried to install it, something went terribly wrong.
This needs to be fixed soon and it requires human intervention. This needs to be fixed soon and it requires human intervention.
Please contact a Red developer if you can not figure out how to Please contact a project developer if you can not figure out how to
fix it on your own. My database might be invalid. fix it on your own. My database might be invalid.
The error message is '{{$error}}'. The error message is '{{$error}}'.

View File

@ -24,6 +24,9 @@
{{if $info.minphpversion}} {{if $info.minphpversion}}
<p class="versionlimit">{{$str_minphpversion}}{{$info.minphpversion}}</p> <p class="versionlimit">{{$str_minphpversion}}{{$info.minphpversion}}</p>
{{/if}} {{/if}}
{{if $info.requires}}
<p class="versionlimit">{{$str_requires}}{{$info.requires}}</p>
{{/if}}
{{foreach $info.maintainer as $a}} {{foreach $info.maintainer as $a}}