Zeile 14 | Zeile 14 |
---|
* * @var string */
|
* * @var string */
|
public $version = "1.8.24";
| public $version = "1.8.37";
|
/** * The version code of MyBB we're running. * * @var integer */
|
/** * The version code of MyBB we're running. * * @var integer */
|
public $version_code = 1824;
| public $version_code = 1837;
|
/** * The current working directory.
| /** * The current working directory.
|
Zeile 184 | Zeile 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
| * Integer input constant for use with get_input(). * * @see get_input
|
Zeile 223 | Zeile 239 |
---|
// 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)
|
{
| {
|
if(isset($_POST[$var]) || isset($_GET[$var]) || isset($_COOKIE[$var]) || isset($_FILES[$var])) { die("Hacking attempt");
| if(isset($_POST[$var]) || isset($_GET[$var]) || isset($_COOKIE[$var]) || isset($_FILES[$var])) { die("Hacking attempt");
|
Zeile 235 | Zeile 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
| } else
|
{ $this->ignore_clean_variables = IGNORE_CLEAN_VARS; }
| { $this->ignore_clean_variables = IGNORE_CLEAN_VARS; }
|
Zeile 335 | Zeile 351 |
---|
function parse_cookies() { if(!is_array($_COOKIE))
|
function parse_cookies() { if(!is_array($_COOKIE))
|
{ return; }
$prefix_length = strlen($this->settings['cookieprefix']);
foreach($_COOKIE as $key => $val) {
| { return; }
$prefix_length = strlen($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)
|
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)
|
if($this->cookies[$key])
| if(isset($this->cookies[$key]))
|
{ unset($this->cookies[$key]); } }
if(empty($this->cookies[$key]))
|
{ unset($this->cookies[$key]); } }
if(empty($this->cookies[$key]))
|
{
| {
|
$this->cookies[$key] = $val; } }
| $this->cookies[$key] = $val; } }
|
Zeile 392 | Zeile 408 |
---|
if(!is_array($array)) { return;
|
if(!is_array($array)) { return;
|
}
foreach(array_keys($array) as $key) {
| }
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 }
| 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 }
|
Zeile 415 | Zeile 431 |
---|
if(in_array($var, $this->ignore_clean_variables)) { continue;
|
if(in_array($var, $this->ignore_clean_variables)) { continue;
|
}
| }
|
if(isset($this->input[$var])) {
| if(isset($this->input[$var])) {
|
Zeile 448 | Zeile 464 |
---|
function get_input($name, $type = MyBB::INPUT_STRING) { switch($type)
|
function get_input($name, $type = MyBB::INPUT_STRING) { switch($type)
|
{
| {
|
case MyBB::INPUT_ARRAY: if(!isset($this->input[$name]) || !is_array($this->input[$name])) { return array();
|
case MyBB::INPUT_ARRAY: if(!isset($this->input[$name]) || !is_array($this->input[$name])) { return array();
|
} return $this->input[$name];
| } return $this->input[$name];
|
case MyBB::INPUT_INT: if(!isset($this->input[$name]) || !is_numeric($this->input[$name])) {
| case MyBB::INPUT_INT: if(!isset($this->input[$name]) || !is_numeric($this->input[$name])) {
|
Zeile 500 | Zeile 516 |
---|
if(substr($path, 0, 2) == './') { $path = substr($path, 2);
|
if(substr($path, 0, 2) == './') { $path = substr($path, 2);
|
}
| }
|
if($use_cdn && $this->settings['usecdn'] && !empty($this->settings['cdnurl'])) { $base_path = rtrim($this->settings['cdnurl'], '/');
| if($use_cdn && $this->settings['usecdn'] && !empty($this->settings['cdnurl'])) { $base_path = rtrim($this->settings['cdnurl'], '/');
|
Zeile 607 | Zeile 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", "maxposts", "edittimelimit", "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.
|