Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html *
|
* $Id: class_core.php 2187 2006-09-02 13:48:31Z chris $
| * $Id: class_core.php 2689 2007-02-03 04:23:06Z Tikitiki $
|
*/
class MyBB {
| */
class MyBB {
|
Zeile 15 | Zeile 15 |
---|
* * @var string */
|
* * @var string */
|
var $version = "1.2";
| var $version = "1.2.5";
|
/** * The version code of MyBB we're running. * * @var integer */
|
/** * The version code of MyBB we're running. * * @var integer */
|
var $version_code = 120;
| var $version_code = 125;
|
/** * The current working directory.
| /** * The current working directory.
|
Zeile 88 | Zeile 88 |
---|
var $request_method = "";
/**
|
var $request_method = "";
/**
|
* Variables that need to be clean.
| * Variables that need to be cleaned.
|
* * @var array */
| * * @var array */
|
Zeile 96 | Zeile 96 |
---|
"int" => array("tid", "pid", "uid", "eid", "pmid", "fid", "aid") );
|
"int" => array("tid", "pid", "uid", "eid", "pmid", "fid", "aid") );
|
| /** * Variables that are to be ignored from cleansing proccess * * @var array */ var $ignore_clean_variables = array();
|
/** * Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?
| /** * Using built in shutdown functionality provided by register_shutdown_function for < PHP 5?
|
Zeile 110 | Zeile 116 |
---|
function MyBB() { // Set up MyBB
|
function MyBB() { // Set up MyBB
|
| $protected = array("_GET", "_POST", "_SERVER", "_COOKIE", "_FILES", "_SERVER", "_ENV", "GLOBALS"); foreach($protected as $var) { if($_REQUEST[$var] || $_FILES[$var] || $_COOKIE[$var]) { die("Hacking attempt"); } } if(defined("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; } }
|
// Determine Magic Quotes Status if(get_magic_quotes_gpc())
| // Determine Magic Quotes Status if(get_magic_quotes_gpc())
|
Zeile 215 | Zeile 241 |
---|
foreach(array_keys($array) as $key) { unset($GLOBALS[$key]);
|
foreach(array_keys($array) as $key) { unset($GLOBALS[$key]);
|
| global $$key; unset($$key);
|
} }
| } }
|
Zeile 228 | Zeile 256 |
---|
{ foreach($variables as $var) {
|
{ foreach($variables as $var) {
|
| // If this variable is in the ignored array, skip and move to next if(in_array($var, $this->ignore_clean_variables)) { continue; }
|
if($type == "int" && isset($this->input[$var]) && $this->input[$var] != "lastposter") { $this->input[$var] = intval($this->input[$var]);
| if($type == "int" && isset($this->input[$var]) && $this->input[$var] != "lastposter") { $this->input[$var] = intval($this->input[$var]);
|