This is the general form for looping over a recordset:
-$rs = &$class->getResults();
+$rs = $class->getResults();
if (is_object($rs) && $rs->recordCount() > 0) {
while (!$rs->EOF) {
echo $rs->f['field'];
/**
* Manage aggregates in a database
*
- * $Id: aggregates.php,v 1.10 2004/09/20 14:41:38 jollytoad Exp $
+ * $Id: aggregates.php,v 1.10.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs('schema', 'aggregates');
$misc->printMsg($msg);
- $aggregates = &$data->getAggregates();
+ $aggregates = $data->getAggregates();
$columns = array(
'aggregate' => array(
/**
* Manage databases within a server
*
- * $Id: all_db.php,v 1.35 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: all_db.php,v 1.35.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
if (!isset($_POST['formSpc'])) $_POST['formSpc'] = '';
// Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo "<table>\n";
$misc->printTabs('server','databases');
$misc->printMsg($msg);
- $databases = &$data->getDatabases();
+ $databases = $data->getDatabases();
$columns = array(
'database' => array(
/**
* Manage casts in a database
*
- * $Id: casts.php,v 1.9 2004/09/01 16:35:57 jollytoad Exp $
+ * $Id: casts.php,v 1.9.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs('database','casts');
$misc->printMsg($msg);
- $casts = &$data->getcasts();
+ $casts = $data->getcasts();
$columns = array(
'source_type' => array(
* the functions provided by the database driver exclusively, and hence
* will work with any database without modification.
*
- * $Id: Reports.php,v 1.11.2.1 2005/07/31 09:18:39 chriskl Exp $
+ * $Id: Reports.php,v 1.11.2.2 2005/10/18 03:15:57 chriskl Exp $
*/
class Reports {
if ($rs->recordCount() != 1) $status = -1;
else {
// Create a new database access object.
- $this->driver = &$misc->getDatabaseAccessor($this->reports_db);
+ $this->driver = $misc->getDatabaseAccessor($this->reports_db);
// Reports database should have been created in public schema
if ($this->driver->hasSchemas()) $this->driver->setSchema('public');
$status = 0;
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.250.2.6 2005/08/12 01:39:57 chriskl Exp $
+ * $Id: Postgres.php,v 1.250.2.7 2005/10/18 03:15:58 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
// Owner
if ($this->hasAlterTableOwner() && $owner != '') {
// Fetch existing owner
- $data = &$this->getTable($table);
+ $data = $this->getTable($table);
if ($data->recordCount() != 1) {
$this->rollbackTransaction();
return -5;
// Tablespace
if ($this->hasTablespaces() && $tablespace != '') {
// Fetch existing tablespace
- $data = &$this->getTable($table);
+ $data = $this->getTable($table);
if ($data->recordCount() != 1) {
$this->rollbackTransaction();
return -5;
*/
function getTableDefPrefix($table, $clean = false) {
// Fetch table
- $t = &$this->getTable($table);
+ $t = $this->getTable($table);
if (!is_object($t) || $t->recordCount() != 1) {
$this->rollbackTransaction();
return null;
$this->fieldClean($t->f['relname']);
// Fetch attributes
- $atts = &$this->getTableAttributes($table);
+ $atts = $this->getTableAttributes($table);
if (!is_object($atts)) {
$this->rollbackTransaction();
return null;
}
// Fetch constraints
- $cons = &$this->getConstraints($table);
+ $cons = $this->getConstraints($table);
if (!is_object($cons)) {
$this->rollbackTransaction();
return null;
else {
switch ($cons->f['contype']) {
case 'p':
- $keys = &$this->getAttributeNames($table, explode(' ', $cons->f['indkey']));
+ $keys = $this->getAttributeNames($table, explode(' ', $cons->f['indkey']));
$sql .= "PRIMARY KEY (" . join(',', $keys) . ")";
break;
case 'u':
- $keys = &$this->getAttributeNames($table, explode(' ', $cons->f['indkey']));
+ $keys = $this->getAttributeNames($table, explode(' ', $cons->f['indkey']));
$sql .= "UNIQUE (" . join(',', $keys) . ")";
break;
default:
* You also need to make sure you don't dump inherited columns and defaults, as well
* as inherited NOT NULL and CHECK constraints. So for the time being, we just do
* not claim to support inheritance.
- $parents = &$this->getTableParents($table);
+ $parents = $this->getTableParents($table);
if ($parents->recordCount() > 0) {
$sql .= " INHERITS (";
while (!$parents->EOF) {
if ($col_comments_sql != '') $sql .= $col_comments_sql;
// Privileges
- $privs = &$this->getPrivileges($table, 'table');
+ $privs = $this->getPrivileges($table, 'table');
if (!is_array($privs)) {
$this->rollbackTransaction();
return null;
$sql = '';
// Indexes
- $indexes = &$this->getIndexes($table);
+ $indexes = $this->getIndexes($table);
if (!is_object($indexes)) {
$this->rollbackTransaction();
return null;
}
// Triggers
- $triggers = &$this->getTriggers($table);
+ $triggers = $this->getTriggers($table);
if (!is_object($triggers)) {
$this->rollbackTransaction();
return null;
}
// Rules
- $rules = &$this->getRules($table);
+ $rules = $this->getRules($table);
if (!is_object($rules)) {
$this->rollbackTransaction();
return null;
*/
function resetSequence($sequence) {
// Get the minimum value of the sequence
- $seq = &$this->getSequence($sequence);
+ $seq = $this->getSequence($sequence);
if ($seq->recordCount() != 1) return -1;
$minvalue = $seq->f[$this->sqFields['minvalue']];
*/
function dropOperator($operator_oid, $cascade) {
// Function comes in with $object as operator OID
- $opr = &$this->getOperator($operator_oid);
+ $opr = $this->getOperator($operator_oid);
$this->fieldClean($opr->f['oprname']);
$sql = "DROP OPERATOR {$opr->f['oprname']} (";
break;
case 'function':
// Function comes in with $object as function OID
- $fn = &$this->getFunction($object);
+ $fn = $this->getFunction($object);
$this->fieldClean($fn->f['proname']);
$sql .= " FUNCTION \"{$fn->f['proname']}\"({$fn->f['proarguments']})";
break;
*/
function dropFunction($function_oid, $cascade) {
// Function comes in with $object as function OID
- $fn = &$this->getFunction($function_oid);
+ $fn = $this->getFunction($function_oid);
$this->fieldClean($fn->f['proname']);
$sql = "DROP FUNCTION \"{$fn->f['proname']}\"({$fn->f['proarguments']})";
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres71.php,v 1.68.2.1 2005/07/31 09:18:39 chriskl Exp $
+ * $Id: Postgres71.php,v 1.68.2.2 2005/10/18 03:15:58 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
*/
function resetSequence($sequence) {
// Get the minimum value of the sequence
- $seq = &$this->getSequence($sequence);
+ $seq = $this->getSequence($sequence);
if ($seq->recordCount() != 1) return -1;
$minvalue = $seq->f['min_value'];
/**
* List constraints on a table
*
- * $Id: constraints.php,v 1.40 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: constraints.php,v 1.40.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
// because the table could be in another schema.
if ($data->hasSchemas())
$data->setSchema($_REQUEST['target']['schemaname']);
- $attrs = &$data->getTableAttributes($_REQUEST['target']['tablename']);
+ $attrs = $data->getTableAttributes($_REQUEST['target']['tablename']);
if ($data->hasSchemas())
$data->setSchema($_REQUEST['schema']);
$misc->printTitle($lang['straddfk'],'pg.constraint.foreign_key');
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
- $tables = &$data->getTables(true);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
+ $tables = $data->getTables(true);
$selColumns = new XHTML_select('TableColumnList', true, 10);
$selColumns->set_style('width: 10em;');
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
// Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
$selColumns = new XHTML_select('TableColumnList', true, 10);
function cnPre(&$rowdata) {
global $data, $lang;
if (is_null($rowdata->f['consrc'])) {
- $atts = &$data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->f['indkey']));
+ $atts = $data->getAttributeNames($_REQUEST['table'], explode(' ', $rowdata->f['indkey']));
$rowdata->f['+definition'] = ($rowdata->f['contype'] == 'u' ? "UNIQUE (" : "PRIMARY KEY (") . join(',', $atts) . ')';
} else {
$rowdata->f['+definition'] = $rowdata->f['consrc'];
$misc->printTabs('table','constraints');
$misc->printMsg($msg);
- $constraints = &$data->getConstraints($_REQUEST['table']);
+ $constraints = $data->getConstraints($_REQUEST['table']);
$columns = array(
'constraint' => array(
/**
* Manage conversions in a database
*
- * $Id: conversions.php,v 1.9 2004/09/01 16:35:58 jollytoad Exp $
+ * $Id: conversions.php,v 1.9.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs('schema', 'conversions');
$misc->printMsg($msg);
- $conversions = &$data->getconversions();
+ $conversions = $data->getconversions();
$columns = array(
'conversion' => array(
/**
* Manage schemas within a database
*
- * $Id: database.php,v 1.64.2.1 2004/11/29 04:52:31 chriskl Exp $
+ * $Id: database.php,v 1.64.2.2 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
// If a search term has been specified, then perform the search
// and display the results, grouped by object type
if ($_GET['term'] != '') {
- $rs = &$data->findObject($_GET['term'], $_GET['filter']);
+ $rs = $data->findObject($_GET['term'], $_GET['filter']);
if ($rs->recordCount() > 0) {
$curr = '';
while (!$rs->EOF) {
global $lang;
// Fetch the variables from the database
- $variables = &$data->getVariables();
+ $variables = $data->getVariables();
$misc->printTrail('database');
$misc->printTabs('database','variables');
global $lang;
// Fetch the processes from the database
- $processes = &$data->getProcesses($_REQUEST['database']);
+ $processes = $data->getProcesses($_REQUEST['database']);
$misc->printTrail('database');
$misc->printTabs('database','processes');
if (!isset($_POST['formComment'])) $_POST['formComment'] = '';
// Fetch all users from the database
- $users = &$data->getUsers();
+ $users = $data->getUsers();
$misc->printTrail('database');
$misc->printTitle($lang['strcreateschema'],'pg.schema.create');
// Check that the DB actually supports schemas
if ($data->hasSchemas()) {
- $schemas = &$data->getSchemas();
+ $schemas = $data->getSchemas();
$columns = array(
'schema' => array(
$misc->printTitle($lang['stralter'],'pg.schema.alter');
$misc->printMsg($msg);
- $schema = &$data->getSchemaByName($_REQUEST['schema']);
+ $schema = $data->getSchemaByName($_REQUEST['schema']);
if ($schema->recordCount() > 0) {
if (!isset($_POST['comment'])) $_POST['comment'] = $schema->f['nspcomment'];
if (!isset($_POST['schema'])) $_POST['schema'] = $_REQUEST['schema'];
* Does an export to the screen or as a download. This checks to
* see if they have pg_dump set up, and will use it if possible.
*
- * $Id: dataexport.php,v 1.17.2.3 2005/07/15 08:09:20 chriskl Exp $
+ * $Id: dataexport.php,v 1.17.2.4 2005/10/18 03:15:57 chriskl Exp $
*/
$extensions = array(
// Execute the query, if set, otherwise grab all rows from the table
if (isset($_REQUEST['table']))
- $rs = &$data->dumpRelation($_REQUEST['table'], $oids);
+ $rs = $data->dumpRelation($_REQUEST['table'], $oids);
else
$rs = $data->conn->Execute($_REQUEST['query']);
* @param $return_desc The return link name
* @param $page The current page
*
- * $Id: display.php,v 1.46.2.2 2005/03/04 02:32:44 chriskl Exp $
+ * $Id: display.php,v 1.46.2.3 2005/10/18 03:15:57 chriskl Exp $
*/
// Prevent timeouts
$misc->printTitle($lang['streditrow']);
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
- $rs = &$data->browseRow($_REQUEST['table'], $key);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
+ $rs = $data->browseRow($_REQUEST['table'], $key);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
$elements = 0;
}
// Retrieve page from query. $max_pages is returned by reference.
- $rs = &$data->browseQuery($type,
+ $rs = $data->browseQuery($type,
isset($object) ? $object : null,
isset($_REQUEST['query']) ? $_REQUEST['query'] : null,
$_REQUEST['sortkey'], $_REQUEST['sortdir'], $_REQUEST['page'],
/**
* Manage domains in a database
*
- * $Id: domains.php,v 1.19 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: domains.php,v 1.19.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printMsg($msg);
// Fetch domain info
- $domaindata = &$data->getDomain($_REQUEST['domain']);
+ $domaindata = $data->getDomain($_REQUEST['domain']);
// Fetch all users
- $users = &$data->getUsers();
+ $users = $data->getUsers();
if ($domaindata->recordCount() > 0) {
if (!isset($_POST['domname'])) {
$misc->printTitle($lang['strproperties'],'pg.domain');
$misc->printMsg($msg);
- $domaindata = &$data->getDomain($_REQUEST['domain']);
+ $domaindata = $data->getDomain($_REQUEST['domain']);
if ($domaindata->recordCount() > 0) {
// Show comment if any
// Display domain constraints
if ($data->hasDomainConstraints()) {
- $domaincons = &$data->getDomainConstraints($_REQUEST['domain']);
+ $domaincons = $data->getDomainConstraints($_REQUEST['domain']);
if ($domaincons->recordCount() > 0) {
echo "<h3>{$lang['strconstraints']}</h3>\n";
echo "<table>\n";
if (!isset($_POST['domdefault'])) $_POST['domdefault'] = '';
if (!isset($_POST['domcheck'])) $_POST['domcheck'] = '';
- $types = &$data->getTypes(true);
+ $types = $data->getTypes(true);
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatedomain'],'pg.domain.create');
$misc->printTabs('schema','domains');
$misc->printMsg($msg);
- $domains = &$data->getDomains();
+ $domains = $data->getDomains();
$columns = array(
'domain' => array(
/**
* Manage functions in a database
*
- * $Id: functions.php,v 1.47.2.2 2005/08/11 12:20:38 xzilla Exp $
+ * $Id: functions.php,v 1.47.2.3 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['stralter'],'pg.function.alter');
$misc->printMsg($msg);
- $fndata = &$data->getFunction($_REQUEST['function_oid']);
+ $fndata = $data->getFunction($_REQUEST['function_oid']);
if ($fndata->recordCount() > 0) {
$fndata->f['proretset'] = $data->phpBool($fndata->f['proretset']);
$misc->printTitle($lang['strproperties'],'pg.function');
$misc->printMsg($msg);
- $funcdata = &$data->getFunction($_REQUEST['function_oid']);
+ $funcdata = $data->getFunction($_REQUEST['function_oid']);
if ($funcdata->recordCount() > 0) {
// Deal with named parameters
if (!isset($_POST['formSetOf'])) $_POST['formSetOf'] = '';
if (!isset($_POST['formArray'])) $_POST['formArray'] = '';
- $types = &$data->getTypes(true, true, true);
- $langs = &$data->getLanguages(true);
+ $types = $data->getTypes(true, true, true);
+ $langs = $data->getLanguages(true);
$fnlang = strtolower($_POST['formLanguage']);
switch ($fnlang) {
$misc->printTabs('schema','functions');
$misc->printMsg($msg);
- $funcs = &$data->getFunctions();
+ $funcs = $data->getFunctions();
$columns = array(
'function' => array(
/**
* Manage groups in a database cluster
*
- * $Id: groups.php,v 1.19 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: groups.php,v 1.19.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['strproperties'],'pg.group');
$misc->printMsg($msg);
- $groupdata = &$data->getGroup($_REQUEST['group']);
- $users = &$data->getUsers();
+ $groupdata = $data->getGroup($_REQUEST['group']);
+ $users = $data->getUsers();
if ($groupdata->recordCount() > 0) {
echo "<table>\n";
if (!isset($_POST['members'])) $_POST['members'] = array();
// Fetch a list of all users in the cluster
- $users = &$data->getUsers();
+ $users = $data->getUsers();
$misc->printTrail('server');
$misc->printTitle($lang['strcreategroup'],'pg.group.create');
$misc->printTabs('server','groups');
$misc->printMsg($msg);
- $groups = &$data->getGroups();
+ $groups = $data->getGroups();
$columns = array(
'group' => array(
/**
* Help page redirection/browsing.
*
- * $Id: help.php,v 1.1 2004/09/07 13:57:26 jollytoad Exp $
+ * $Id: help.php,v 1.1.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
# TODO: Localize messages, improve (or remove) help browser
echo "<dl>\n";
- $pages =& $data->getHelpPages();
+ $pages = $data->getHelpPages();
foreach ($pages as $page => $dummy) {
echo "<dt>{$page}</dt>\n";
/**
* List indexes on a table
*
- * $Id: indexes.php,v 1.34 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: indexes.php,v 1.34.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
if (!isset($_POST['formWhere'])) $_POST['formWhere'] = '';
if (!isset($_POST['formSpc'])) $_POST['formSpc'] = '';
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
// Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
$misc->printTrail('table');
$misc->printTitle($lang['strcreateindex'],'pg.index.create');
$misc->printTabs('table','indexes');
$misc->printMsg($msg);
- $indexes = &$data->getIndexes($_REQUEST['table']);
+ $indexes = $data->getIndexes($_REQUEST['table']);
$columns = array(
'index' => array(
/**
* List extra information on a table
*
- * $Id: info.php,v 1.9 2004/09/01 16:35:58 jollytoad Exp $
+ * $Id: info.php,v 1.9.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$shownull = array('null' => true);
// Fetch info
- $referrers = &$data->getReferrers($_REQUEST['table']);
- $parents = &$data->getTableParents($_REQUEST['table']);
- $children = &$data->getTableChildren($_REQUEST['table']);
+ $referrers = $data->getReferrers($_REQUEST['table']);
+ $parents = $data->getTableParents($_REQUEST['table']);
+ $children = $data->getTableChildren($_REQUEST['table']);
if ($data->hasStatsCollector()) {
- $tablestatstups = &$data->getStatsTableTuples($_REQUEST['table']);
- $tablestatsio = &$data->getStatsTableIO($_REQUEST['table']);
- $indexstatstups = &$data->getStatsIndexTuples($_REQUEST['table']);
- $indexstatsio = &$data->getStatsIndexIO($_REQUEST['table']);
+ $tablestatstups = $data->getStatsTableTuples($_REQUEST['table']);
+ $tablestatsio = $data->getStatsTableIO($_REQUEST['table']);
+ $indexstatstups = $data->getStatsIndexTuples($_REQUEST['table']);
+ $indexstatsio = $data->getStatsIndexIO($_REQUEST['table']);
}
// Check that there is some info
/**
* Manage languages in a database
*
- * $Id: languages.php,v 1.7 2004/09/01 16:35:59 jollytoad Exp $
+ * $Id: languages.php,v 1.7.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs('database','languages');
$misc->printMsg($msg);
- $languages = &$data->getlanguages();
+ $languages = $data->getlanguages();
$columns = array(
'language' => array(
/**
* Manage opclasss in a database
*
- * $Id: opclasses.php,v 1.6 2004/09/01 16:35:59 jollytoad Exp $
+ * $Id: opclasses.php,v 1.6.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs('schema','opclasses');
$misc->printMsg($msg);
- $opclasses = &$data->getOpClasses();
+ $opclasses = $data->getOpClasses();
$columns = array(
'accessmethod' => array(
/**
* Manage operators in a database
*
- * $Id: operators.php,v 1.17 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: operators.php,v 1.17.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['strproperties'],'pg.operator');
$misc->printMsg($msg);
- $oprdata = &$data->getOperator($_REQUEST['operator_oid']);
+ $oprdata = $data->getOperator($_REQUEST['operator_oid']);
$oprdata->f['oprcanhash'] = $data->phpBool($oprdata->f['oprcanhash']);
if ($oprdata->recordCount() > 0) {
$misc->printTabs('schema','operators');
$misc->printMsg($msg);
- $operators = &$data->getOperators();
+ $operators = $data->getOperators();
$columns = array(
'operator' => array(
/**
* Manage privileges in a database
*
- * $Id: privileges.php,v 1.34.2.3 2005/08/11 12:43:06 xzilla Exp $
+ * $Id: privileges.php,v 1.34.2.4 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
if ($confirm) {
// Get users from the database
- $users = &$data->getUsers();
+ $users = $data->getUsers();
// Get groups from the database
- $groups = &$data->getGroups();
+ $groups = $data->getGroups();
$misc->printTrail($_REQUEST['subject']);
/**
* List reports in a database
*
- * $Id: reports.php,v 1.19 2004/09/02 13:53:56 jollytoad Exp $
+ * $Id: reports.php,v 1.19.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
global $PHP_SELF, $lang;
// If it's a first, load then get the data from the database
- $report = &$reportsdb->getReport($_REQUEST['report_id']);
+ $report = $reportsdb->getReport($_REQUEST['report_id']);
if ($_REQUEST['action'] == 'edit') {
$_POST['report_name'] = $report->f['report_name'];
$_POST['db_name'] = $report->f['db_name'];
}
// Get a list of available databases
- $databases = &$data->getDatabases();
+ $databases = $data->getDatabases();
$_REQUEST['report'] = $report->f['report_name'];
$misc->printTrail('report');
if (!isset($_REQUEST['descr'])) $_REQUEST['descr'] = '';
if (!isset($_REQUEST['report_sql'])) $_REQUEST['report_sql'] = '';
- $databases = &$data->getDatabases();
+ $databases = $data->getDatabases();
$misc->printTrail('server');
$misc->printTitle($lang['strcreatereport']);
if ($confirm) {
// Fetch report from the database
- $report = &$reportsdb->getReport($_REQUEST['report_id']);
+ $report = $reportsdb->getReport($_REQUEST['report_id']);
$_REQUEST['report'] = $report->f['report_name'];
$misc->printTrail('report');
$misc->printTitle($lang['strreports']);
$misc->printMsg($msg);
- $reports = &$reportsdb->getReports();
+ $reports = $reportsdb->getReports();
$columns = array(
'report' => array(
/**
* List rules on a table OR view
*
- * $Id: rules.php,v 1.24 2004/09/28 13:08:39 jollytoad Exp $
+ * $Id: rules.php,v 1.24.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTabs($_REQUEST['subject'], 'rules');
$misc->printMsg($msg);
- $rules = &$data->getRules($_REQUEST[$_REQUEST['subject']]);
+ $rules = $data->getRules($_REQUEST[$_REQUEST['subject']]);
$columns = array(
'rule' => array(
/**
* Manage sequences in a database
*
- * $Id: sequences.php,v 1.27 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: sequences.php,v 1.27.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printMsg($msg);
// Get all sequences
- $sequences = &$data->getSequences();
+ $sequences = $data->getSequences();
$columns = array(
'sequence' => array(
$misc->printMsg($msg);
// Fetch the sequence information
- $sequence = &$data->getSequence($_REQUEST['sequence']);
+ $sequence = $data->getSequence($_REQUEST['sequence']);
if (is_object($sequence) && $sequence->recordCount() > 0) {
$sequence->f['is_cycled'] = $data->phpBool($sequence->f['is_cycled']);
/**
* Alternative SQL editing window
*
- * $Id: sqledit.php,v 1.25 2004/09/30 16:32:05 jollytoad Exp $
+ * $Id: sqledit.php,v 1.25.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
global $data, $lang, $conf, $action, $misc;
// Get the list of all databases
- $databases = &$data->getDatabases();
+ $databases = $data->getDatabases();
if ($databases->recordCount() > 0) {
// The javascript action on the select box reloads the popup whenever the database is changed.
/**
* List tables in a database
*
- * $Id: tables.php,v 1.68 2004/10/11 10:29:15 jollytoad Exp $
+ * $Id: tables.php,v 1.68.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
switch ($_REQUEST['stage']) {
case 1:
// Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces();
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces();
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatetable'], 'pg.table.create');
return;
}
- $types = &$data->getTypes(true, false, true);
+ $types = $data->getTypes(true, false, true);
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatetable'], 'pg.table.create');
$misc->printTitle($lang['strselect'], 'pg.sql.select');
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
echo "<form action=\"$PHP_SELF\" method=\"post\" name=\"selectform\">\n";
if ($attrs->recordCount() > 0) {
$misc->printTitle($lang['strinsertrow'], 'pg.sql.insert');
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
if ($attrs->recordCount() > 0) {
$misc->printTabs('schema','tables');
$misc->printMsg($msg);
- $tables = &$data->getTables();
+ $tables = $data->getTables();
$columns = array(
'table' => array(
/**
* Manage tablespaces in a database cluster
*
- * $Id: tablespaces.php,v 1.6 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: tablespaces.php,v 1.6.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printMsg($msg);
// Fetch tablespace info
- $tablespace = &$data->getTablespace($_REQUEST['tablespace']);
+ $tablespace = $data->getTablespace($_REQUEST['tablespace']);
// Fetch all users
- $users = &$data->getUsers();
+ $users = $data->getUsers();
if ($tablespace->recordCount() > 0) {
if (!isset($_POST['formLoc'])) $_POST['formLoc'] = '';
// Fetch all users
- $users = &$data->getUsers();
+ $users = $data->getUsers();
$misc->printTrail('server');
$misc->printTitle($lang['strcreatetablespace'],'pg.tablespace.create');
$misc->printTabs('server','tablespaces');
$misc->printMsg($msg);
- $tablespaces = &$data->getTablespaces();
+ $tablespaces = $data->getTablespaces();
$columns = array(
'database' => array(
/**
* List tables in a database
*
- * $Id: tblproperties.php,v 1.62 2004/11/02 03:33:35 chriskl Exp $
+ * $Id: tblproperties.php,v 1.62.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printMsg($msg);
// Fetch table info
- $table = &$data->getTable($_REQUEST['table']);
+ $table = $data->getTable($_REQUEST['table']);
// Fetch all users
- $users = &$data->getUsers();
+ $users = $data->getUsers();
// Fetch all tablespaces from the database
- if ($data->hasTablespaces()) $tablespaces = &$data->getTablespaces(true);
+ if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(true);
if ($table->recordCount() > 0) {
if (!isset($_POST['comment'])) $_POST['comment'] = '';
// Fetch all available types
- $types = &$data->getTypes(true, false, true);
+ $types = $data->getTypes(true, false, true);
$misc->printTrail('table');
$misc->printTitle($lang['straddcolumn'], 'pg.column.add');
}
echo "<th class=\"data\">{$lang['strnotnull']}</th><th class=\"data\">{$lang['strdefault']}</th><th class=\"data\">{$lang['strcomment']}</th></tr>";
- $column = &$data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']);
+ $column = $data->getTableAttributes($_REQUEST['table'], $_REQUEST['column']);
$column->f['attnotnull'] = $data->phpBool($column->f['attnotnull']);
// Upon first drawing the screen, load the existing column information
// Column type
if ($data->hasAlterColumnType()) {
// Fetch all available types
- $types = &$data->getTypes(true, false, true);
+ $types = $data->getTypes(true, false, true);
echo "<td><select name=\"type\">\n";
// Output any "magic" types. This came in with Alter Column Type so we don't need to check that
$misc->printMsg($msg);
// Get table
- $tdata = &$data->getTable($_REQUEST['table']);
+ $tdata = $data->getTable($_REQUEST['table']);
// Get columns
- $attrs = &$data->getTableAttributes($_REQUEST['table']);
+ $attrs = $data->getTableAttributes($_REQUEST['table']);
// Show comment if any
if ($tdata->f['relcomment'] !== null)
/**
* List triggers on a table
*
- * $Id: triggers.php,v 1.24 2004/09/28 13:09:31 jollytoad Exp $
+ * $Id: triggers.php,v 1.24.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['stralter'],'pg.trigger.alter');
$misc->printMsg($msg);
- $triggerdata = &$data->getTrigger($_REQUEST['table'], $_REQUEST['trigger']);
+ $triggerdata = $data->getTrigger($_REQUEST['table'], $_REQUEST['trigger']);
if ($triggerdata->recordCount() > 0) {
$misc->printMsg($msg);
// Get all the functions that can be used in triggers
- $funcs = &$data->getTriggerFunctions();
+ $funcs = $data->getTriggerFunctions();
if ($funcs->recordCount() == 0) {
doDefault($lang['strnofunctions']);
return;
elseif ($_POST['formEvent'] == '')
doCreate();
else {
- $status = &$data->createTrigger($_POST['formTriggerName'], $_POST['table'],
+ $status = $data->createTrigger($_POST['formTriggerName'], $_POST['table'],
$_POST['formFunction'], $_POST['formExecTime'], $_POST['formEvent'],
$_POST['formTriggerArgs']);
if ($status == 0)
$misc->printTabs('table','triggers');
$misc->printMsg($msg);
- $triggers = &$data->getTriggers($_REQUEST['table']);
+ $triggers = $data->getTriggers($_REQUEST['table']);
$columns = array(
'trigger' => array(
/**
* Manage types in a database
*
- * $Id: types.php,v 1.25.2.1 2005/03/14 11:08:46 jollytoad Exp $
+ * $Id: types.php,v 1.25.2.2 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
global $PHP_SELF, $lang;
// Get type (using base name)
- $typedata = &$data->getType($_REQUEST['type']);
+ $typedata = $data->getType($_REQUEST['type']);
$misc->printTrail('type');
$misc->printTitle($lang['strproperties'], 'pg.type');
if ($typedata->recordCount() > 0) {
switch ($typedata->f['typtype']) {
case 'c':
- $attrs = &$data->getTableAttributes($_REQUEST['type']);
+ $attrs = $data->getTableAttributes($_REQUEST['type']);
$columns = array(
'field' => array(
return;
}
- $types = &$data->getTypes(true, false, true);
+ $types = $data->getTypes(true, false, true);
$misc->printTrail('type');
$misc->printTitle($lang['strcreatecomptype'], 'pg.type.create');
if (!isset($_POST['typstorage'])) $_POST['typstorage'] = $data->typStorageDef;
// Retrieve all functions and types in the database
- $funcs = &$data->getFunctions(true);
- $types = &$data->getTypes(true);
+ $funcs = $data->getFunctions(true);
+ $types = $data->getTypes(true);
$misc->printTrail('schema');
$misc->printTitle($lang['strcreatetype'], 'pg.type.create');
$misc->printTabs('schema','types');
$misc->printMsg($msg);
- $types = &$data->getTypes();
+ $types = $data->getTypes();
$columns = array(
'type' => array(
/**
* Manage users in a database cluster
*
- * $Id: users.php,v 1.29 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: users.php,v 1.29.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
global $data, $misc;
global $PHP_SELF, $lang;
- $userdata = &$data->getUser($_SESSION['webdbUsername']);
+ $userdata = $data->getUser($_SESSION['webdbUsername']);
$_REQUEST['user'] = $_SESSION['webdbUsername'];
$misc->printTrail('user');
$misc->printTitle($lang['stralter'],'pg.user.alter');
$misc->printMsg($msg);
- $userdata = &$data->getUser($_REQUEST['username']);
+ $userdata = $data->getUser($_REQUEST['username']);
if ($userdata->recordCount() > 0) {
$canRename = $data->hasUserRename() && ($_REQUEST['username'] != $_SESSION['webdbUsername']);
$misc->printTabs('server','users');
$misc->printMsg($msg);
- $users = &$data->getUsers();
+ $users = $data->getUsers();
$columns = array(
'user' => array(
/**
* List views in a database
*
- * $Id: viewproperties.php,v 1.13 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: viewproperties.php,v 1.13.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['stredit'],'pg.view.alter');
$misc->printMsg($msg);
- $viewdata = &$data->getView($_REQUEST['view']);
+ $viewdata = $data->getView($_REQUEST['view']);
if ($viewdata->recordCount() > 0) {
global $PHP_SELF, $lang;
// Get view
- $vdata = &$data->getView($_REQUEST['view']);
+ $vdata = $data->getView($_REQUEST['view']);
$misc->printTrail('view');
$misc->printTabs('view','definition');
echo "<tr><th class=\"data required\">{$lang['strname']}</th><th class=\"data required\">{$lang['strtype']}</th>";
echo "<th class=\"data\">{$lang['strdefault']}</th><th class=\"data\">{$lang['strcomment']}</th></tr>";
- $column = &$data->getTableAttributes($_REQUEST['view'], $_REQUEST['column']);
+ $column = $data->getTableAttributes($_REQUEST['view'], $_REQUEST['column']);
if (!isset($_REQUEST['default'])) {
$_REQUEST['field'] = $column->f['attname'];
$misc->printMsg($msg);
// Get view
- $vdata = &$data->getView($_REQUEST['view']);
+ $vdata = $data->getView($_REQUEST['view']);
// Get columns (using same method for getting a view)
- $attrs = &$data->getTableAttributes($_REQUEST['view']);
+ $attrs = $data->getTableAttributes($_REQUEST['view']);
// Show comment if any
if ($vdata->f['relcomment'] !== null)
/**
* Manage views in a database
*
- * $Id: views.php,v 1.51 2004/09/07 13:58:21 jollytoad Exp $
+ * $Id: views.php,v 1.51.2.1 2005/10/18 03:15:57 chriskl Exp $
*/
// Include application functions
$misc->printTitle($lang['strselect'], 'pg.sql.select');
$misc->printMsg($msg);
- $attrs = &$data->getTableAttributes($_REQUEST['view']);
+ $attrs = $data->getTableAttributes($_REQUEST['view']);
echo "<form action=\"$PHP_SELF\" method=\"get\" name=\"selectform\">\n";
if ($attrs->recordCount() > 0) {
$data->setSchema($arrSelTables[$i]['schemaname']);
}
- $attrs = &$data->getTableAttributes($arrSelTables[$i]['tablename']);
+ $attrs = $data->getTableAttributes($arrSelTables[$i]['tablename']);
while (!$attrs->EOF) {
if ($data->hasSchemas() ) {
$arrFields["{$arrSelTables[$i]['schemaname']}.{$arrSelTables[$i]['tablename']}.{$attrs->f['attname']}"] = serialize(array('schemaname' => $arrSelTables[$i]['schemaname'], 'tablename' => $arrSelTables[$i]['tablename'], 'fieldname' => $attrs->f['attname']) );
global $data, $misc;
global $PHP_SELF, $lang;
- $tables = &$data->getTables(true);
+ $tables = $data->getTables(true);
$misc->printTrail('schema');
$misc->printTitle($lang['strcreateviewwiz'], 'pg.view.create');
$misc->printTabs('schema','views');
$misc->printMsg($msg);
- $views = &$data->getViews();
+ $views = $data->getViews();
$columns = array(
'view' => array(