* @param $return_desc The return link name
* @param $page The current page
*
- * $Id: display.php,v 1.55 2006/08/04 20:42:24 xzilla Exp $
+ * $Id: display.php,v 1.56 2007/01/02 19:04:27 soranzo Exp $
*/
// Prevent timeouts on large exports (non-safe mode only)
$nC = 0;
// A word of caution, the following does not support multicolumn FK's at the moment
while(!$constraints->EOF) {
- preg_match('/foreign key \((\w+)\) references ([\w]+)\((\w+)\)/i',$constraints->fields["consrc"],$matches);
+ preg_match('/foreign key \((\w+)\) references ([\w]+)\((\w+)\)/i', $constraints->fields["consrc"], $matches);
if(!empty($matches)) {
$arrayLocals[$nC] = $matches[1];
- $arrayRefs[$nC] = array($matches[2],$matches[3]);
+ $arrayRefs[$nC] = array($matches[2], $matches[3]);
$nC++;
}
$constraints->moveNext();
echo "<th class=\"data\">{$lang['strnull']}</th><th class=\"data\">{$lang['strvalue']}</th></tr>";
$i = 0;
- $nCC = 0;
while (!$attrs->EOF) {
$szValueName = "values[{$attrs->f['attname']}]";
$szEvents = "";
$szDivPH = "";
if($bAllowAC) {
- if(($idxFound = array_search($attrs->f['attname'],$arrayLocals))!==false) {
+ $idxFound = array_search($attrs->f['attname'], $arrayLocals);
+ // In PHP < 4.2.0 array_search returns NULL on failure
+ if ($idxFound !== NULL && $idxFound !== FALSE) {
$szEvent = "makeAC('{$szValueName}',{$i},'{$arrayRefs[$idxFound][0]}','{$arrayRefs[$idxFound][1]}','{$_REQUEST["server"]}','{$_REQUEST["database"]}');";
$szEvents = "onfocus=\"{$szEvent}\" onblur=\"hideAC();document.getElementById('ac_form').onsubmit=function(){return true;};\" onchange=\"{$szEvent}\" id=\"{$szValueName}\" onkeyup=\"{$szEvent}\" autocomplete=\"off\" class='ac_field'";
$szDivPH = "<div id=\"fac{$i}_ph\"></div>";
/**
* List tables in a database
*
- * $Id: tables.php,v 1.83 2007/01/02 17:24:44 soranzo Exp $
+ * $Id: tables.php,v 1.84 2007/01/02 19:04:27 soranzo Exp $
*/
// Include application functions
$nC = 0;
// A word of caution, the following does not support multicolumn FK's at the moment
while(!$constraints->EOF) {
- preg_match('/foreign key \((\w+)\) references ([\w]+)\((\w+)\)/i',$constraints->fields["consrc"],$matches);
+ preg_match('/foreign key \((\w+)\) references ([\w]+)\((\w+)\)/i', $constraints->fields["consrc"], $matches);
if(!empty($matches)) {
$arrayLocals[$nC] = $matches[1];
- $arrayRefs[$nC] = array($matches[2],$matches[3]);
+ $arrayRefs[$nC] = array($matches[2], $matches[3]);
$nC++;
}
$constraints->moveNext();
$szEvents = "";
$szDivPH = "";
if($bAllowAC) {
- if(($idxFound = array_search($attrs->f['attname'],$arrayLocals))!==false) {
+ $idxFound = array_search($attrs->f['attname'], $arrayLocals);
+ // In PHP < 4.2.0 array_search returns NULL on failure
+ if ($idxFound !== NULL && $idxFound !== FALSE) {
$szEvent = "makeAC('{$szValueName}',{$i},'{$arrayRefs[$idxFound][0]}','{$arrayRefs[$idxFound][1]}','{$_REQUEST["server"]}','{$_REQUEST["database"]}');";
$szEvents = "onfocus=\"{$szEvent}\" onblur=\"hideAC();document.getElementById('ac_form').onsubmit=function(){return true;};\" onchange=\"{$szEvent}\" id=\"{$szValueName}\" onkeyup=\"{$szEvent}\" autocomplete=\"off\" class='ac_field'";
$szDivPH = "<div id=\"fac{$i}_ph\"></div>";