Rename plugin to addon
This commit is contained in:
parent
7701347cd5
commit
a6f6f92a24
6 changed files with 32 additions and 33 deletions
|
@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `site` (
|
||||||
`name` char(255) NOT NULL,
|
`name` char(255) NOT NULL,
|
||||||
`url` char(255) NOT NULL,
|
`url` char(255) NOT NULL,
|
||||||
`version` char(16) NOT NULL,
|
`version` char(16) NOT NULL,
|
||||||
`plugins` text NOT NULL,
|
`addons` text NOT NULL,
|
||||||
`reg_policy` char(32) NOT NULL,
|
`reg_policy` char(32) NOT NULL,
|
||||||
`info` text NOT NULL,
|
`info` text NOT NULL,
|
||||||
`admin_name` char(255) NOT NULL,
|
`admin_name` char(255) NOT NULL,
|
||||||
|
@ -107,7 +107,7 @@ CREATE TABLE IF NOT EXISTS `site-health` (
|
||||||
`dt_last_heartbeat` datetime DEFAULT NULL,
|
`dt_last_heartbeat` datetime DEFAULT NULL,
|
||||||
`name` varchar(255) DEFAULT NULL,
|
`name` varchar(255) DEFAULT NULL,
|
||||||
`version` varchar(255) DEFAULT NULL,
|
`version` varchar(255) DEFAULT NULL,
|
||||||
`plugins` text,
|
`addons` text,
|
||||||
`reg_policy` char(32) DEFAULT NULL,
|
`reg_policy` char(32) DEFAULT NULL,
|
||||||
`info` text,
|
`info` text,
|
||||||
`admin_name` varchar(255) DEFAULT NULL,
|
`admin_name` varchar(255) DEFAULT NULL,
|
||||||
|
|
|
@ -213,7 +213,7 @@ if (!function_exists('run_site_probe')) {
|
||||||
"`dt_last_seen` = NOW(),
|
"`dt_last_seen` = NOW(),
|
||||||
`name` = '%s',
|
`name` = '%s',
|
||||||
`version` = '%s',
|
`version` = '%s',
|
||||||
`plugins` = '%s',
|
`addons` = '%s',
|
||||||
`reg_policy` = '%s',
|
`reg_policy` = '%s',
|
||||||
`info` = '%s',
|
`info` = '%s',
|
||||||
`admin_name` = '%s',
|
`admin_name` = '%s',
|
||||||
|
@ -221,7 +221,7 @@ if (!function_exists('run_site_probe')) {
|
||||||
",
|
",
|
||||||
dbesc($data->site_name),
|
dbesc($data->site_name),
|
||||||
dbesc($data->version),
|
dbesc($data->version),
|
||||||
dbesc(implode("\r\n", $data->plugins)),
|
dbesc(implode("\r\n", $data->addons)),
|
||||||
dbesc($data->register_policy),
|
dbesc($data->register_policy),
|
||||||
dbesc($data->info),
|
dbesc($data->info),
|
||||||
dbesc($data->admin->name),
|
dbesc($data->admin->name),
|
||||||
|
|
|
@ -382,7 +382,7 @@ function health_details(App $a, $id)
|
||||||
'$dt_first_noticed' => $site['dt_first_noticed'],
|
'$dt_first_noticed' => $site['dt_first_noticed'],
|
||||||
'$dt_last_seen' => $site['dt_last_seen'],
|
'$dt_last_seen' => $site['dt_last_seen'],
|
||||||
'$version' => $site['version'],
|
'$version' => $site['version'],
|
||||||
'$plugins' => $site['plugins'],
|
'$addons' => $site['addons'],
|
||||||
'$reg_policy' => $site['reg_policy'],
|
'$reg_policy' => $site['reg_policy'],
|
||||||
'$info' => $site['info'],
|
'$info' => $site['info'],
|
||||||
'$admin_name' => $site['admin_name'],
|
'$admin_name' => $site['admin_name'],
|
||||||
|
|
|
@ -58,28 +58,28 @@ function servers_content(&$a) {
|
||||||
$site['users'] = $users;
|
$site['users'] = $users;
|
||||||
|
|
||||||
//Figure out what this server supports.
|
//Figure out what this server supports.
|
||||||
$plugins = explode("\r\n", $site['plugins']);
|
$addons = explode("\r\n", $site['addons']);
|
||||||
$site['plugins'] = $plugins;
|
$site['addons'] = $addons;
|
||||||
$hasPlugin = function (array $input) use ($plugins) {
|
$hasAddon = function (array $input) use ($addons) {
|
||||||
return !!count(array_intersect($input, $plugins));
|
return !!count(array_intersect($input, $addons));
|
||||||
};
|
};
|
||||||
|
|
||||||
$site['supports'] = array(
|
$site['supports'] = array(
|
||||||
'HTTPS' => $site['ssl_state'] == 1,
|
'HTTPS' => $site['ssl_state'] == 1,
|
||||||
'Twitter' => $hasPlugin(array('buffer', 'twitter')),
|
'Twitter' => $hasAddon(array('buffer', 'twitter')),
|
||||||
'Facebook' => $hasPlugin(array('buffer')),
|
'Facebook' => $hasAddon(array('buffer')),
|
||||||
'Google+' => $hasPlugin(array('buffer', 'gpluspost')),
|
'Google+' => $hasAddon(array('buffer', 'gpluspost')),
|
||||||
'RSS/Atom' => true, //Built-in.
|
'RSS/Atom' => true, //Built-in.
|
||||||
'Diaspora*' => $hasPlugin(array('diaspora')),
|
'Diaspora*' => $hasAddon(array('diaspora')),
|
||||||
'pump.io' => $hasPlugin(array('pumpio')),
|
'pump.io' => $hasAddon(array('pumpio')),
|
||||||
'StatusNet' => $hasPlugin(array('statusnet')),
|
'StatusNet' => $hasAddon(array('statusnet')),
|
||||||
'Tumblr' => $hasPlugin(array('tumblr')),
|
'Tumblr' => $hasAddon(array('tumblr')),
|
||||||
'Blogger' => $hasPlugin(array('blogger')),
|
'Blogger' => $hasAddon(array('blogger')),
|
||||||
'Dreamwidth' => $hasPlugin(array('dwpost')),
|
'Dreamwidth' => $hasAddon(array('dwpost')),
|
||||||
'Wordpress' => $hasPlugin(array('wppost')),
|
'Wordpress' => $hasAddon(array('wppost')),
|
||||||
'LiveJournal' => $hasPlugin(array('ljpost')),
|
'LiveJournal' => $hasAddon(array('ljpost')),
|
||||||
'Insanejournal' => $hasPlugin(array('ijpost')),
|
'Insanejournal' => $hasAddon(array('ijpost')),
|
||||||
'Libertree' => $hasPlugin(array('libertree'))
|
'Libertree' => $hasAddon(array('libertree'))
|
||||||
);
|
);
|
||||||
|
|
||||||
//Subset of the full support list, to show popular items.
|
//Subset of the full support list, to show popular items.
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
site_name
|
site_name
|
||||||
version
|
version
|
||||||
url
|
url
|
||||||
plugins (arr)
|
addons (arr)
|
||||||
register_policy
|
register_policy
|
||||||
admin:
|
admin:
|
||||||
name
|
name
|
||||||
|
@ -26,7 +26,7 @@ function siteinfo_content(&$a) {
|
||||||
$o .= '<p>Friendica is experiencing very rapid growth and we need more public portals - as some of our primary servers are reaching capacity. Friendica is a decentralised and distributed network. Help us share the load. If you can provide a Friendica server for public use, please send the URL to info at friendica dot com. We will include you in our list.</p>';
|
$o .= '<p>Friendica is experiencing very rapid growth and we need more public portals - as some of our primary servers are reaching capacity. Friendica is a decentralised and distributed network. Help us share the load. If you can provide a Friendica server for public use, please send the URL to info at friendica dot com. We will include you in our list.</p>';
|
||||||
|
|
||||||
|
|
||||||
$r = q("select * from site where url != '' and version != '' and not plugins like '%%testdrive%%' order by rand()");
|
$r = q("select * from site where url != '' and version != '' and not addons like '%%testdrive%%' order by rand()");
|
||||||
|
|
||||||
$policy = array ( 'REGISTER_CLOSED' => 'closed', 'REGISTER_OPEN' => 'open', 'REGISTER_APPROVE' => 'requires approval');
|
$policy = array ( 'REGISTER_CLOSED' => 'closed', 'REGISTER_OPEN' => 'open', 'REGISTER_APPROVE' => 'requires approval');
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ function siteinfo_content(&$a) {
|
||||||
$o .= '<td>' . t('Registration') . '</td>';
|
$o .= '<td>' . t('Registration') . '</td>';
|
||||||
$o .= '<td>' . t('Additional Info') . '</td>';
|
$o .= '<td>' . t('Additional Info') . '</td>';
|
||||||
$o .= '<td>' . t('Version') . '</td>';
|
$o .= '<td>' . t('Version') . '</td>';
|
||||||
$o .= '<td>' . t('Plugins Installed') . '</td>';
|
$o .= '<td>' . t('Addons Installed') . '</td>';
|
||||||
$o .= '<td>' . t('Site Administrator') . '</td>';
|
$o .= '<td>' . t('Site Administrator') . '</td>';
|
||||||
$o .= '<td>' . t('Record Updated (UTC)') . '</td>';
|
$o .= '<td>' . t('Record Updated (UTC)') . '</td>';
|
||||||
$o .= '</tr>';
|
$o .= '</tr>';
|
||||||
|
@ -53,14 +53,14 @@ function siteinfo_content(&$a) {
|
||||||
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
|
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
|
||||||
$o .= '<td>' . $rr['info'] . '</td>';
|
$o .= '<td>' . $rr['info'] . '</td>';
|
||||||
$o .= '<td>' . $rr['version'] . '</td>';
|
$o .= '<td>' . $rr['version'] . '</td>';
|
||||||
$o .= '<td>' . str_replace(',',', ',$rr['plugins']) . '</td>';
|
$o .= '<td>' . str_replace(',',', ',$rr['addons']) . '</td>';
|
||||||
$o .= '<td>' . '<a href="' . $rr['admin_profile'] . '">' . $rr['admin_name'] . '</a>' . '</td>';
|
$o .= '<td>' . '<a href="' . $rr['admin_profile'] . '">' . $rr['admin_name'] . '</a>' . '</td>';
|
||||||
$o .= '<td>' . $rr['updated'] . '</td>';
|
$o .= '<td>' . $rr['updated'] . '</td>';
|
||||||
$o .= '</tr>';
|
$o .= '</tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q("select * from site where url != '' and version != '' and plugins like '%%testdrive%%' order by rand()");
|
$r = q("select * from site where url != '' and version != '' and addons like '%%testdrive%%' order by rand()");
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
$o .= '<tr><td colspan="7" height="100px" ><strong>-- Demo and test sites -- Limited account duration with expiration --</stron></td></tr>';
|
$o .= '<tr><td colspan="7" height="100px" ><strong>-- Demo and test sites -- Limited account duration with expiration --</stron></td></tr>';
|
||||||
|
@ -72,7 +72,7 @@ function siteinfo_content(&$a) {
|
||||||
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
|
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
|
||||||
$o .= '<td>' . $rr['info'] . '</td>';
|
$o .= '<td>' . $rr['info'] . '</td>';
|
||||||
$o .= '<td>' . $rr['version'] . '</td>';
|
$o .= '<td>' . $rr['version'] . '</td>';
|
||||||
$o .= '<td>' . str_replace(',',', ',$rr['plugins']) . '</td>';
|
$o .= '<td>' . str_replace(',',', ',$rr['addons']) . '</td>';
|
||||||
$o .= '<td>' . '<a href="' . $rr['admin_profile'] . '">' . $rr['admin_name'] . '</a>' . '</td>';
|
$o .= '<td>' . '<a href="' . $rr['admin_profile'] . '">' . $rr['admin_name'] . '</a>' . '</td>';
|
||||||
$o .= '<td>' . $rr['updated'] . '</td>';
|
$o .= '<td>' . $rr['updated'] . '</td>';
|
||||||
$o .= '</tr>';
|
$o .= '</tr>';
|
||||||
|
@ -94,5 +94,4 @@ function siteinfo_content(&$a) {
|
||||||
|
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ function updatesites_content(&$a) {
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
if($j) {
|
if($j) {
|
||||||
$plugs = (array) $j->plugins;
|
$plugs = (array) $j->addons;
|
||||||
if(in_array('testdrive',$plugs)) {
|
if(in_array('testdrive',$plugs)) {
|
||||||
$j->site_name = '!!! Test/Demo ONLY. !!! ' . $j->site_name;
|
$j->site_name = '!!! Test/Demo ONLY. !!! ' . $j->site_name;
|
||||||
$j->info = 'Accounts are temporary, expiration is enabled. ' . $j->info;
|
$j->info = 'Accounts are temporary, expiration is enabled. ' . $j->info;
|
||||||
|
@ -25,9 +25,9 @@ function updatesites_content(&$a) {
|
||||||
|
|
||||||
q("UPDATE site set
|
q("UPDATE site set
|
||||||
name = '%s',
|
name = '%s',
|
||||||
url = '%s',
|
url = '%s',
|
||||||
version = '%s',
|
version = '%s',
|
||||||
plugins = '%s',
|
addons = '%s',
|
||||||
reg_policy = '%s',
|
reg_policy = '%s',
|
||||||
info = '%s',
|
info = '%s',
|
||||||
admin_name = '%s',
|
admin_name = '%s',
|
||||||
|
|
Loading…
Add table
Reference in a new issue