|
From: <ken...@us...> - 2008-11-17 14:56:39
|
Revision: 893
http://andro.svn.sourceforge.net/andro/?rev=893&view=rev
Author: kendowns
Date: 2008-11-17 14:56:33 +0000 (Mon, 17 Nov 2008)
Log Message:
-----------
Dispsize is now supported at column and table level, not just type.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-11-17 14:55:21 UTC (rev 892)
+++ trunk/andro/application/androBuild.php 2008-11-17 14:56:33 UTC (rev 893)
@@ -1667,7 +1667,12 @@
then c.uisearch_ignore_dash
else t.uisearch_ignore_dash end as uisearch_ignore_dash
,tc.uisearchsort
- ,t.formula,t.formshort,t.dispsize
+ ,t.formula,t.formshort
+ ,case when COALESCE(tc.dispsize,'')<>''
+ THEN tc.dispsize
+ WHEN COALESCE(c.dispsize ,'')<>''
+ THEN c.dispsize
+ ELSE t.dispsize END
FROM zdd.tabcol tc
JOIN zdd.columns c ON tc.column_id_src = c.column_id
JOIN zdd.type_exps t ON c.type_id = t.type_id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2008-11-20 22:39:10
|
Revision: 897
http://andro.svn.sourceforge.net/andro/?rev=897&view=rev
Author: dorgan1983
Date: 2008-11-20 22:39:07 +0000 (Thu, 20 Nov 2008)
Log Message:
-----------
fix to sum with offset and limit so that null does not get returned.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-11-20 15:24:35 UTC (rev 896)
+++ trunk/andro/application/androBuild.php 2008-11-20 22:39:07 UTC (rev 897)
@@ -4463,7 +4463,7 @@
$sqlints
IF --COALESCE--MATCH-- THEN
UPDATE $table_par SET $column_par=(
- SELECT SUM(x1.$column_chd) FROM (
+ SELECT COALESCE(SUM(x1.$column_chd),0) FROM (
SELECT $column_chd
FROM $table_chd
WHERE --MATCH--CHD--
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2008-12-11 21:23:28
|
Revision: 942
http://andro.svn.sourceforge.net/andro/?rev=942&view=rev
Author: kendowns
Date: 2008-12-11 21:23:24 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
BUG FIX: auto_suffix and auto_prefix were not get picked up in the table definition.
SMALL CHANGE: Error on trying to build FETCH/DISTRIBUTE now halts build.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-12-10 05:40:46 UTC (rev 941)
+++ trunk/andro/application/androBuild.php 2008-12-11 21:23:24 UTC (rev 942)
@@ -1638,6 +1638,7 @@
$sq="INSERT INTO zdd.tabflat (
table_id,column_id_src,column_id,suffix,prefix
,primary_key,uisearch
+ ,auto_prefix,auto_suffix
,colprec,colscale,colres,type_id,inputmask
,flagcarry
,table_id_fko
@@ -1648,6 +1649,7 @@
'$table_id',tc.column_id_src
,tc.column_id
,tc.suffix,tc.prefix,tc.primary_key,tc.uisearch
+ ,tc.auto_prefix,tc.auto_suffix
,c.colprec,c.colscale,c.colres,c.type_id
,case when c.inputmask <> ''
then c.inputmask
@@ -4052,7 +4054,7 @@
function SpecDDL_Triggers_Automated() {
$retval = true;
- $this->SpecDDL_Triggers_Automated_FetchDistribute();
+ $retval = $retval && $this->SpecDDL_Triggers_Automated_FetchDistribute();
$retval = $retval && $this->SpecDDL_Triggers_Automated_Aggregate();
$retval = $retval && $this->specddl_triggers_automated_queuepos();
$retval = $retval && $this->specddl_triggers_automated_dominant();
@@ -4121,9 +4123,8 @@
$dddst[$tpi][$row['table_id']][]=$details;
}
}
+
-
-
// NOTE: FETCH and EXTEND columns are sequenced on dependencies, as
// one EXTEND may generate the foreign key for the next FETCH. This
// system goes column-by-column. However, we use just one column
@@ -4356,6 +4357,7 @@
}
}
}
+ return true;
}
function SpecDDL_Triggers_Automated_Aggregate() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2008-12-19 14:37:51
|
Revision: 952
http://andro.svn.sourceforge.net/andro/?rev=952&view=rev
Author: kendowns
Date: 2008-12-19 14:37:47 +0000 (Fri, 19 Dec 2008)
Log Message:
-----------
Two changes:
1) Added "spaceafter" property to tables and menu entries. On x6, this produces a horizontal rule in the menu, allowing menu entries to be broken up into groups.
2) Added all table properties to the PHP data dictionary for child and parent tables. This means $dd['fk_children'][$table] will contain all properties of the parent table.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-12-11 21:32:50 UTC (rev 951)
+++ trunk/andro/application/androBuild.php 2008-12-19 14:37:47 UTC (rev 952)
@@ -8803,39 +8803,48 @@
$results = $this->SQLRead($sql);
if ($resall = pg_fetch_all($results)) {
foreach ($resall as $row) {
- // Get row and trim it down a little
- $rowx = $this->zzArrayAssociative($row);
- if(array_key_exists('skey_quiet',$rowx)) unset($rowx['skey_quiet']);
- if(array_key_exists('skey' ,$rowx)) unset($rowx['skey']);
- if(array_key_exists('_agg' ,$rowx)) unset($rowx['_agg']);
- if(array_key_exists('skey_hn' ,$rowx)) unset($rowx['skey_hn']);
- if(array_key_exists('skey_s' ,$rowx)) unset($rowx['skey_s']);
-
- // Get the "colsboth", we'll need that
- $fk=$table_id.'_'.Trim($rowx[$col2]).'_'.trim($row['suffix']);
- if(isset($this->ufks[$fk])) {
- $ufk=$this->ufks[$fk];
- $rowx['cols_chd'] = $ufk['cols_chd'];
- $rowx['cols_par'] = $ufk['cols_par'];
- $rowx['cols_both'] = $ufk['cols_both'];
- $rowx['fkdisplay'] = $this->utabs[$rowx[$col2]]['fkdisplay'];
- }
- else {
- $rowx['cols_chd'] = 'X';
- $rowx['cols_par'] = 'X';
- $rowx['cols_both'] = 'X';
- $rowx['fkdisplay'] = '';
- }
-
- $utab = $this->utabs[$row[$col2]];
- $rowx['description'] = $utab['description'];
- $rowx['module'] = $utab['module'];
-
-
-
- // Establish key and save
- $key = $rowx["prefix"].$rowx[$col2].$rowx["suffix"];
- $retval[$key] = $rowx;
+ // Get row and trim it down a little
+ $rowx = $this->zzArrayAssociative($row);
+ # KFD 12/13/08, add all properties of parent/child table
+ # to listing
+ foreach($this->utabs[$row[$col2]] as $key=>$value) {
+ if(!is_array($value)) {
+ $rowx[$key] = $value;
+ }
+ }
+ # KFD 12/13/08 (END)
+ if(array_key_exists('skey_quiet',$rowx)) unset($rowx['skey_quiet']);
+ if(array_key_exists('skey' ,$rowx)) unset($rowx['skey']);
+ if(array_key_exists('_agg' ,$rowx)) unset($rowx['_agg']);
+ if(array_key_exists('skey_hn' ,$rowx)) unset($rowx['skey_hn']);
+ if(array_key_exists('skey_s' ,$rowx)) unset($rowx['skey_s']);
+
+ // Get the "colsboth", we'll need that
+ $fk=$table_id.'_'.Trim($rowx[$col2]).'_'.trim($row['suffix']);
+ if(isset($this->ufks[$fk])) {
+ $ufk=$this->ufks[$fk];
+ $rowx['cols_chd'] = $ufk['cols_chd'];
+ $rowx['cols_par'] = $ufk['cols_par'];
+ $rowx['cols_both'] = $ufk['cols_both'];
+ $rowx['fkdisplay'] = $this->utabs[$rowx[$col2]]['fkdisplay'];
+ }
+ else {
+ $rowx['cols_chd'] = 'X';
+ $rowx['cols_par'] = 'X';
+ $rowx['cols_both'] = 'X';
+ $rowx['fkdisplay'] = '';
+ }
+
+
+ $utab = $this->utabs[$row[$col2]];
+ $rowx['description'] = $utab['description'];
+ $rowx['module'] = $utab['module'];
+
+
+
+ // Establish key and save
+ $key = $rowx["prefix"].$rowx[$col2].$rowx["suffix"];
+ $retval[$key] = $rowx;
}
}
@@ -8856,6 +8865,7 @@
,t.nomenu,'N' as menuins
,t.linknew,t.linksearch
,'' as menu_parms
+ ,t.spaceafter
,t.uix2 as uix2
FROM zdd.modules m
JOIN zdd.tables t ON t.module = m.module
@@ -8867,6 +8877,7 @@
,'N' as nomenu,'N' as menuins
,'N' as linknew,'N' as linksearch
,u.menu_parms
+ ,u.spaceafter
,u.uix2
FROM zdd.modules m
JOIN zdd.uimenu u ON m.module = u.module
@@ -8898,6 +8909,7 @@
"#linknew#=>#".$row["linknew"]."#,".
"#linksearch#=>#".$row["linksearch"]."#,".
'#uix2#=>#'.$row['uix2']."#,".
+ '#spaceafter#=>#'.$row['spaceafter'].'#,'.
"#mode#=>#normal#);\n";
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2008-12-21 02:08:00
|
Revision: 974
http://andro.svn.sourceforge.net/andro/?rev=974&view=rev
Author: kendowns
Date: 2008-12-21 02:07:58 +0000 (Sun, 21 Dec 2008)
Log Message:
-----------
1) Corrected glitch in PHP dd generation that was not putting projection column in order
2) Amazing nifty feature: you can now put projections into configapp_extra, and they will be put over into configapp. This lets us use the "onerow" x6 profile for application configuration.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-12-19 14:55:22 UTC (rev 973)
+++ trunk/andro/application/androBuild.php 2008-12-21 02:07:58 UTC (rev 974)
@@ -1948,7 +1948,20 @@
WHERE x.table_id = 'configapp'
AND x.column_id= zdd.tabflat.column_id)"
);
+ $this->SQL("
+ insert into zdd.tabproj (projection,table_id)
+ select projection,'configapp'
+ from zdd.tabproj
+ where zdd.tabproj.table_id = 'configapp_extra'"
+ );
+ $this->SQL("
+ insert into zdd.tabprojcols (projection,table_id,column_id)
+ select projection,'configapp',column_id
+ from zdd.tabprojcols
+ where zdd.tabprojcols.table_id = 'configapp_extra'"
+ );
+
# Define the sql
$sq="INSERT INTO zdd.tabflat (table_id,$colslist)
SELECT '*TABLEDEST*',$colslist
@@ -8743,7 +8756,7 @@
" FROM zdd.tabprojcols p ".
" JOIN zdd.tabflat f ON p.table_id=f.table_id AND p.column_id = f.column_id ".
" WHERE p.table_id = '$table_id' ".
- " ORDER BY p.uicolseq ");
+ " ORDER BY f.uicolseq ");
while ($row = pg_fetch_array($results)) {
$p = trim($row["projection"]);
if (!isset($table["projections"][$p])) $table["projections"][$p]="";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2008-12-24 04:00:24
|
Revision: 990
http://andro.svn.sourceforge.net/andro/?rev=990&view=rev
Author: kendowns
Date: 2008-12-24 04:00:20 +0000 (Wed, 24 Dec 2008)
Log Message:
-----------
Added some error trapping.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2008-12-24 03:53:30 UTC (rev 989)
+++ trunk/andro/application/androBuild.php 2008-12-24 04:00:20 UTC (rev 990)
@@ -1019,7 +1019,15 @@
// Now use $keyword to get table name we will insert into
//$this->LogEntry("$parent_prefix - $keyword");
- $table = $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["table"];
+ if(!isset($this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["table"])) {
+ echo ">> ERROR <br/>";
+ echo ">> Invalide keyword combination<br/>";
+ echo "Parent prefix is: $parent_prefix<br/>";
+ echo "Keyword is $keyword<br/>";
+ print_r($arr);
+ return false;
+ }
+ $table= $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["table"];
$pkcolname = $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["keycol"];
$keystub = $this->zzArray($this->ddarr["meta"]["keyword"][$parent_prefix.$keyword],"keystub");
//echo "TABLE is $table, pk and keystub are $pkcolname and $keystub <br>";
@@ -1337,6 +1345,7 @@
$this->LogEntry("");
$this->LogEntry("ERROR >> Table ".$row["table_id"]." names");
$this->LogEntry("ERROR >> undefined column ".$row['column_id_src']);
+ $this->LogEntry("ERROR >> Perhaps you missed a prefix or suffix?");
}
// Make sure all foreign key definitions name real tables.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-05 15:22:05
|
Revision: 1043
http://andro.svn.sourceforge.net/andro/?rev=1043&view=rev
Author: kendowns
Date: 2009-01-05 15:21:55 +0000 (Mon, 05 Jan 2009)
Log Message:
-----------
1) Added "breakafter" to column definitions, used by x6 profile "conventional" to specify when to skip a line or go to new column.
2) The dd<table>.php file now lists child tables in the same order as the menu, so that child tabs on the "conventional" profile will appear in logical order instead of randomly.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-01 01:09:46 UTC (rev 1042)
+++ trunk/andro/application/androBuild.php 2009-01-05 15:21:55 UTC (rev 1043)
@@ -1649,7 +1649,7 @@
,primary_key,uisearch
,auto_prefix,auto_suffix
,colprec,colscale,colres,type_id,inputmask
- ,flagcarry,x6view
+ ,flagcarry,x6view,x6breakafter
,table_id_fko
,fkioffset,fkilimit,table_id_fki
,uicolseq,uisearch_ignore_dash,uisearchsort
@@ -1674,6 +1674,7 @@
,case when coalesce(tc.x6view,'') <> ''
then tc.x6view
else c.x6view end
+ ,tc.x6breakafter
,COALESCE(tc.table_id_fko,'') as table_id_fko
,tc.fkioffset,tc.fkilimit,tc.table_id_fki
,trim(uicolseq)
@@ -8934,7 +8935,7 @@
" JOIN zdd.tabflat f ON p.table_id=f.table_id ".
" AND p.column_id = f.column_id ".
" WHERE p.table_id = '$table_id' ".
- " ORDER BY f.uicolseq ");
+ " ORDER BY p.uicolseq ");
while ($row = pg_fetch_array($results)) {
$p = trim($row["projection"]);
if (!isset($table["projections"][$p])) $table["projections"][$p]="";
@@ -8989,11 +8990,17 @@
// The other foreign key column
$col2 = ($column_id=="table_id") ? "table_id_par" : "table_id";
- // First the basic foreign key
- $sql =
- "SELECT * ".
- " FROM zdd.tabfky ".
- " WHERE ".$column_id ."= '".$table_id."'";
+ # KFD 1/2/08, change to sort by module/table
+ #$sql =
+ # "SELECT * ".
+ # " FROM zdd.tabfky ".
+ # " WHERE ".$column_id ."= '".$table_id."'";
+ $sql="select fk.*
+ from zdd.tabfky fk
+ join zdd.tables t on t.table_id = fk.table_id
+ join zdd.modules m on t.module = m.module
+ where fk.$column_id = '$table_id'
+ order by m.uisort,t.uisort";
$results = $this->SQLRead($sql);
if ($resall = pg_fetch_all($results)) {
foreach ($resall as $row) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-12 17:57:03
|
Revision: 1074
http://andro.svn.sourceforge.net/andro/?rev=1074&view=rev
Author: kendowns
Date: 2009-01-12 17:56:55 +0000 (Mon, 12 Jan 2009)
Log Message:
-----------
Small fix to make sure we get rows in configinst,configapp and configfw.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-12 15:37:52 UTC (rev 1073)
+++ trunk/andro/application/androBuild.php 2009-01-12 17:56:55 UTC (rev 1074)
@@ -7736,7 +7736,15 @@
);
if($count[0]['cnt']==0) {
$this->LogEntry("Adding a row to $table_id");
- $this->SQL("insert into $table_id (skey_quiet) values ('Y')");
+ if($table_id == 'configfw') {
+ $this->SQL("insert into $table_id (skey_quiet) values ('Y')");
+ }
+ else {
+ $this->SQL(
+ "insert into $table_id (description_comp,skey_quiet)
+ values ('x','Y')"
+ );
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-12 19:03:09
|
Revision: 1075
http://andro.svn.sourceforge.net/andro/?rev=1075&view=rev
Author: kendowns
Date: 2009-01-12 19:03:01 +0000 (Mon, 12 Jan 2009)
Log Message:
-----------
QUEUEPOS columns no longer default to zero, but to null.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-12 17:56:55 UTC (rev 1074)
+++ trunk/andro/application/androBuild.php 2009-01-12 19:03:01 UTC (rev 1075)
@@ -3606,11 +3606,15 @@
$this->SpecDDL_TriggerFragment($table_id,"UPDATE","BEFORE","1011",$s1);
}
- if ($automation_id=="BLANK" || $automation_id=='QUEUEPOS') {
+ # KFD 1/12/08, for eBlue (PROMAT), no longer make queuepos
+ # columns default to zero, have them stay null
+ if ($automation_id=="BLANK" /* || $automation_id=='QUEUEPOS' */) {
$def = $this->SQLFormatBLank($row["type_id"],true,true);
+ #$def = "(Select max(COALESCE($column_id,0)+100 from $table_id)";
$s1 = "\n".
" -- 1020 Blank/queuepos default\n".
- " IF new.". $column_id . " IS NULL THEN new.". $column_id . " = ". $def . "; END IF;\n";
+ " IF new.". $column_id . " IS NULL THEN new."
+ . $column_id . " = ". $def . "; END IF;\n";
$this->SpecDDL_TriggerFragment($table_id,"INSERT","BEFORE","1020",$s1);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-26 14:13:53
|
Revision: 1155
http://andro.svn.sourceforge.net/andro/?rev=1155&view=rev
Author: kendowns
Date: 2009-01-26 14:13:47 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
Catch and report errors if yaml file references non-existent properties.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-26 14:12:45 UTC (rev 1154)
+++ trunk/andro/application/androBuild.php 2009-01-26 14:13:47 UTC (rev 1155)
@@ -863,6 +863,7 @@
$ta["data"]
,$sfx
);
+
$this->LogEntry("Setting aside content for loading after build");
$this->content = array_merge($this->content,$ta['content']);
@@ -899,7 +900,7 @@
$this->DBB_LoadAddFile($spec,$ta);
}
else {
- $retval = $this->DBB_LoadYAMLFile($spec,$ta);
+ $retval = $retval && $this->DBB_LoadYAMLFile($spec,$ta);
}
if($retval) {
$this->LogEntry("Loading spec to main series");
@@ -928,22 +929,6 @@
else {
$this->content[$table_id] = $values;
}
-
- // KFD 3/1/08, major fix to content loading on YAML
- # KFD 6/30/08, try remming this out
- #$colnames = $values[1];
- #$colnames['__type']='columns';
- #$this->content[$table_id][] = $colnames;
-
- #unset($values[2]['__type']);
- #foreach($values[2] as $colvalues) {
- # $this->content[$table_id][]=array_merge(
- # array('__type'=>'values')
- # ,$colvalues
- # );
- # $this->content[$table_id][]=$colvalues;
- #}
- // KFD 3/1/8 END CHANGES
}
}
}
@@ -1117,8 +1102,8 @@
// Finally, execute it
$row['srcfile']=$srcfile;
- $retval = $retval &&
- $this->DBB_Insert("zdd.",$table,$cLoadSuffix,$row);
+ $return = $this->DBB_Insert("zdd.",$table,$cLoadSuffix,$row);
+ $retval = $retval && $return;
}
}
return $retval;
@@ -8716,6 +8701,31 @@
function DBB_Insert($prefix,$table,$suffix,$colvals,$noblanks=false) {
$cols = '';
$vals = '';
+
+ # KFD 1/26/09, SF BUG 1948051, trap bad properties
+ $insert_error = false;
+ foreach($colvals as $name=>$value) {
+ if(!isset($this->utabs[$table]['flat'][$name])) {
+ # Don't stop on our hardcoded meta values
+ if($name=='__keystub') continue;
+ if($name=='uicolseq') continue;
+ if($name=='srcfile') continue;
+ if($name=='auto') continue;
+ if($name=='columns' && $value=='values') continue;
+ if($table=='colchainargs') continue;
+ if($table=='colchaintests') continue;
+ if($table=='colchains') continue;
+
+
+ x_EchoFlush("");
+ x_EchoFlush(" >>> ERROR: BAD PROPERTY NAME");
+ x_EchoFlush(" >>> Cannot set '$name' on '$table' to value '$value'");
+ x_EchoFlush("");
+ hprint_r($colvals);
+ $insert_error = true;
+ }
+ }
+ if($insert_error) return false;
foreach ($this->utabs[$table]["flat"] as $colname=>$colinfo) {
if (isset($colvals[$colname])) { $val = $colvals[$colname]; }
@@ -8752,7 +8762,11 @@
}
$sql = "INSERT INTO ".$prefix.$table.$suffix." ( ".$cols." ) VALUES ( ".$vals." )";
- return $this->SQL($sql);
+ $retval = $this->SQL($sql);
+ if(!$retval) {
+ hprint_r($colvals);
+ }
+ return $retval;
}
function DBB_SQLBlank($formshort) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-26 20:46:55
|
Revision: 1158
http://andro.svn.sourceforge.net/andro/?rev=1158&view=rev
Author: kendowns
Date: 2009-01-26 20:46:46 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
More hard-coded exclusions to the property validation.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-26 17:02:35 UTC (rev 1157)
+++ trunk/andro/application/androBuild.php 2009-01-26 20:46:46 UTC (rev 1158)
@@ -8712,9 +8712,14 @@
if($name=='srcfile') continue;
if($name=='auto') continue;
if($name=='columns' && $value=='values') continue;
+ if($name=='suffix' && $table=='perm_cols') continue;
+ if($name=='prefix' && $table=='perm_cols') continue;
if($table=='colchainargs') continue;
if($table=='colchaintests') continue;
if($table=='colchains') continue;
+ if($table=='tabchainargs') continue;
+ if($table=='tabchaintests') continue;
+ if($table=='tabchains') continue;
x_EchoFlush("");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-27 21:28:46
|
Revision: 1163
http://andro.svn.sourceforge.net/andro/?rev=1163&view=rev
Author: kendowns
Date: 2009-01-27 21:28:44 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Made property and object definitions case insenstive, made project name case insensitive.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-26 23:16:46 UTC (rev 1162)
+++ trunk/andro/application/androBuild.php 2009-01-27 21:28:44 UTC (rev 1163)
@@ -199,13 +199,16 @@
// it otherwise
//
$cnx =
- " dbname=".$parm["APP"].
+ " dbname=".strtolower($parm["APP"]).
" user=".$parm["UID"].
" password=".$pw;
$con2 = pg_connect($cnx,PGSQL_CONNECT_FORCE_NEW);
if (!$con2) {
$this->LogEntry("Database does not exist, creating it now.");
- pg_query($GLOBALS["dbconna"],"create database ".$parm["APP"]);
+ # KFD 1/27/09, case insensitivity
+ pg_query($GLOBALS["dbconna"]
+ ,"create database ".strtolower($parm["APP"])
+ );
$con2 = pg_connect($cnx,PGSQL_CONNECT_FORCE_NEW);
if (!$con2) {
@@ -218,7 +221,7 @@
// Load driver and establish connection
// Wow that comment "load driver" is from the java version!
$cnx =
- " dbname=".$parm["APP"].
+ " dbname=".strtolower($parm["APP"]).
" user=".$parm["UID"].
" password=".$pw;
$this->LogEntry(preg_replace('/password=.*/','password=***',$cnx));
@@ -999,6 +1002,9 @@
$retval = true;
foreach ($arr as $keyword=>$object) {
+ # KFD 1/27/09, put all keywords into lowercase
+ $keyword = strtolower($keyword);
+
// Ignore prop/value pairs at even-numbered rows
if (! is_array($object)) { continue; }
@@ -1033,6 +1039,8 @@
// Whatever is not a child object is a property/value pair
foreach ($properties as $colname=>$colvalue) {
+ # KFD 1/27/09, case insensitivity
+ $colname = strtolower($colname);
if (! is_array($colvalue)) {
$row[$colname] = $colvalue;
if ($keystub <> "" && $colname == "__keystub") {
@@ -7731,15 +7739,7 @@
);
if($count[0]['cnt']==0) {
$this->LogEntry("Adding a row to $table_id");
- if($table_id == 'configfw') {
- $this->SQL("insert into $table_id (skey_quiet) values ('Y')");
- }
- else {
- $this->SQL(
- "insert into $table_id (description_comp,skey_quiet)
- values ('x','Y')"
- );
- }
+ $this->SQL("insert into $table_id (skey_quiet) values ('Y')");
}
}
@@ -8707,19 +8707,19 @@
foreach($colvals as $name=>$value) {
if(!isset($this->utabs[$table]['flat'][$name])) {
# Don't stop on our hardcoded meta values
- if($name=='__keystub') continue;
- if($name=='uicolseq') continue;
- if($name=='srcfile') continue;
- if($name=='auto') continue;
- if($name=='columns' && $value=='values') continue;
+ if($name=='__keystub') continue; // generated
+ if($name=='uicolseq') continue; // generated
+ if($name=='srcfile') continue; // generated
+ if($name=='auto') continue; // shortcut, gets parsed
+ if($name=='columns') continue; // for content
if($name=='suffix' && $table=='perm_cols') continue;
if($name=='prefix' && $table=='perm_cols') continue;
- if($table=='colchainargs') continue;
- if($table=='colchaintests') continue;
- if($table=='colchains') continue;
- if($table=='tabchainargs') continue;
- if($table=='tabchaintests') continue;
- if($table=='tabchains') continue;
+ if($table=='colchainargs') continue; // derived tables
+ if($table=='colchaintests') continue; // derived tables
+ if($table=='colchains') continue; // derived tables
+ if($table=='tabchainargs') continue; // derived tables
+ if($table=='tabchaintests') continue; // derived tables
+ if($table=='tabchains') continue; // derived tables
x_EchoFlush("");
@@ -9950,7 +9950,7 @@
return false;
}
}
-
+
// clear the log
// no need to depend on external system calls
$handle = fopen($pLogPath, 'w');
@@ -9998,6 +9998,11 @@
}
$parm = &$GLOBALS["parm"];
+ # KFD 1/27/09, convert app and instance to lower case
+ $parm['APP'] = strtolower($parm['APP']);
+ if(isset($parm['INST'])) $parm['INST'] = strtolower($parm['INST']);
+
+
if($this->zzArraySafe($parm,'ROLE_LOGIN','')=='') {
$parm['ROLE_LOGIN']='Y';
}
@@ -10013,7 +10018,7 @@
$this->LogEntry(" ANDROMEDA CLIENT UPGRADE PROGRAM ");
$this->LogEntry("===================================================");
$this->LogEntry("Starting Log at ".date("r"));
- $this->LogEntry("This program: ".__FILE__);
+ $this->LogEntry("This program: ".__FILE__);
$this->LogEntry("===================================================");
$this->LogEntry("Parameters: ");
$this->LogEntry("Application Code : ". $parm["APP"]);
@@ -10022,9 +10027,9 @@
$this->LogEntry("Application Description: ". $parm["APPDSC"]);
$this->LogEntry("Node Public Directory : ". $parm["DIR_PUBLIC"]);
$this->LogEntry("App Public SubDir : ". $parm["DIR_PUBLIC_APP"]);
- $this->LogEntry("App Public Directory : ". $parm["DIR_PUB"]);
- $this->LogEntry("Library Symlink Source : ". $this->zzArray($parm,"DIR_LINK_LIB"));
- $this->LogEntry("Application Symlink Src: ". $this->zzArray($parm,"DIR_LINK_APP"));
+ $this->LogEntry("App Public Directory : ". $parm["DIR_PUB"]);
+ $this->LogEntry("Library Symlink Source : ". $this->zzArray($parm,"DIR_LINK_LIB"));
+ $this->LogEntry("Application Symlink Src: ". $this->zzArray($parm,"DIR_LINK_APP"));
$this->LogEntry("Database Server : ". $parm["DBSERVER_URL"]);
$this->LogEntry("Connecting as user : ". $parm["UID"]);
$this->LogEntry("Password : *** NOT DISPLAYED ***");
@@ -10032,8 +10037,8 @@
$this->LogEntry("Bootstrap Dictionary : ". $parm["SPEC_BOOT"]);
$this->LogEntry("Universal Dictionary : ". $parm["SPEC_LIB"]);
$this->LogEntry("Application Dictionary : ". $parm["SPEC_LIST"]);
- $this->LogEntry("ROLE Logins allowed : ". $parm['ROLE_LOGIN']);
- $this->LogEntry("Hardened PW Security : ". $parm['FLAG_PWMD5']);
+ $this->LogEntry("ROLE Logins allowed : ". $parm['ROLE_LOGIN']);
+ $this->LogEntry("Hardened PW Security : ". $parm['FLAG_PWMD5']);
$this->LogEntry("Log File: ".$pLogFile);
$this->LogEntry("---------------------------------------------------");
$parm["DIR_WORKING"]=dirname(__FILE__);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-01-29 00:34:51
|
Revision: 1171
http://andro.svn.sourceforge.net/andro/?rev=1171&view=rev
Author: dorgan1983
Date: 2009-01-29 00:34:39 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
This fixes the "Cannot set 'x6xrefdesc' on 'tabfky' to value 'Y'" error...Ken you should just check this and make sure i put it in the right place. But the build now works
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-28 19:42:53 UTC (rev 1170)
+++ trunk/andro/application/androBuild.php 2009-01-29 00:34:39 UTC (rev 1171)
@@ -8712,6 +8712,7 @@
if($name=='srcfile') continue; // generated
if($name=='auto') continue; // shortcut, gets parsed
if($name=='columns') continue; // for content
+ if($name=='x6xrefdesc') continue;
if($name=='suffix' && $table=='perm_cols') continue;
if($name=='prefix' && $table=='perm_cols') continue;
if($table=='colchainargs') continue; // derived tables
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-01-29 00:54:32
|
Revision: 1172
http://andro.svn.sourceforge.net/andro/?rev=1172&view=rev
Author: kendowns
Date: 2009-01-29 00:54:23 +0000 (Thu, 29 Jan 2009)
Log Message:
-----------
Now expects the YAML to come back with __yaml_line added as a property to all objects, and reports any errors it find in $spyc->errors(). no longer calls the yaml pre-scanner, not necessary any more.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-29 00:34:39 UTC (rev 1171)
+++ trunk/andro/application/androBuild.php 2009-01-29 00:54:23 UTC (rev 1172)
@@ -1001,14 +1001,14 @@
global $parm;
$retval = true;
- foreach ($arr as $keyword=>$object) {
+ foreach ($arr as $keyword=>$object) {
# KFD 1/27/09, put all keywords into lowercase
$keyword = strtolower($keyword);
- // Ignore prop/value pairs at even-numbered rows
- if (! is_array($object)) { continue; }
-
- // Now use $keyword to get table name we will insert into
+ // Ignore prop/value pairs at even-numbered rows
+ if (! is_array($object)) { continue; }
+
+ // Now use $keyword to get table name we will insert into
//$this->LogEntry("$parent_prefix - $keyword");
if(!isset($this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["table"])) {
echo ">> ERROR <br/>";
@@ -1019,102 +1019,108 @@
return false;
}
$table= $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["table"];
- $pkcolname = $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["keycol"];
- $keystub = $this->zzArray($this->ddarr["meta"]["keyword"][$parent_prefix.$keyword],"keystub");
- //echo "TABLE is $table, pk and keystub are $pkcolname and $keystub <br>";
-
- $dd = &$this->ddarr["data"]["table"][$table];
- if ($table=="") {
- $this->LogEntry("ERROR: Could not find table to match keyword ".$parent_prefix.$keyword);
- $retval = false;
- continue;
- }
-
- foreach ($object as $pkvalue=>$properties) {
- $row=array();
- // Use $keyword to get name of one of the columns at least
- if (!is_numeric($pkvalue)) {
- $row[ $pkcolname ] = $pkvalue;
- }
-
- // Whatever is not a child object is a property/value pair
- foreach ($properties as $colname=>$colvalue) {
+ $pkcolname = $this->ddarr["meta"]["keyword"][$parent_prefix.$keyword]["keycol"];
+ $keystub = $this->zzArray($this->ddarr["meta"]["keyword"][$parent_prefix.$keyword],"keystub");
+ //echo "TABLE is $table, pk and keystub are $pkcolname and $keystub <br>";
+
+ $dd = &$this->ddarr["data"]["table"][$table];
+ if ($table=="") {
+ $this->LogEntry("ERROR: Could not find table to match keyword ".$parent_prefix.$keyword);
+ $retval = false;
+ continue;
+ }
+
+ foreach ($object as $pkvalue=>$properties) {
+ $row=array();
+ // Use $keyword to get name of one of the columns at least
+ if (!is_numeric($pkvalue)) {
+ $row[ $pkcolname ] = $pkvalue;
+ }
+
+ // Whatever is not a child object is a property/value pair
+ foreach ($properties as $colname=>$colvalue) {
# KFD 1/27/09, case insensitivity
$colname = strtolower($colname);
- if (! is_array($colvalue)) {
- $row[$colname] = $colvalue;
- if ($keystub <> "" && $colname == "__keystub") {
- $row[$keystub] = $colvalue;
- }
- }
- }
-
- // Add/override any col/values from parent object if nested
- foreach ($parent_row as $colname=>$colvalue) {
- $row[$colname] = $colvalue;
- }
+ if (! is_array($colvalue)) {
+ $row[$colname] = $colvalue;
+ if ($keystub <> "" && $colname == "__keystub") {
+ $row[$keystub] = $colvalue;
+ }
+ }
+ }
+
+ // Add/override any col/values from parent object if nested
+ foreach ($parent_row as $colname=>$colvalue) {
+ $row[$colname] = $colvalue;
+ }
- // HARDCODED BREAK POINT. Anything we want to do
- // to deal with the spec has to be done here
- //
- if ($table=="tabchaintests" || $table=="colchaintests") {
+ // HARDCODED BREAK POINT. Anything we want to do
+ // to deal with the spec has to be done here
+ //
+ if ($table=="tabchaintests" || $table=="colchaintests") {
// For chain tests, parse out the expressions
- $pfx = substr($table,0,3);
- $this->SpecLoad_ArrayToTables_HC_cargs($row,"compare","compoper",$cLoadSuffix,$pfx);
- $this->SpecLoad_ArrayToTables_HC_cargs($row,"return" ,"funcoper",$cLoadSuffix,$pfx);
- }
- if ($keyword=='child_table') {
- // Flip two columns to make this property of child table instead
- $x = $row['table_id'];
- $row['table_id'] = $row['table_id_par'];
- $row['table_id_par'] = $x;
- }
-
- // Add the primary key columns for this object into the "parent_row"
- // array, then recurse child objects.
- $pr = $parent_row;
- foreach ($row as $colname=>$colvalue) {
- if (isset($this->ddflat[$table][$colname])) {
- if ($this->zzArray($this->ddflat[$table][$colname],"primary_key")=="Y") {
- $pr[$colname] = $colvalue;
- }
- }
- }
- $retval = $retval &&
- $this->SpecLoad_ArrayToTables($properties,$cLoadSuffix,$pr,$parent_prefix.$keyword."_");
-
-
- // MORE HARDCODE STUFF. These are any hardcoded things that
- // must occur immediately before writing to file, but should
- // not propagate through to child tables because the action
- // would be repeated in the child table.
- //
- if (isset($row['group_id'])) {
- if($row['group_id']<>$parm['APP']) {
- $row['group_id']=$parm['APP'].'_'.$row['group_id'];
+ $pfx = substr($table,0,3);
+ $this->SpecLoad_ArrayToTables_HC_cargs($row,"compare","compoper",$cLoadSuffix,$pfx);
+ $this->SpecLoad_ArrayToTables_HC_cargs($row,"return" ,"funcoper",$cLoadSuffix,$pfx);
}
- }
- // KFD 5/22/08, support the "auto" keyword for shorter automations
- if(isset($row['auto'])) {
- $auto = explode(',',$row['auto']);
- $row['automation_id'] = strtoupper($auto[0]);
- if(isset($auto[1])) {
- $row['auto_formula'] = $auto[1];
- }
- }
- // KFD 4/9/08, support for lowercase automations by uppercasing
- // them on the way in
- if(isset($row['automation_id'])) {
+ if ($keyword=='child_table') {
+ // Flip two columns to make this property of child table instead
+ $x = $row['table_id'];
+ $row['table_id'] = $row['table_id_par'];
+ $row['table_id_par'] = $x;
+ }
+
+ // Add the primary key columns for this object into the "parent_row"
+ // array, then recurse child objects.
+ $pr = $parent_row;
+ foreach ($row as $colname=>$colvalue) {
+ if (isset($this->ddflat[$table][$colname])) {
+ if ($this->zzArray($this->ddflat[$table][$colname],"primary_key")=="Y") {
+ $pr[$colname] = $colvalue;
+ }
+ }
+ }
+ $retval = $retval &&
+ $this->SpecLoad_ArrayToTables($properties,$cLoadSuffix,$pr,$parent_prefix.$keyword."_");
+
+
+ // MORE HARDCODE STUFF. These are any hardcoded things that
+ // must occur immediately before writing to file, but should
+ // not propagate through to child tables because the action
+ // would be repeated in the child table.
+ //
+ if (isset($row['group_id'])) {
+ if($row['group_id']<>$parm['APP']) {
+ $row['group_id']=$parm['APP'].'_'.$row['group_id'];
+ }
+ }
+ // KFD 5/22/08, support the "auto" keyword for shorter automations
+ if(isset($row['auto'])) {
+ $auto = explode(',',$row['auto']);
+ $row['automation_id'] = strtoupper($auto[0]);
+ if(isset($auto[1])) {
+ $row['auto_formula'] = $auto[1];
+ }
+ }
+ // KFD 4/9/08, support for lowercase automations by uppercasing
+ // them on the way in
+ if(isset($row['automation_id'])) {
$row['automation_id'] = strtoupper($row['automation_id']);
- }
+ }
- // Finally, execute it
- $row['srcfile']=$srcfile;
- $return = $this->DBB_Insert("zdd.",$table,$cLoadSuffix,$row);
- $retval = $retval && $return;
- }
- }
- return $retval;
+ // Finally, execute it
+ $row['srcfile']=$srcfile;
+ $return = $this->DBB_Insert("zdd.",$table,$cLoadSuffix,$row);
+ if($return == '') {
+ x_echoFlush(
+ " Parent object defined at line ".$properties['__yaml_line']
+ );
+ hprint_r($properties);
+ }
+ $retval = $retval && $return;
+ }
+ }
+ return $retval;
}
function SpecLoad_ArrayToTables_HC_cargs(&$row,$element,$rowcol,$cLoadSuffix,$pfx) {
@@ -8170,7 +8176,20 @@
// Now convert to YAML and dump
include_once("spyc.php");
- $temparray=Spyc::YAMLLoad($filename);
+ $parser = new Spyc;
+ $temparray = $parser->load($filename);
+ #$temparray=Spyc::YAMLLoad($filename);
+ if(count($parser->errors)>0) {
+ x_echoFlush(" >>> ");
+ x_echoFlush(" >>> Parse errors in the YAML File");
+ x_echoFlush(" >>> ");
+ foreach($parser->errors as $idx=>$err) {
+ $idx = str_pad($idx+1,4,' ',STR_PAD_LEFT);
+ x_EchoFlush("$idx) $err");
+ }
+ return false;
+ }
+
$this->YAMLError=false;
$this->YAMLPrevious=array("no entries yet, look at top of file");
@@ -8183,6 +8202,9 @@
// Scan for indentation errors
function DBB_LoadYAMLFile_Prescan($filename) {
+ # KFD 1/28/09, moved this stuff into the spyc.php file,
+ # do not need this routine anymore.
+ return true;
$this->LogEntry("Scanning file for correct formatting");
// Load file, get rid of carriage returns, explode into lines
@@ -8280,8 +8302,17 @@
$values = array();
foreach($item as $key=>$stuff) {
- foreach($stuff as $array) {
- $values[]=array_merge(array('__type'=>$key),$array);
+ # KFD 1/28/09. After we put line numbers
+ # into things, we get non-array
+ # entries. Just skip 'em
+ if(is_array($stuff)) {
+ foreach($stuff as $idx=>$array) {
+ if(is_array($array)) {
+ $values[]=array_merge(
+ array('__type'=>$key),$array
+ );
+ }
+ }
}
}
@@ -8707,11 +8738,12 @@
foreach($colvals as $name=>$value) {
if(!isset($this->utabs[$table]['flat'][$name])) {
# Don't stop on our hardcoded meta values
- if($name=='__keystub') continue; // generated
- if($name=='uicolseq') continue; // generated
- if($name=='srcfile') continue; // generated
- if($name=='auto') continue; // shortcut, gets parsed
- if($name=='columns') continue; // for content
+ if($name=='__yaml_line') continue; // generated
+ if($name=='__keystub') continue; // generated
+ if($name=='uicolseq') continue; // generated
+ if($name=='srcfile') continue; // generated
+ if($name=='auto') continue; // shortcut, gets parsed
+ if($name=='columns') continue; // for content
if($name=='x6xrefdesc') continue;
if($name=='suffix' && $table=='perm_cols') continue;
if($name=='prefix' && $table=='perm_cols') continue;
@@ -8723,11 +8755,9 @@
if($table=='tabchains') continue; // derived tables
- x_EchoFlush("");
- x_EchoFlush(" >>> ERROR: BAD PROPERTY NAME");
- x_EchoFlush(" >>> Cannot set '$name' on '$table' to value '$value'");
- x_EchoFlush("");
- hprint_r($colvals);
+ x_EchoFlush(
+ ">>> ERROR: No Property Named '$name' (value '$value')"
+ );
$insert_error = true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-01-30 15:03:29
|
Revision: 1198
http://andro.svn.sourceforge.net/andro/?rev=1198&view=rev
Author: dorgan1983
Date: 2009-01-30 15:03:27 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
Fixing typo
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-30 15:02:42 UTC (rev 1197)
+++ trunk/andro/application/androBuild.php 2009-01-30 15:03:27 UTC (rev 1198)
@@ -218,7 +218,7 @@
$this->LogEntry( 'Entry for ' .$checksum['file'] .' not found' );
$checksum_entry = array(
'application'=>$parm['APP'],
- 'instance'=>( isset( $parm['ISTANCE'] ) ? $parm['INST'] : '' ),
+ 'instance'=>( isset( $parm['INST'] ) ? $parm['INST'] : '' ),
'spec_name'=>$checksum['file'],
'checksum'=>md5_file( $checksum['fullpath'] )
);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-01-30 15:49:46
|
Revision: 1204
http://andro.svn.sourceforge.net/andro/?rev=1204&view=rev
Author: dorgan1983
Date: 2009-01-30 15:49:43 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
Typo fix.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-30 15:44:39 UTC (rev 1203)
+++ trunk/andro/application/androBuild.php 2009-01-30 15:49:43 UTC (rev 1204)
@@ -223,7 +223,7 @@
'checksum'=>md5_file( $checksum['fullpath'] )
);
SQLX_Insert( 'instance_spec_checksums', $checksum_entry );
- $this->LogEntry("Spec File Change:" .$checksum['file'] );
+ $this->LogEntry("Spec File Changed: " .$checksum['file'] );
$changed = true;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-01-30 16:15:19
|
Revision: 1207
http://andro.svn.sourceforge.net/andro/?rev=1207&view=rev
Author: dorgan1983
Date: 2009-01-30 16:15:09 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
ok one final change and we should be go to go.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-30 15:56:43 UTC (rev 1206)
+++ trunk/andro/application/androBuild.php 2009-01-30 16:15:09 UTC (rev 1207)
@@ -174,6 +174,13 @@
'md5'=>md5_file( $parm['DIR_PUB']."lib/".$specboot ),
'fullpath'=>$parm['DIR_PUB']."lib/".$specboot
);
+
+ if ( isset( $parm['INST'] ) ) {
+ $app = str_replace( '_' .$parm['INST'], '', $parm['APPLICATION'] );
+ } else {
+ $app = $parm['APPLICATION'];
+ }
+
if ($parm["SPEC_LIST"]<>"") {
$speclist = explode(",",$parm["SPEC_LIST"]);
foreach ($speclist as $spec) {
@@ -195,10 +202,9 @@
$this->LogEntry("Instance tracking table doesnt exist yet...ignoring until next build");
return true;
}
-
foreach( $checksums as $checksum ) {
$query = "SELECT checksum,skey FROM " .ddTable_idResolve( 'instance_spec_checksums' ) ." WHERE
- application=" .SQLFC( $parm['APP'] ) ." AND spec_name=" .SQLFC( $checksum['file'] )
+ application=" .SQLFC( $app ) ." AND spec_name=" .SQLFC( $checksum['file'] )
.( isset( $parm['INST'] ) ? " AND instance=" .SQLFC( $parm['INST'] ) : '' );
$row = SQL_OneRow( $query );
@@ -217,7 +223,7 @@
} else {
$this->LogEntry( 'Entry for ' .$checksum['file'] .' not found' );
$checksum_entry = array(
- 'application'=>$parm['APP'],
+ 'application'=>$app,
'instance'=>( isset( $parm['INST'] ) ? $parm['INST'] : '' ),
'spec_name'=>$checksum['file'],
'checksum'=>md5_file( $checksum['fullpath'] )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-01-30 16:18:33
|
Revision: 1209
http://andro.svn.sourceforge.net/andro/?rev=1209&view=rev
Author: dorgan1983
Date: 2009-01-30 16:18:30 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
Typo fix
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-01-30 16:15:46 UTC (rev 1208)
+++ trunk/andro/application/androBuild.php 2009-01-30 16:18:30 UTC (rev 1209)
@@ -176,9 +176,9 @@
);
if ( isset( $parm['INST'] ) ) {
- $app = str_replace( '_' .$parm['INST'], '', $parm['APPLICATION'] );
+ $app = str_replace( '_' .$parm['INST'], '', $parm['APP'] );
} else {
- $app = $parm['APPLICATION'];
+ $app = $parm['APP'];
}
if ($parm["SPEC_LIST"]<>"") {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-02-17 14:28:56
|
Revision: 1242
http://andro.svn.sourceforge.net/andro/?rev=1242&view=rev
Author: kendowns
Date: 2009-02-17 14:28:46 +0000 (Tue, 17 Feb 2009)
Log Message:
-----------
Trivial: indentation correction.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-02-17 13:52:44 UTC (rev 1241)
+++ trunk/andro/application/androBuild.php 2009-02-17 14:28:46 UTC (rev 1242)
@@ -1201,7 +1201,7 @@
$row['srcfile']=$srcfile;
$return = $this->DBB_Insert("zdd.",$table,$cLoadSuffix,$row);
if($return == '') {
- x_echoFlush(
+ x_echoFlush(
" Parent object defined at line ".$properties['__yaml_line']
);
hprint_r($properties);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-02-17 15:53:48
|
Revision: 1246
http://andro.svn.sourceforge.net/andro/?rev=1246&view=rev
Author: kendowns
Date: 2009-02-17 15:53:44 +0000 (Tue, 17 Feb 2009)
Log Message:
-----------
Sourceforge 2321898, trap for empty comparison operator.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-02-17 14:40:24 UTC (rev 1245)
+++ trunk/andro/application/androBuild.php 2009-02-17 15:53:44 UTC (rev 1246)
@@ -3038,7 +3038,7 @@
$retval = $retval && $this->SpecDDL_Triggers_Automated();
$this->SpecDDL_Triggers_ColConsTypes();
$this->SpecDDL_Triggers_ColConsMinMax();
- $this->SpecDDL_Triggers_Chains();
+ $retval = $retval && $this->SpecDDL_Triggers_Chains();
$this->SpecDDL_Triggers_Cascades();
$this->SpecDDL_Triggers_Histories();
@@ -5391,16 +5391,42 @@
function SpecDDL_Triggers_Chains() {
$chains = $this->SpecDDL_Triggers_ChainsList();
+
+ # KFD 2/17/09 Sourceforge 2321898. Trap for empty comparison operators
+ # Very hard to do this is SQL because of the table
+ # structures. So we must scan the array of chains
+ # and look for any test that has a _compare array
+ # but an empty compoper field.
+ #
+ $errors = 0;
+ foreach($chains as $key=>$chaindetails) {
+ foreach($chaindetails['tests'] as $idx=>$test) {
+ if(count($test['_compare'])>0 && trim($test['compoper']) == '') {
+ $tid = $chaindetails['table_id'];
+ $cid = $chaindetails['column_id'];
+ $chain= $chaindetails['chain'];
+ x_EchoFlush(
+ ">>> ERROR in Chain Definition, no comparison operator"
+ );
+ x_EchoFlush(">>> -> table $tid, column $cid, chain $chain");
+ x_EchoFlush(">>> -> comparison details:");
+ hprint_r($test['_compare']);
+ $errors++;
+ }
+ }
+ }
+ if($errors > 0) return false;
+
+ // KFD 5/26/07, attach chains to $this->utabs, so we can save them
+ // out in the dd and use them in client code.
+ foreach($chains as $x=>$chain) {
+ $this->utabs[$chain['table_id']]['chains'][$x]=$chain;
+ }
- // KFD 5/26/07, attach chains to $this->utabs, so we can save them
- // out in the dd and use them in client code.
- foreach($chains as $x=>$chain) {
- $this->utabs[$chain['table_id']]['chains'][$x]=$chain;
- }
-
$this->SpecDDL_Triggers_ChainsCode($chains);
$this->SpecDDL_Triggers_ChainsBuild($chains);
+ return true;
}
function SpecDDL_Triggers_ChainsList() {
@@ -5454,7 +5480,7 @@
}
- // Final, send them back to calling program
+ // Final, send them back to calling program
return $chains;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-02-24 16:54:45
|
Revision: 1289
http://andro.svn.sourceforge.net/andro/?rev=1289&view=rev
Author: dorgan1983
Date: 2009-02-24 16:54:16 +0000 (Tue, 24 Feb 2009)
Log Message:
-----------
This fixes SF Bug # 263426
"Smart" Builder had a dumb mistake...
Builder was doing an update when it should have been doing an insert and vise versa.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-02-20 18:53:16 UTC (rev 1288)
+++ trunk/andro/application/androBuild.php 2009-02-24 16:54:16 UTC (rev 1289)
@@ -207,8 +207,19 @@
application=" .SQLFC( $app ) ." AND spec_name=" .SQLFC( $checksum['file'] )
.( isset( $parm['INST'] ) ? " AND instance=" .SQLFC( $parm['INST'] ) : '' );
$row = SQL_OneRow( $query );
-
- if ( $row ) {
+
+ if ( $row === false ) {
+ $this->LogEntry( 'Entry for ' .$checksum['file'] .' not found' );
+ $checksum_entry = array(
+ 'application'=>$app,
+ 'instance'=>( isset( $parm['INST'] ) ? $parm['INST'] : '' ),
+ 'spec_name'=>$checksum['file'],
+ 'checksum'=>md5_file( $checksum['fullpath'] )
+ );
+ SQLX_Insert( 'instance_spec_checksums', $checksum_entry );
+ $this->LogEntry("Spec File Changed: " .$checksum['file'] );
+ $changed = true;
+ } else {
$this->LogEntry( 'Entry for ' .$checksum['file'] .' file found' );
if ( $row['checksum'] != $checksum['md5'] ) {
$this->LogEntry("Spec File Changed: " .$checksum['file'] );
@@ -220,17 +231,6 @@
SQLX_Update( 'instance_spec_checksums', $checksum_update );
$this->LogEntry( "Updating Entry" );
}
- } else {
- $this->LogEntry( 'Entry for ' .$checksum['file'] .' not found' );
- $checksum_entry = array(
- 'application'=>$app,
- 'instance'=>( isset( $parm['INST'] ) ? $parm['INST'] : '' ),
- 'spec_name'=>$checksum['file'],
- 'checksum'=>md5_file( $checksum['fullpath'] )
- );
- SQLX_Insert( 'instance_spec_checksums', $checksum_entry );
- $this->LogEntry("Spec File Changed: " .$checksum['file'] );
- $changed = true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-02-24 17:29:23
|
Revision: 1291
http://andro.svn.sourceforge.net/andro/?rev=1291&view=rev
Author: dorgan1983
Date: 2009-02-24 17:29:10 +0000 (Tue, 24 Feb 2009)
Log Message:
-----------
Fix to SF Bug #2634295
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-02-24 17:28:09 UTC (rev 1290)
+++ trunk/andro/application/androBuild.php 2009-02-24 17:29:10 UTC (rev 1291)
@@ -207,7 +207,6 @@
application=" .SQLFC( $app ) ." AND spec_name=" .SQLFC( $checksum['file'] )
.( isset( $parm['INST'] ) ? " AND instance=" .SQLFC( $parm['INST'] ) : '' );
$row = SQL_OneRow( $query );
-
if ( $row === false ) {
$this->LogEntry( 'Entry for ' .$checksum['file'] .' not found' );
$checksum_entry = array(
@@ -221,8 +220,11 @@
$changed = true;
} else {
$this->LogEntry( 'Entry for ' .$checksum['file'] .' file found' );
+ $this->LogEntry( ' Old Value: ' .$row['checksum'] );
+ $this->LogEntry( ' Current Value: ' .$checksum['md5'] );
+ $this->LogEntry( '' );
if ( $row['checksum'] != $checksum['md5'] ) {
- $this->LogEntry("Spec File Changed: " .$checksum['file'] );
+ $this->LogEntry(' Spec File Changed' );
$changed = true;
$checksum_update = array(
'skey'=>$row['skey'],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-03-02 02:27:45
|
Revision: 1296
http://andro.svn.sourceforge.net/andro/?rev=1296&view=rev
Author: dorgan1983
Date: 2009-03-02 02:27:41 +0000 (Mon, 02 Mar 2009)
Log Message:
-----------
added force override operation to copy command for linux build.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-02-25 22:14:19 UTC (rev 1295)
+++ trunk/andro/application/androBuild.php 2009-03-02 02:27:41 UTC (rev 1296)
@@ -9900,7 +9900,7 @@
}
else {
- $cmd="cp -r $src/$name/* $tgt/$name/";
+ $cmd="cp -rf $src/$name/* $tgt/$name/";
}
$this->LogEntry($cmd);
`$cmd`;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <dor...@us...> - 2009-03-03 14:41:53
|
Revision: 1297
http://andro.svn.sourceforge.net/andro/?rev=1297&view=rev
Author: dorgan1983
Date: 2009-03-03 14:41:29 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
FIx for Sourceforge #2657234. If there is a filesystem level error checking spec files is not done.
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-03-02 02:27:41 UTC (rev 1296)
+++ trunk/andro/application/androBuild.php 2009-03-03 14:41:29 UTC (rev 1297)
@@ -90,59 +90,61 @@
// DO 1-29-2009 trying to make the builder a little smarter
// this way a full build will only happen if the db spec files
// have been changed
- $dbFilesChanges = $this->checkDBFilesForChanges();
- if ( $dbFilesChanges ) {
- // If we passed most basic, we prepare the database
- // by loading stored procedures and making the zdd
- // schema to use during build.
- //
- $retval = $retval && $this->DB_Prepare();
- $retval = $retval && $this->SP_Load();
- $retval = $retval && $this->DDRMake();
-
- // Load and run out the new specification
- //
- $retval = $retval && $this->SpecLoad();
- $retval = $retval && $this->SpecFlattenValid();
- $retval = $retval && $this->SpecFlatten();
- $retval = $retval && $this->SpecFlattenRowCol();
+ if ( $retval ) {
+ $dbFilesChanges = $this->checkDBFilesForChanges();
+ if ( $dbFilesChanges ) {
+ // If we passed most basic, we prepare the database
+ // by loading stored procedures and making the zdd
+ // schema to use during build.
+ //
+ $retval = $retval && $this->DB_Prepare();
+ $retval = $retval && $this->SP_Load();
+ $retval = $retval && $this->DDRMake();
+
+ // Load and run out the new specification
+ //
+ $retval = $retval && $this->SpecLoad();
+ $retval = $retval && $this->SpecFlattenValid();
+ $retval = $retval && $this->SpecFlatten();
+ $retval = $retval && $this->SpecFlattenRowCol();
- // Now we know everything, we can validate the new
- // spec. This does not validate changes.
- $retval = $retval && $this->SpecValidate();
+ // Now we know everything, we can validate the new
+ // spec. This does not validate changes.
+ $retval = $retval && $this->SpecValidate();
- $retval = $retval && $this->SpecLocal(); // now only lists
+ $retval = $retval && $this->SpecLocal(); // now only lists
-
- // Generate all of the DDL, this finishes with new spec
- $retval = $retval && $this->SpecDDL();
-
- // Now pull current state and look at differences
- //
- $retval = $retval && $this->RealityGet(); // What is current state of db?
- $retval = $retval && $this->Differences();
- //$retval = $retval && $this->DiffValidate(); // maybe someday
-
- // Assuming we did not fail validation, do it!
- $retval = $retval && $this->Analyze();
- $retval = $retval && $this->PlanMake();
- $retval = $retval && $this->PlanExecute();
- $retval = $retval && $this->ContentLoad();
- # KFD 6/7/08 removed, will put perms onto zdd. instead
- #$retval = $retval && $this->ContentDD();
- $retval = $retval && $this->SecurityNodeManager();
-
- // This is code generation
- $retval = $retval && $this->CodeGenerate_Info();
- $retval = $retval && $this->CodeGenerate_Tables();
- $retval = $retval && $this->CodeGenerate_Modules();
- $retval = $retval && $this->CodeGenerate_x6Profiles();
-
- // Big new thing, 2/6/08, build scripts
- //
- $retval = $retval && $this->BuildScripts();
- // build scripts may alter configs, so write them out last
- $retval = $retval && $this->CodeGenerate_config();
+
+ // Generate all of the DDL, this finishes with new spec
+ $retval = $retval && $this->SpecDDL();
+
+ // Now pull current state and look at differences
+ //
+ $retval = $retval && $this->RealityGet(); // What is current state of db?
+ $retval = $retval && $this->Differences();
+ //$retval = $retval && $this->DiffValidate(); // maybe someday
+
+ // Assuming we did not fail validation, do it!
+ $retval = $retval && $this->Analyze();
+ $retval = $retval && $this->PlanMake();
+ $retval = $retval && $this->PlanExecute();
+ $retval = $retval && $this->ContentLoad();
+ # KFD 6/7/08 removed, will put perms onto zdd. instead
+ #$retval = $retval && $this->ContentDD();
+ $retval = $retval && $this->SecurityNodeManager();
+
+ // This is code generation
+ $retval = $retval && $this->CodeGenerate_Info();
+ $retval = $retval && $this->CodeGenerate_Tables();
+ $retval = $retval && $this->CodeGenerate_Modules();
+ $retval = $retval && $this->CodeGenerate_x6Profiles();
+
+ // Big new thing, 2/6/08, build scripts
+ //
+ $retval = $retval && $this->BuildScripts();
+ // build scripts may alter configs, so write them out last
+ $retval = $retval && $this->CodeGenerate_config();
+ }
}
$this->DB_Close();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ken...@us...> - 2009-03-03 16:27:40
|
Revision: 1298
http://andro.svn.sourceforge.net/andro/?rev=1298&view=rev
Author: kendowns
Date: 2009-03-03 16:27:39 +0000 (Tue, 03 Mar 2009)
Log Message:
-----------
Using realpath
Modified Paths:
--------------
trunk/andro/application/androBuild.php
Modified: trunk/andro/application/androBuild.php
===================================================================
--- trunk/andro/application/androBuild.php 2009-03-03 14:41:29 UTC (rev 1297)
+++ trunk/andro/application/androBuild.php 2009-03-03 16:27:39 UTC (rev 1298)
@@ -10092,7 +10092,7 @@
// Next big fatal error is that we cannot write to the log
//
$pLogFile = "AndroDBB.".$GLOBALS["parm"]["APP"].".log";
- $pLogPath = $this->FS_ADDSLASH($dircur).'../tmp/'.$pLogFile;
+ $pLogPath = realpath($this->FS_ADDSLASH($dircur).'../tmp/').'/'.$pLogFile;
if (file_exists($pLogPath)) {
if (! is_writable($pLogPath)) {
$this->LogEntry("===================================================" );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|