// we always overwrite the definition!!!
// set to array('all') to overwrite everything!!!
- function start($cli=false, $mods='', $overwrite='')
+ function start($cli=false, $mods='', $overwrite=array())
{
$ff = HTML_Flexyframework::get();
$diff = System::which('diff');
// now for each of the directories copy/show diffs..
echo $cli ? '' : '<PRE>';
- $flist = explode(',', $overwrite);
+ $flist = $overwrite;
foreach($this->modtables as $m=>$ar) {
if ($options['database'] != $standard_database) {
$options['database'] = $standard_database ;
if (!file_exists($tg) || !filesize($tg) ) {
- if ($cli && !filesize($tg) || in_array($f, $flist)) {
+ if ($cli && file_exists($tg) || in_array($f, $flist) || in_array('_all_', $flist )) {
echo "COPY $src $tg" . ($cli ? "\n" : "<BR>");
copy($src, $tg);
continue;
continue;
}
+ $clean_table = preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));
- $this->classname = 'Pman_'.$mod . '_DataObjects_'. ucfirst($this->table); // replace odd chars?
+ $this->classname = 'Pman_'.$mod . '_DataObjects_'. $clean_table; // replace odd chars?
- $outfilename = $rd.'/'.$mod.'/'. ucfirst($this->table).'.php';
- $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. ucfirst($this->table).'.php';
+ $outfilename = $rd.'/'.$mod.'/'. $clean_table .'.php';
+ $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. $clean_table.'.php';
// file_get_contents???