Vergleich inc/class_core.php - 1.8.11 - 1.8.39

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 14Zeile 14
	 *
* @var string
*/

	 *
* @var string
*/

	public $version = "1.8.11";

	public $version = "1.8.39";


/**
* The version code of MyBB we're running.
*
* @var integer
*/


/**
* The version code of MyBB we're running.
*
* @var integer
*/

	public $version_code = 1811;

	public $version_code = 1839;


/**
* The current working directory.


/**
* The current working directory.

Zeile 161Zeile 161
		'adminsessions' => array('ip' => true),
'maillogs' => array('ipaddress' => true),
'moderatorlog' => array('ipaddress' => true),

		'adminsessions' => array('ip' => true),
'maillogs' => array('ipaddress' => true),
'moderatorlog' => array('ipaddress' => true),

 
		'pollvotes' => array('ipaddress' => true),

		'posts' => array('ipaddress' => true),
'privatemessages' => array('ipaddress' => true),
'searchlog' => array('ipaddress' => true),

		'posts' => array('ipaddress' => true),
'privatemessages' => array('ipaddress' => true),
'searchlog' => array('ipaddress' => true),

Zeile 183Zeile 184
	 * @var string
*/
public $asset_url = null;

	 * @var string
*/
public $asset_url = null;

 

/**
* @var array
*/
public $session = array();

/**
* @var string
*/
public $post_code;

/**
* @var array
*/
public $admin;


	/**
* String input constant for use with get_input().
*
* @see get_input
*/
const INPUT_STRING = 0;

	/**
* String input constant for use with get_input().
*
* @see get_input
*/
const INPUT_STRING = 0;

	/**

	/**

	 * Integer input constant for use with get_input().
*
* @see get_input
*/
const INPUT_INT = 1;

	 * Integer input constant for use with get_input().
