Index: trunk/kernel/include/item.php =================================================================== diff -u -r3268 -r3282 --- trunk/kernel/include/item.php (.../item.php) (revision 3268) +++ trunk/kernel/include/item.php (.../item.php) (revision 3282) @@ -82,7 +82,7 @@ $ip = $_SERVER["REMOTE_ADDR"]; if(!$CreatedOn) - $CreatedOn = mktime(0,0,0,adodb_date("m"),adodb_date("d"),adodb_date("Y")); + $CreatedOn = adodb_mktime(0,0,0,adodb_date("m"),adodb_date("d"),adodb_date("Y")); $Status = 1; if($isPending) $Status = 2; @@ -544,7 +544,7 @@ { global $objConfig; - $expired=time()-86400*$objConfig->Get("Timeout_Rating"); + $expired = adodb_mktime() - 86400 * $objConfig->Get("Timeout_Rating"); $query="DELETE FROM ".GetTablePrefix()."ItemRating WHERE CreatedOn<$expired"; $this->adodbConnection->Execute($query); } @@ -1111,8 +1111,8 @@ function StripDisallowed($string) { - $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', - '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', + $not_allowed = Array( ' ', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '`', + '~', '!', '@', '#', '$', '%', '^', '&', '(', ')', '~', '+', '=', '-', '{', '}', ']', '[', "'", ';', '.', ','); $string = str_replace($not_allowed, '_', $string); @@ -1156,8 +1156,16 @@ function GenerateFilename() { - if ( !$this->Get('AutomaticFilename') && $this->Get('Filename') ) return false; - $name = $this->StripDisallowed( $this->Get($this->TitleField) ); + if ( !$this->Get('AutomaticFilename') && $this->Get('Filename') ) + { + $name = $this->Get('Filename'); + } + else + { + $name = $this->Get($this->TitleField); + } + $name = $this->StripDisallowed($name); + if ( $name != $this->Get('Filename') ) $this->Set('Filename', $name); }