diff options
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/acm/acm_memcache.php | 14 | ||||
| -rw-r--r-- | phpBB/includes/acp/acp_forums.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/functions_compress.php | 4 | ||||
| -rw-r--r-- | phpBB/includes/session.php | 8 | 
4 files changed, 23 insertions, 7 deletions
| diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php index 52b8832749..e54fa36c38 100644 --- a/phpBB/includes/acm/acm_memcache.php +++ b/phpBB/includes/acm/acm_memcache.php @@ -37,6 +37,12 @@ if (!defined('PHPBB_ACM_MEMCACHE_HOST'))  	define('PHPBB_ACM_MEMCACHE_HOST', 'localhost');  } +if (!defined('PHPBB_ACM_MEMCACHE')) +{ +	//can define multiple servers with host1/port1,host2/port2 format +	define('PHPBB_ACM_MEMCACHE', PHPBB_ACM_MEMCACHE_HOST . '/' . PHPBB_ACM_MEMCACHE_PORT); +} +  /**  * ACM for Memcached  * @package acm @@ -54,7 +60,11 @@ class acm extends acm_memory  		parent::acm_memory();  		$this->memcache = new Memcache; -		$this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT); +		foreach(explode(',', PHPBB_ACM_MEMCACHE) as $u) +		{ +			$parts = explode('/', $u); +			$this->memcache->addServer(trim($parts[0]), trim($parts[1])); +		}  		$this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0;  	} @@ -125,4 +135,4 @@ class acm extends acm_memory  	}  } -?>
\ No newline at end of file +?> diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index bde59ec870..5a5adc57ae 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -407,7 +407,7 @@ class acp_forums  						$exclude_forums[] = $row['forum_id'];  					} -					$parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false); +					$parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, true, false, false);  					$forum_data['forum_password_confirm'] = $forum_data['forum_password'];  				} @@ -416,7 +416,7 @@ class acp_forums  					$this->page_title = 'CREATE_FORUM';  					$forum_id = $this->parent_id; -					$parents_list = make_forum_select($this->parent_id, false, false, false, false); +					$parents_list = make_forum_select($this->parent_id, false, true, false, false);  					// Fill forum data with default values  					if (!$update) diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index f17c780a65..f422eaa8c1 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -502,8 +502,8 @@ class compress_tar extends compress  	function compress_tar($mode, $file, $type = '')  	{  		$type = (!$type) ? $file : $type; -		$this->isgz = (strpos($type, '.tar.gz') !== false || strpos($type, '.tgz') !== false) ? true : false; -		$this->isbz = (strpos($type, '.tar.bz2') !== false) ? true : false; +		$this->isgz = preg_match('#(\.tar\.gz|\.tgz)$#', $type); +		$this->isbz = preg_match('#\.tar\.bz2$#', $type);  		$this->mode = &$mode;  		$this->file = &$file; diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 11f1896332..8beb0161f9 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -83,7 +83,7 @@ class session  		$query_string = trim(implode('&', $use_args));  		// basenamed page name (for example: index.php) -		$page_name = basename($script_name); +		$page_name = (substr($script_name, -1, 1) == '/') ? '' : basename($script_name);  		$page_name = urlencode(htmlspecialchars($page_name));  		// current directory within the phpBB root (for example: adm) @@ -608,6 +608,12 @@ class session  		}  		else  		{ +			// Bot user, if they have a SID in the Request URI we need to get rid of it +			// otherwise they'll index this page with the SID, duplicate content oh my! +			if (isset($_GET['sid'])) +			{ +				redirect(build_url(array('sid'))); +			}  			$this->data['session_last_visit'] = $this->time_now;  		} | 
