From 47c875700db6751fe7056a277efcb4620b00454d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 14 Oct 2011 13:38:56 +0800 Subject: [PATCH] Generator.php --- Generator.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Generator.php b/Generator.php index 36e9fa82..a3da3290 100644 --- a/Generator.php +++ b/Generator.php @@ -355,12 +355,13 @@ touch Pman/????/DataObjects/".ucfirst($this->table).".php continue; } + $clean_table = preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table))); - $this->classname = 'Pman_'.$mod . '_DataObjects_'. preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));; // replace odd chars? + $this->classname = 'Pman_'.$mod . '_DataObjects_'. $clean_table; // replace odd chars? - $outfilename = $rd.'/'.$mod.'/'. preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));'.php'; - $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. preg_replace('/[^A-Z0-9]+/i','_',ucfirst(trim($this->table)));.'.php'; + $outfilename = $rd.'/'.$mod.'/'. $clean_table .'.php'; + $orig = $ff->page->rootDir .'/Pman/'.$mod.'/DataObjects/'. $clean_table.'.php'; // file_get_contents??? -- 2.39.2