Vergleich inc/class_core.php - 1.8.4 - 1.8.36

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

	 *
* @var string
*/

	public $version = "1.8.4";

	public $version = "1.8.36";


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


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

	public $version_code = 1804;

	public $version_code = 1836;


/**
* The current working directory.


/**
* The current working directory.

Zeile 68Zeile 68
	/**
* Whether or not magic quotes are enabled.
*

	/**
* Whether or not magic quotes are enabled.
*

	 * @var unknown_type

	 * @var int

	 */
public $magicquotes = 0;


	 */
public $magicquotes = 0;


Zeile 89Zeile 89
	/**
* The request method that called this page.
*

	/**
* The request method that called this page.
*

	 * @var string.
*/

	 * @var string
*/

	public $request_method = "";

/**
* Whether or not PHP's safe_mode is enabled

	public $request_method = "";

/**
* Whether or not PHP's safe_mode is enabled

	 *
* @var boolean
*/

	 *
* @var boolean
*/

	public $safemode = false;

/**
* Loads templates directly from the master theme and disables the installer locked error
*
* @var boolean

	public $safemode = false;

/**
* Loads templates directly from the master theme and disables the installer locked error
*
* @var boolean

	 */

	 */

	public $dev_mode = false;

/**

	public $dev_mode = false;

/**

Zeile 132Zeile 132

/**
* Variables that are to be ignored from cleansing process


/**
* Variables that are to be ignored from cleansing process

	 *
* @var array
*/

	 *
* @var array
*/

	public $ignore_clean_variables = array();

/**
* Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?

	public $ignore_clean_variables = array();

/**
* Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?

 
	 *
* @var bool

	 */
public $use_shutdown = true;

	 */
public $use_shutdown = true;


/**


/**

	 * Debug mode?

	 * Debug mode?

 
	 *
* @var bool

	 */
public $debug_mode = false;

/**
* Binary database fields need to be handled differently

	 */
public $debug_mode = false;

/**
* Binary database fields need to be handled differently

 
	 *
* @var array

	 */
public $binary_fields = array(
'adminlog' => array('ipaddress' => true),
'adminsessions' => array('ip' => true),
'maillogs' => array('ipaddress' => true),
'moderatorlog' => array('ipaddress' => true),

	 */
public $binary_fields = array(
'adminlog' => 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 177Zeile 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().

	/**
* String input constant for use with get_input().

	 *
* @see get_input
*/

	 *
* @see get_input
*/

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

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

	 *
* @see get_input

	 *
* @see get_input

	 */
const INPUT_INT = 1;
/**

	 */
const INPUT_INT = 1;
/**

Zeile 195Zeile 218
	 * @see get_input
*/
const INPUT_ARRAY = 2;

	 * @see get_input
*/
const INPUT_ARRAY = 2;

	/**

	/**

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

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

Zeile 210Zeile 233

/**
* Constructor of class.


/**
* Constructor of class.

	 *
* @return MyBB

 
	 */
function __construct()

	 */
function __construct()

	{

	{

		// Set up MyBB
$protected = array("_GET", "_POST", "_SERVER", "_COOKIE", "_FILES", "_ENV", "GLOBALS");
foreach($protected as $var)

		// Set up MyBB
$protected = array("_GET", "_POST", "_SERVER", "_COOKIE", "_FILES", "_ENV", "GLOBALS");
foreach($protected as $var)

Zeile 308Zeile 329
	/**
* Parses the incoming variables.
*

	/**
* Parses the incoming variables.
*

	 * @param array The array of incoming variables.

	 * @param array $array The array of incoming variables.

	 */
function parse_incoming($array)
{

	 */
function parse_incoming($array)
{

Zeile 339Zeile 360
		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'])

			{

			{

				$key = substr($key, $prefix_length);

// 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)

				$key = substr($key, $prefix_length);

// 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]);
}

Zeile 360Zeile 381
	/**
* Strips slashes out of a given array.
*

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

	 * @param array The array to strip.

	 * @param array $array The array to strip.

	 */
function strip_slashes_array(&$array)
{

	 */
function strip_slashes_array(&$array)
{

Zeile 380Zeile 401
	/**
* Unsets globals from a specific array.
*

	/**
* Unsets globals from a specific array.
*

	 * @param array The array to unset from.

	 * @param array $array The array to unset from.

	 */
function unset_globals($array)
{

	 */
function unset_globals($array)
{

Zeile 438Zeile 459
	 * @param string $name Variable name ($mybb->input)
* @param int $type The type of the variable to get. Should be one of MyBB::INPUT_INT, MyBB::INPUT_ARRAY or MyBB::INPUT_STRING.
*

	 * @param string $name Variable name ($mybb->input)
* @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 mixed Checked data

	 * @return int|float|array|string Checked data. Type depending on $type

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

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

Zeile 524Zeile 545
	/**
* Triggers a generic error.
*

	/**
* Triggers a generic error.
*

	 * @param string The error code.

	 * @param string $code The error code.

	 */
function trigger_generic_error($code)
{

	 */
function trigger_generic_error($code)
{

Zeile 549Zeile 570
				$error_code = MYBB_NOT_UPGRADED;
break;
case "sql_load_error":

				$error_code = MYBB_NOT_UPGRADED;
break;
case "sql_load_error":

				$message = "MyBB was unable to load the SQL extension. Please contact the MyBB Group for support. <a href=\"http://www.mybb.com\">MyBB Website</a>";

				$message = "MyBB was unable to load the SQL extension. Please contact the MyBB Group for support. <a href=\"https://mybb.com\">MyBB Website</a>";

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

				$error_code = MYBB_SQL_LOAD_ERROR;
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 570Zeile 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:

				$message = "MyBB has experienced an internal error. Please contact the MyBB Group for support. <a href=\"http://www.mybb.com\">MyBB Website</a>";

				$message = "MyBB has experienced an internal error. Please contact the MyBB Group for support. <a href=\"https://mybb.com\">MyBB Website</a>";

				$error_code = MYBB_GENERAL;

				$error_code = MYBB_GENERAL;

		}

		}

		$error_handler->trigger($message, $error_code);
}


		$error_handler->trigger($message, $error_code);
}


Zeile 594Zeile 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", "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.

Zeile 610Zeile 673
	'candeleteposts',
'candeletethreads',
'caneditattachments',

	'candeleteposts',
'candeletethreads',
'caneditattachments',

 
	'canviewdeletionnotice',

	'modposts',
'modthreads',
'modattachments',

	'modposts',
'modthreads',
'modattachments',