diff options
| -rw-r--r-- | phpBB/includes/acp/acp_styles.php | 6 | ||||
| -rw-r--r-- | phpBB/includes/cache/service.php | 11 | ||||
| -rw-r--r-- | phpBB/includes/extension/controller.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 17 | 
4 files changed, 16 insertions, 22 deletions
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index d41ef571dd..db77825ae7 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -40,7 +40,7 @@ class acp_styles  	public function main($id, $mode)  	{ -		global $db, $user, $phpbb_admin_path, $phpbb_root_path, $php_ext, $template, $request, $cache, $auth, $config; +		global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config;  		$this->db = $db;  		$this->user = $user; @@ -50,12 +50,12 @@ class acp_styles  		$this->auth = $auth;  		$this->config = $config;  		$this->phpbb_root_path = $phpbb_root_path; -		$this->php_ext = $php_ext; +		$this->php_ext = $phpEx;  		$this->default_style = $config['default_style'];  		$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/'; -		$this->u_base_action = append_sid("{$phpbb_admin_path}index.$php_ext", "i={$id}"); +		$this->u_base_action = append_sid("{$phpbb_admin_path}index.{$this->php_ext}", "i={$id}");  		$this->s_hidden_fields = array(  			'mode'		=> $mode,  		); diff --git a/phpBB/includes/cache/service.php b/phpBB/includes/cache/service.php index 37f32aa753..e63ec6e33a 100644 --- a/phpBB/includes/cache/service.php +++ b/phpBB/includes/cache/service.php @@ -332,27 +332,22 @@ class phpbb_cache_service  			$parsed_array = array();  		} -		$reparse = false;  		$filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';  		if (!file_exists($filename))  		{ -			continue; +			return $parsed_array;  		}  		if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))  		{ -			$reparse = true; -		} - -		// Re-parse cfg file -		if ($reparse) -		{ +			// Re-parse cfg file  			$parsed_array = parse_cfg_file($filename);  			$parsed_array['filetime'] = @filemtime($filename);  			$this->driver->put('_cfg_' . $style['style_path'], $parsed_array);  		} +  		return $parsed_array;  	} diff --git a/phpBB/includes/extension/controller.php b/phpBB/includes/extension/controller.php index ec051c756f..2b8c50aafb 100644 --- a/phpBB/includes/extension/controller.php +++ b/phpBB/includes/extension/controller.php @@ -64,14 +64,14 @@ abstract class phpbb_extension_controller implements phpbb_extension_controller_  	public function __construct()  	{  		global $request, $db, $user, $template, $config; -		global $php_ext, $phpbb_root_path; +		global $phpEx, $phpbb_root_path;  		$this->request = $request;  		$this->db = $db;  		$this->user = $user;  		$this->template = $template;  		$this->config = $config; -		$this->php_ext = $php_ext; +		$this->php_ext = $phpEx;  		$this->phpbb_root_path = $phpbb_root_path;  	}  } diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index f21ea2471b..94fd59433b 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -69,17 +69,16 @@ class ucp_main  				// Get cleaned up list... return only those forums having the f_read permission  				$forum_ary = $auth->acl_getf('f_read', true);  				$forum_ary = array_unique(array_keys($forum_ary)); - -				$sql = "SELECT t.* $sql_select -					FROM $sql_from -					WHERE t.topic_type = " . POST_GLOBAL . ' -						AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . ' -					ORDER BY t.topic_last_post_time DESC'; -  				$topic_list = $rowset = array(); +  				// If the user can't see any forums, he can't read any posts because fid of 0 is invalid  				if (!empty($forum_ary))  				{ +					$sql = "SELECT t.* $sql_select +						FROM $sql_from +						WHERE t.topic_type = " . POST_GLOBAL . ' +							AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . ' +						ORDER BY t.topic_last_post_time DESC';  					$result = $db->sql_query($sql);  					while ($row = $db->sql_fetchrow($result)) @@ -671,7 +670,7 @@ class ucp_main  		if ($topics_count)  		{  			phpbb_generate_template_pagination($template, $this->u_action, 'pagination', 'start', $topics_count, $config['topics_per_page'], $start); -		 +  			$template->assign_vars(array(  				'PAGE_NUMBER'	=> phpbb_on_page($template, $user, $this->u_action, $topics_count, $config['topics_per_page'], $start),  				'TOTAL_TOPICS'	=> $user->lang('VIEW_FORUM_TOPICS', (int) $topics_count), @@ -837,7 +836,7 @@ class ucp_main  				'U_VIEW_TOPIC'			=> $view_topic_url,  				'U_VIEW_FORUM'			=> append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),  			)); -			 +  			phpbb_generate_template_pagination($template, append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);  		}  	}  | 
