diff --git a/common.php b/common.php index cf0bfb2ab..0bf328a70 100644 --- a/common.php +++ b/common.php @@ -20,8 +20,10 @@ header('X-Frame-Options: SAMEORIGIN'); require(BB_ROOT . 'library/config.php'); // Load Zend Framework -require_once(BB_ROOT . 'library/Zend/Loader/AutoloaderFactory.php'); -Zend\Loader\AutoloaderFactory::factory(array()); +use Zend\Loader\StandardAutoloader; +require(BB_ROOT . 'library/Zend/Loader/StandardAutoloader.php'); +$loader = new StandardAutoloader(array('autoregister_zf' => true)); +$loader->register(); $server_protocol = ($bb_cfg['cookie_secure']) ? 'https://' : 'http://'; $server_port = (in_array($bb_cfg['server_port'], array(80, 443))) ? '' : ':' . $bb_cfg['server_port']; diff --git a/library/attach_mod/posting_attachments.php b/library/attach_mod/posting_attachments.php index df5091e0d..368706b3a 100644 --- a/library/attach_mod/posting_attachments.php +++ b/library/attach_mod/posting_attachments.php @@ -972,7 +972,7 @@ class attach_parent $this->attach_filename = str_replace(array(',', '.', '!', '?', 'ь', 'Ь', 'ц', 'Ц', 'д', 'Д', ';', ':', '@', "'", '"', '&'), array('', '', '', '', 'ue', 'ue', 'oe', 'oe', 'ae', 'ae', '', '', '', '', '', 'and'), $this->attach_filename); $this->attach_filename = str_replace(array('$', 'Я', '>','<','§','%','=','/','(',')','#','*','+',"\\",'{','}','[',']'), array('dollar', 'ss','greater','lower','paragraph','percent','equal','','','','','','','','','','',''), $this->attach_filename); // Remove non-latin characters - $this->attach_filename = preg_replace("/([\xC2\xC3])([\x80-\xBF])/e", "chr(ord('\\1')<<6&0xC0|ord('\\2')&0x3F)", $this->attach_filename); + $this->attach_filename = preg_replace('#([\xC2\xC3])([\x80-\xBF])#', 'chr(ord(\'$1\')<<6&0xC0|ord(\'$2\')&0x3F)', $this->attach_filename); $this->attach_filename = rawurlencode($this->attach_filename); $this->attach_filename = preg_replace("/(%[0-9A-F]{1,2})/i", '', $this->attach_filename); $this->attach_filename = trim($this->attach_filename); diff --git a/library/config.php b/library/config.php index a12591131..2e7d35932 100644 --- a/library/config.php +++ b/library/config.php @@ -73,7 +73,7 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Version info $bb_cfg['tp_version'] = '2.1.4'; -$bb_cfg['tp_release_date'] = '**-11-2014'; +$bb_cfg['tp_release_date'] = '26-11-2014'; $bb_cfg['tp_release_state'] = 'ALPHA'; $bb_cfg['tp_zf_version'] = '2.3.3'; diff --git a/library/includes/ucp/topic_watch.php b/library/includes/ucp/topic_watch.php index 593f27bee..4fad6c02b 100644 --- a/library/includes/ucp/topic_watch.php +++ b/library/includes/ucp/topic_watch.php @@ -93,7 +93,7 @@ if ($watch_count > 0) } else { - meta_refresh(BB_ROOT, '3'); + meta_refresh('index.php', 3); bb_die($lang['NO_WATCHED_TOPICS']); } diff --git a/viewtopic.php b/viewtopic.php index 2799cecc2..e33d91124 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -114,6 +114,7 @@ else if (!$t_data = DB()->fetch_row($sql)) { + meta_refresh('index.php' , 10); bb_die($lang['TOPIC_POST_NOT_EXIST']); }