Skip to content

Commit

Permalink
Remove old plugin architecture.
Browse files Browse the repository at this point in the history
Patch by Leonardo Sapiras, remerged by ioguix.

  * remove old plugin architecture
  * remove plugin Slony
  • Loading branch information
leonardosapiras authored and ioguix committed Aug 22, 2012
1 parent d5ee93d commit a524be7
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 5,433 deletions.
89 changes: 1 addition & 88 deletions classes/Misc.php
Expand Up @@ -374,18 +374,6 @@ function printVal($str, $type = null, $params = array()) {
}
}
break;
case 'slonystatus':
switch ($str) {
case 'insync':
$out = $lang['strhealthy'];
break;
case 'outofsync':
$out = $lang['stroutofsync'];
break;
default:
$out = $lang['strunknown'];
}
break;
default:
// If the string contains at least one instance of >1 space in a row, a tab
// character, a space at the start of a line, or a space at the start of
Expand Down Expand Up @@ -671,7 +659,7 @@ function printTabs($tabs, $activetab) {
* @param $section The name of the tab bar.
*/
function getNavTabs($section) {
global $data, $lang, $conf, $slony;
global $data, $lang, $conf;

$hide_advanced = ($conf['show_advanced'] === false);

Expand Down Expand Up @@ -849,14 +837,6 @@ function getNavTabs($section) {
'help' => 'pg.cast',
'icon' => 'Casts',
),
'slony' => array (
'title' => 'Slony',
'url' => 'plugin_slony.php',
'urlvars' => array('subject' => 'database', 'action' => 'clusters_properties'),
'hide' => !isset($slony),
'help' => '',
'icon' => 'Replication',
),
'export' => array (
'title' => $lang['strexport'],
'url' => 'database.php',
Expand Down Expand Up @@ -1159,46 +1139,6 @@ function getNavTabs($section) {
),
);

case 'slony_cluster':
return array (
'properties' => array (
'title' => $lang['strproperties'],
'url' => 'plugin_slony.php',
'urlvars' => array(
'subject' => 'slony_cluster',
'action' => 'cluster_properties',
'slony_cluster' => field('slony_cluster')
),
'help' => '',
'tree' => false,
'icon' => 'Cluster',
),
'nodes' => array (
'title' => $lang['strnodes'],
'url' => 'plugin_slony.php',
'urlvars' => array(
'subject' => 'slony_cluster',
'action' => 'nodes_properties',
'slony_cluster' => field('slony_cluster')
),
'branch' => 'nodes',
'help' => '',
'icon' => 'Nodes',
),
'sets' => array (
'title' => $lang['strrepsets'],
'url' => 'plugin_slony.php',
'urlvars' => array(
'subject' => 'slony_cluster',
'action' => 'sets_properties',
'slony_cluster' => field('slony_cluster')
),
'branch' => 'sets',
'help' => '',
'icon' => 'ReplicationSets',
),
);

case 'column':
return array(
'properties' => array (
Expand Down Expand Up @@ -1453,17 +1393,6 @@ function getTrail($subject = null) {
}
if ($subject == 'schema') $done = true;

if (isset($_REQUEST['slony_cluster']) && !$done) {
$trail['slony_cluster'] = array(
'title' => 'Slony Cluster',
'text' => $_REQUEST['slony_cluster'],
'url' => $this->getHREFSubject('slony_cluster'),
'help' => 'sl.cluster',
'icon' => 'Cluster'
);
}
if ($subject == 'slony_cluster') $done = true;

if (isset($_REQUEST['table']) && !$done) {
$trail['table'] = array(
'title' => $lang['strtable'],
Expand Down Expand Up @@ -1511,22 +1440,6 @@ function getTrail($subject = null) {
'icon' => 'Aggregate'
);
break;
case 'slony_node':
$trail[$subject] = array(
'title' => 'Slony Node',
'text' => $_REQUEST['no_name'],
'help' => 'sl.'.$subject,
'icon' => 'Node'
);
break;
case 'slony_set':
$trail[$subject] = array(
'title' => $lang['str'.$subject],
'text' => $_REQUEST[$subject],
'help' => 'sl.'.$subject,
'icon' => 'AvailableReplicationSet'
);
break;
case 'column':
$trail['column'] = array (
'title' => $lang['strcolumn'],
Expand Down
7 changes: 1 addition & 6 deletions classes/database/Postgres.php
Expand Up @@ -834,15 +834,10 @@ function getVariables() {
* @return All schemas, sorted alphabetically
*/
function getSchemas() {
global $conf, $slony;
global $conf;

if (!$conf['show_system']) {
$where = "WHERE nspname NOT LIKE 'pg@_%' ESCAPE '@' AND nspname != 'information_schema'";
if (isset($slony) && $slony->isEnabled()) {
$temp = $slony->slony_schema;
$this->clean($temp);
$where .= " AND nspname != '{$temp}'";
}

}
else $where = "WHERE nspname !~ '^pg_t(emp_[0-9]+|oast)$'";
Expand Down
8 changes: 1 addition & 7 deletions classes/database/Postgres80.php
Expand Up @@ -110,16 +110,10 @@ function getDatabases($currentdatabase = NULL) {
* @return All schemas, sorted alphabetically
*/
function getSchemas() {
global $conf, $slony;
global $conf;

if (!$conf['show_system']) {
$where = "WHERE nspname NOT LIKE 'pg@_%' ESCAPE '@' AND nspname != 'information_schema'";
if (isset($slony) && $slony->isEnabled()) {
$temp = $slony->slony_schema;
$this->clean($temp);
$where .= " AND nspname != '{$temp}'";
}

}
else $where = "WHERE nspname !~ '^pg_t(emp_[0-9]+|oast)$'";
$sql = "
Expand Down
30 changes: 0 additions & 30 deletions classes/plugins/Plugin.php

This file was deleted.

0 comments on commit a524be7

Please sign in to comment.