Index: trunk/kernel/include/category.php =================================================================== diff -u -N -r3268 -r3282 --- trunk/kernel/include/category.php (.../category.php) (revision 3268) +++ trunk/kernel/include/category.php (.../category.php) (revision 3282) @@ -40,8 +40,8 @@ function StripDisallowed($string) { - $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', - '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '`', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', '~', '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); $string = str_replace($not_allowed, '_', $string); @@ -87,8 +87,16 @@ function GenerateFilename() { - if ( !$this->Get('AutomaticFilename') && $this->Get('Filename') ) return false; - $name = $this->StripDisallowed( $this->Get('Name') ); + if ( !$this->Get('AutomaticFilename') && $this->Get('Filename') ) + { + $name = $this->Get('Filename'); + } + else + { + $name = $this->Get('Name'); + } + $name = $this->StripDisallowed($name); + if ( $name != $this->Get('Filename') ) $this->Set('Filename', $name); } @@ -157,7 +165,7 @@ function Create() { - if( (int)$this->Get('CreatedOn') == 0 ) $this->Set('CreatedOn', date('U') ); + if( (int)$this->Get('CreatedOn') == 0 ) $this->Set('CreatedOn', adodb_date('U') ); parent::Create(); $this->GenerateFilename(); @@ -1572,7 +1580,7 @@ } if( getArrayValue($attribs,'_today') ) { - $today = mktime(0,0,0,date("m"),date("d"),date("Y")); + $today = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d"),adodb_date("Y")); $TodayWhere = "(CreatedOn>=$today)"; } else