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,
|
||||
`url` char(255) NOT NULL,
|
||||
`version` char(16) NOT NULL,
|
||||
`plugins` text NOT NULL,
|
||||
`addons` text NOT NULL,
|
||||
`reg_policy` char(32) NOT NULL,
|
||||
`info` text 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,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
`version` varchar(255) DEFAULT NULL,
|
||||
`plugins` text,
|
||||
`addons` text,
|
||||
`reg_policy` char(32) DEFAULT NULL,
|
||||
`info` text,
|
||||
`admin_name` varchar(255) DEFAULT NULL,
|
||||
|
|
|
@ -213,7 +213,7 @@ if (!function_exists('run_site_probe')) {
|
|||
"`dt_last_seen` = NOW(),
|
||||
`name` = '%s',
|
||||
`version` = '%s',
|
||||
`plugins` = '%s',
|
||||
`addons` = '%s',
|
||||
`reg_policy` = '%s',
|
||||
`info` = '%s',
|
||||
`admin_name` = '%s',
|
||||
|
@ -221,7 +221,7 @@ if (!function_exists('run_site_probe')) {
|
|||
",
|
||||
dbesc($data->site_name),
|
||||
dbesc($data->version),
|
||||
dbesc(implode("\r\n", $data->plugins)),
|
||||
dbesc(implode("\r\n", $data->addons)),
|
||||
dbesc($data->register_policy),
|
||||
dbesc($data->info),
|
||||
dbesc($data->admin->name),
|
||||
|
|
|
@ -382,7 +382,7 @@ function health_details(App $a, $id)
|
|||
'$dt_first_noticed' => $site['dt_first_noticed'],
|
||||
'$dt_last_seen' => $site['dt_last_seen'],
|
||||
'$version' => $site['version'],
|
||||
'$plugins' => $site['plugins'],
|
||||
'$addons' => $site['addons'],
|
||||
'$reg_policy' => $site['reg_policy'],
|
||||
'$info' => $site['info'],
|
||||
'$admin_name' => $site['admin_name'],
|
||||
|
|
|
@ -58,28 +58,28 @@ function servers_content(&$a) {
|
|||
$site['users'] = $users;
|
||||
|
||||
//Figure out what this server supports.
|
||||
$plugins = explode("\r\n", $site['plugins']);
|
||||
$site['plugins'] = $plugins;
|
||||
$hasPlugin = function (array $input) use ($plugins) {
|
||||
return !!count(array_intersect($input, $plugins));
|
||||
$addons = explode("\r\n", $site['addons']);
|
||||
$site['addons'] = $addons;
|
||||
$hasAddon = function (array $input) use ($addons) {
|
||||
return !!count(array_intersect($input, $addons));
|
||||
};
|
||||
|
||||
$site['supports'] = array(
|
||||
'HTTPS' => $site['ssl_state'] == 1,
|
||||
'Twitter' => $hasPlugin(array('buffer', 'twitter')),
|
||||
'Facebook' => $hasPlugin(array('buffer')),
|
||||
'Google+' => $hasPlugin(array('buffer', 'gpluspost')),
|
||||
'Twitter' => $hasAddon(array('buffer', 'twitter')),
|
||||
'Facebook' => $hasAddon(array('buffer')),
|
||||
'Google+' => $hasAddon(array('buffer', 'gpluspost')),
|
||||
'RSS/Atom' => true, //Built-in.
|
||||
'Diaspora*' => $hasPlugin(array('diaspora')),
|
||||
'pump.io' => $hasPlugin(array('pumpio')),
|
||||
'StatusNet' => $hasPlugin(array('statusnet')),
|
||||
'Tumblr' => $hasPlugin(array('tumblr')),
|
||||
'Blogger' => $hasPlugin(array('blogger')),
|
||||
'Dreamwidth' => $hasPlugin(array('dwpost')),
|
||||
'Wordpress' => $hasPlugin(array('wppost')),
|
||||
'LiveJournal' => $hasPlugin(array('ljpost')),
|
||||
'Insanejournal' => $hasPlugin(array('ijpost')),
|
||||
'Libertree' => $hasPlugin(array('libertree'))
|
||||
'Diaspora*' => $hasAddon(array('diaspora')),
|
||||
'pump.io' => $hasAddon(array('pumpio')),
|
||||
'StatusNet' => $hasAddon(array('statusnet')),
|
||||
'Tumblr' => $hasAddon(array('tumblr')),
|
||||
'Blogger' => $hasAddon(array('blogger')),
|
||||
'Dreamwidth' => $hasAddon(array('dwpost')),
|
||||
'Wordpress' => $hasAddon(array('wppost')),
|
||||
'LiveJournal' => $hasAddon(array('ljpost')),
|
||||
'Insanejournal' => $hasAddon(array('ijpost')),
|
||||
'Libertree' => $hasAddon(array('libertree'))
|
||||
);
|
||||
|
||||
//Subset of the full support list, to show popular items.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
site_name
|
||||
version
|
||||
url
|
||||
plugins (arr)
|
||||
addons (arr)
|
||||
register_policy
|
||||
admin:
|
||||
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>';
|
||||
|
||||
|
||||
$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');
|
||||
|
||||
|
@ -40,7 +40,7 @@ function siteinfo_content(&$a) {
|
|||
$o .= '<td>' . t('Registration') . '</td>';
|
||||
$o .= '<td>' . t('Additional Info') . '</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('Record Updated (UTC)') . '</td>';
|
||||
$o .= '</tr>';
|
||||
|
@ -53,14 +53,14 @@ function siteinfo_content(&$a) {
|
|||
$o .= '<td>' . $policy[$rr['reg_policy']] . '</td>';
|
||||
$o .= '<td>' . $rr['info'] . '</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>' . $rr['updated'] . '</td>';
|
||||
$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)) {
|
||||
$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>' . $rr['info'] . '</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>' . $rr['updated'] . '</td>';
|
||||
$o .= '</tr>';
|
||||
|
@ -94,5 +94,4 @@ function siteinfo_content(&$a) {
|
|||
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ function updatesites_content(&$a) {
|
|||
else
|
||||
continue;
|
||||
if($j) {
|
||||
$plugs = (array) $j->plugins;
|
||||
$plugs = (array) $j->addons;
|
||||
if(in_array('testdrive',$plugs)) {
|
||||
$j->site_name = '!!! Test/Demo ONLY. !!! ' . $j->site_name;
|
||||
$j->info = 'Accounts are temporary, expiration is enabled. ' . $j->info;
|
||||
|
@ -25,9 +25,9 @@ function updatesites_content(&$a) {
|
|||
|
||||
q("UPDATE site set
|
||||
name = '%s',
|
||||
url = '%s',
|
||||
url = '%s',
|
||||
version = '%s',
|
||||
plugins = '%s',
|
||||
addons = '%s',
|
||||
reg_policy = '%s',
|
||||
info = '%s',
|
||||
admin_name = '%s',
|
||||
|
|
Loading…
Add table
Reference in a new issue