Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:xzilla/phppgadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
xzilla committed Jun 27, 2009
2 parents b3a4bc9 + b6b4a36 commit 86b61de
Show file tree
Hide file tree
Showing 20 changed files with 341 additions and 194 deletions.
9 changes: 1 addition & 8 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ Databases
Schemas (7.3)
-------------

* -Rename (xzilla)
* -Alter owner (ioguix)
* Alter ... SET SCHEMA support per 8.1


Expand Down Expand Up @@ -102,11 +100,6 @@ Views
Sequences
---------

* -Alter sequence (Guillaume LELARGE)
* -setval & nextval (Guillaume LELARGE)
* -change schema (ioguix)
* -rename (done using alter table) (ioguix)


Functions
---------
Expand Down Expand Up @@ -228,7 +221,7 @@ Miscellaneous
* Pull FAQ/HISTORY/CREDITS/etc... from CVS for website.
* Add support for csvlogs [8.3]
* Add executed file scripts in history

* support pg_kill_backend() [8.4]

Exotic
------
Expand Down
10 changes: 6 additions & 4 deletions aciur.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var asg = new Array();
var rasg = new Array();
var rasgc = new Array();
var iMoR = false;
var g_c_ns = "";
var g_c_tb = "";
var g_c_fk = "";
var g_c_sid = "";
Expand Down Expand Up @@ -57,7 +58,8 @@ function hKU(oEvent) {
}
}

function initac(tb,fk,sid,db,v) {
function initac(ns,tb,fk,sid,db,v) {
g_c_ns = ns;
g_c_tb = tb;
g_c_fk = fk;
g_c_sid = sid;
Expand Down Expand Up @@ -240,7 +242,7 @@ function dF(v) {
g_i_ac = document.getElementById(v).checked;
}

function makeAC(tx,n,tb,fk,sid,db) {
function makeAC(tx,n,ns,tb,fk,sid,db) {
otxb = document.getElementById(tx);
c_fac_c = n;
if(document.getElementById('no_ac').checked) {
Expand All @@ -254,7 +256,7 @@ function makeAC(tx,n,tb,fk,sid,db) {
otxb.onkeyup = function (oEvent) {
if (!oEvent) { oEvent = window.event; } hKU(oEvent);
};
initac(tb,fk,sid,db,v);
initac(ns, tb,fk,sid,db,v);
} else {
otxb.onkeyup = function() {};
}
Expand Down Expand Up @@ -291,7 +293,7 @@ function rS(tx) {

function SG1(s) {
if(!iMoR && s.length>0) {
pr("autocomplete.php","tb="+g_c_tb+"&database="+g_c_db+"&server="+g_c_sid+"&fk="+g_c_fk+"&v="+escapeHTML(s)+"");
pr("autocomplete.php","ns="+g_c_ns+"&tb="+g_c_tb+"&database="+g_c_db+"&server="+g_c_sid+"&fk="+g_c_fk+"&v="+escapeHTML(s)+"");
} else if(!s.length) {
hideAC();
}
Expand Down
3 changes: 2 additions & 1 deletion autocomplete.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php
include_once('libraries/lib.inc.php');
$data->clean($_REQUEST['tb']);
$data->clean($_REQUEST['ns']);
$data->clean($_REQUEST['fk']);
$data->clean($_REQUEST['v']);

// FIXME: At some point this should be schema qualified
$szSQL = 'SELECT * FROM "' . $_REQUEST['tb'] . '" WHERE "' . $_REQUEST['fk']
$szSQL = 'SELECT * FROM "' . $_REQUEST['ns'] . '"."' . $_REQUEST['tb'] . '" WHERE "' . $_REQUEST['fk']
. "\"::text LIKE '" . $_REQUEST['v'] . "%' ORDER BY \"". $_REQUEST['fk'] .'" LIMIT 11';

$objRes = $data->selectSet($szSQL);
Expand Down
27 changes: 22 additions & 5 deletions classes/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ function printVal($str, $type = null, $params = array()) {
}
break;
case 'bytea':
$tag = 'div';
$class = 'pre';
$out = $data->escapeBytea($str);
break;
case 'pre':
Expand Down Expand Up @@ -1000,10 +1002,10 @@ function getNavTabs($section) {
'title' => $lang['strrepsets'],
'url' => 'plugin_slony.php',
'urlvars' => array(
'subject' => 'slony_cluster',
'action' => 'sets_properties',
'slony_cluster' => field('slony_cluster')
),
'subject' => 'slony_cluster',
'action' => 'sets_properties',
'slony_cluster' => field('slony_cluster')
),
'branch' => 'sets',
'help' => '',
'icon' => 'ReplicationSets',
Expand All @@ -1015,8 +1017,23 @@ function getNavTabs($section) {
'properties' => array (
'title' => $lang['strcolprop'],
'url' => 'colproperties.php',
'urlvars' => array('subject' => 'column', 'table' => field('table'), 'column' => field('column')),
'urlvars' => array(
'subject' => 'column',
'table' => field('table'),
'column' => field('column')
),
'icon' => 'Column'
),
'privileges' => array (
'title' => $lang['strprivileges'],
'url' => 'privileges.php',
'urlvars' => array(
'subject' => 'column',
'table' => field('table'),
'column' => field('column')
),
'help' => 'pg.privilege',
'icon' => 'Privileges',
)
);

Expand Down
Loading

0 comments on commit 86b61de

Please sign in to comment.