*
* @see get_input
*/
const INPUT_INT = 1;

	/**

	/**

	 * Array input constant for use with get_input().
*
* @see get_input

	 * Array input constant for use with get_input().
*
* @see get_input

Zeile 234Zeile 251
			if(!is_array(IGNORE_CLEAN_VARS))
{
$this->ignore_clean_variables = array(IGNORE_CLEAN_VARS);

			if(!is_array(IGNORE_CLEAN_VARS))
{
$this->ignore_clean_variables = array(IGNORE_CLEAN_VARS);

			}

			}

			else
{
$this->ignore_clean_variables = IGNORE_CLEAN_VARS;

			else
{
$this->ignore_clean_variables = IGNORE_CLEAN_VARS;

Zeile 254Zeile 271
			@set_magic_quotes_runtime(0);
@ini_set("magic_quotes_gpc", 0);
@ini_set("magic_quotes_runtime", 0);

			@set_magic_quotes_runtime(0);
@ini_set("magic_quotes_gpc", 0);
@ini_set("magic_quotes_runtime", 0);

		}


		}


		// Determine input
$this->parse_incoming($_GET);
$this->parse_incoming($_POST);

		// Determine input
$this->parse_incoming($_GET);
$this->parse_incoming($_POST);


if($_SERVER['REQUEST_METHOD'] == "POST")
{


if(isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == "POST")
{

			$this->request_method = "post";
}

			$this->request_method = "post";
}

		else if($_SERVER['REQUEST_METHOD'] == "GET")

		else

		{
$this->request_method = "get";

		{
$this->request_method = "get";

		}


		}


		// If we've got register globals on, then kill them too
if(@ini_get("register_globals") == 1)
{

		// If we've got register globals on, then kill them too
if(@ini_get("register_globals") == 1)
{

Zeile 287Zeile 304

// Are we running on a development server?
if(isset($_SERVER['MYBB_DEV_MODE']) && $_SERVER['MYBB_DEV_MODE'] == 1)


// Are we running on a development server?
if(isset($_SERVER['MYBB_DEV_MODE']) && $_SERVER['MYBB_DEV_MODE'] == 1)

		{

		{

			$this->dev_mode = 1;
}


			$this->dev_mode = 1;
}


Zeile 298Zeile 315
		}

if(isset($this->input['action']) && $this->input['action'] == "mybb_logo")

		}

if(isset($this->input['action']) && $this->input['action'] == "mybb_logo")

		{

		{

			require_once dirname(__FILE__)."/mybb_group.php";
output_logo();
}

if(isset($this->input['intcheck']) && $this->input['intcheck'] == 1)

			require_once dirname(__FILE__)."/mybb_group.php";
output_logo();
}

if(isset($this->input['intcheck']) && $this->input['intcheck'] == 1)

		{

		{

			die("MYBB");
}
}

			die("MYBB");
}
}

Zeile 334Zeile 351
	function parse_cookies()
{
if(!is_array($_COOKIE))

	function parse_cookies()
{
if(!is_array($_COOKIE))

		{
return;
}

$prefix_length = strlen($this->settings['cookieprefix']);


		{
return;
}

$prefix_length = strlen($this->settings['cookieprefix']);


		foreach($_COOKIE as $key => $val)
{
if($prefix_length && substr($key, 0, $prefix_length) == $this->settings['cookieprefix'])

		foreach($_COOKIE as $key => $val)
{
if($prefix_length && substr($key, 0, $prefix_length) == $this->settings['cookieprefix'])

Zeile 348Zeile 365

// Fixes conflicts with one board having a prefix and another that doesn't on the same domain
// Gives priority to our cookies over others (overwrites them)


// Fixes conflicts with one board having a prefix and another that doesn't on the same domain
// Gives priority to our cookies over others (overwrites them)

				if($this->cookies[$key])

				if(isset($this->cookies[$key]))

				{
unset($this->cookies[$key]);
}

				{
unset($this->cookies[$key]);
}

			}


			}


			if(empty($this->cookies[$key]))
{
$this->cookies[$key] = $val;

			if(empty($this->cookies[$key]))
{
$this->cookies[$key] = $val;

			}
}
}


			}
}
}


	/**
* Strips slashes out of a given array.
*

	/**
* Strips slashes out of a given array.
*

Zeile 391Zeile 408
		if(!is_array($array))
{
return;

		if(!is_array($array))
{
return;

		}

		}


foreach(array_keys($array) as $key)
{
unset($GLOBALS[$key]);
unset($GLOBALS[$key]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4


foreach(array_keys($array) as $key)
{
unset($GLOBALS[$key]);
unset($GLOBALS[$key]); // Double unset to circumvent the zend_hash_del_key_or_index hole in PHP <4.4.3 and <5.1.4

		}
}

		}
}


/**
* Cleans predefined input variables.


/**
* Cleans predefined input variables.

Zeile 443Zeile 460
	 * @param int $type The type of the variable to get. Should be one of MyBB::INPUT_INT, MyBB::INPUT_ARRAY or MyBB::INPUT_STRING.
*
* @return int|float|array|string Checked data. Type depending on $type

	 * @param int $type The type of the variable to get. Should be one of MyBB::INPUT_INT, MyBB::INPUT_ARRAY or MyBB::INPUT_STRING.
*
* @return int|float|array|string Checked data. Type depending on $type

	 */

	 */

	function get_input($name, $type = MyBB::INPUT_STRING)
{
switch($type)

	function get_input($name, $type = MyBB::INPUT_STRING)
{
switch($type)

Zeile 558Zeile 575
				break;
case "apc_load_error":
$message = "APC needs to be configured with PHP to use the APC cache support.";

				break;
case "apc_load_error":
$message = "APC needs to be configured with PHP to use the APC cache support.";

 
				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
case "apcu_load_error":
$message = "APCu needs to be configured with PHP to use the APCu cache support.";

				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
case "eaccelerator_load_error":

				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
case "eaccelerator_load_error":

Zeile 574Zeile 595
				break;
case "xcache_load_error":
$message = "Xcache needs to be configured with PHP to use the Xcache cache support.";

				break;
case "xcache_load_error":
$message = "Xcache needs to be configured with PHP to use the Xcache cache support.";

 
				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
case "redis_load_error":
$message = "Your server does not have redis support enabled.";

				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
default:

				$error_code = MYBB_CACHEHANDLER_LOAD_ERROR;
break;
default:

Zeile 598Zeile 623
 */

$grouppermignore = array("gid", "type", "title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

 */

$grouppermignore = array("gid", "type", "title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

$groupzerogreater = array("pmquota", "maxpmrecipients", "maxreputationsday", "attachquota", "maxemails", "maxwarningsday", "maxposts", "edittimelimit", "canusesigxposts", "maxreputationsperuser", "maxreputationsperthread", "emailfloodtime");



































$groupzerogreater = array(
'maxposts',
'attachquota',
'edittimelimit',
'maxreputationsperthread',
'maxreputationsperuser',
'maxreputationsday',
'maxwarningsday',
'pmquota',
'maxpmrecipients',
'maxemails',
);
$groupzerolesser = array(
'canusesigxposts',
'emailfloodtime',
);
$groupxgreater = array(
'reputationpower' => 0,
);
$grouppermbyswitch = array(
'maxposts' => array('canpostthreads', 'canpostreplys'),
'attachquota' => 'canpostattachments',
'edittimelimit' => 'caneditposts',
'canusesigxposts' => 'canusesig',
'reputationpower' => 'cangivereputations',
'maxreputationsperthread' => 'cangivereputations',
'maxreputationsperuser' => 'cangivereputations',
'maxreputationsday' => 'cangivereputations',
'maxwarningsday' => 'canwarnusers',
'pmquota' => 'canusepms',
'maxpmrecipients' => 'canusepms',
'maxemails' => 'cansendemail',
'emailfloodtime' => 'cansendemail',
);


$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

// These are fields in the usergroups table that are also forum permission specific.

$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

// These are fields in the usergroups table that are also forum permission specific.