|
From: MW <jo...@us...> - 2008-02-11 13:41:06
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17213/includes Modified Files: mx_functions_core.php Log Message: code styling: we use tabs and NOT spaces to indent code Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** mx_functions_core.php 11 Feb 2008 11:13:17 -0000 1.73 --- mx_functions_core.php 11 Feb 2008 13:40:27 -0000 1.74 *************** *** 336,347 **** fnc.function_file, fnc.function_id, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, ! " . PARAMETER_TABLE . " par, ! " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl WHERE sys.parameter_id = par.parameter_id ! AND sys.block_id = blk.block_id ! AND blk.function_id = fnc.function_id ! AND fnc.module_id = mdl.module_id"; $sql .= $sql_block; --- 336,347 ---- fnc.function_file, fnc.function_id, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, ! " . PARAMETER_TABLE . " par, ! " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl WHERE sys.parameter_id = par.parameter_id ! AND sys.block_id = blk.block_id ! AND blk.function_id = fnc.function_id ! AND fnc.module_id = mdl.module_id"; $sql .= $sql_block; *************** *** 451,468 **** blk.block_id FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col WHERE blk.function_id = fnc.function_id ! AND pag.page_id = col.page_id ! AND blk.block_id = bct.block_id ! AND fnc.module_id = mdl.module_id ! AND bct.column_id = col.column_id "; $sql .= $sql_page; ! $sql .= " ORDER BY col.page_id, column_order, block_order"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query page information", "", __LINE__, __FILE__, $sql ); --- 451,468 ---- blk.block_id FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . BLOCK_TABLE . " blk, ! " . FUNCTION_TABLE . " fnc, ! " . MODULE_TABLE . " mdl, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col WHERE blk.function_id = fnc.function_id ! AND pag.page_id = col.page_id ! AND blk.block_id = bct.block_id ! AND fnc.module_id = mdl.module_id ! AND bct.column_id = col.column_id "; $sql .= $sql_page; ! $sql .= " ORDER BY col.page_id, column_order, block_order"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query page information", "", __LINE__, __FILE__, $sql ); *************** *** 1482,1487 **** $this->block_id = $block_id; ! $this->block_config = $mx_cache->read( $this->block_id, MX_CACHE_BLOCK_TYPE, $force_query ); ! $this->_set_all(); } --- 1482,1487 ---- $this->block_id = $block_id; ! $this->block_config = $mx_cache->read( $this->block_id, MX_CACHE_BLOCK_TYPE, $force_query ); ! $this->_set_all(); } *************** *** 1492,1496 **** function hide_me() { ! $this->show_block = false; } --- 1492,1496 ---- function hide_me() { ! $this->show_block = false; } *************** *** 1501,1505 **** function kill_me() { ! $this->_unset(); } --- 1501,1505 ---- function kill_me() { ! $this->_unset(); } *************** *** 3106,3110 **** global $mx_cache; ! $this->page_config = ''; } --- 3106,3110 ---- global $mx_cache; ! $this->page_config = ''; } *************** *** 3216,3220 **** function add_copyright($key = '') { ! $this->mxbb_copyright_addup[] = $key; } --- 3216,3220 ---- function add_copyright($key = '') { ! $this->mxbb_copyright_addup[] = $key; } *************** *** 3252,3256 **** function add_js_file($path = '') { ! $this->mxbb_js_addup[] = $mx_block->module_root_path . $path; } --- 3252,3256 ---- function add_js_file($path = '') { ! $this->mxbb_js_addup[] = $mx_block->module_root_path . $path; } *************** *** 3375,3379 **** if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in']) { ! $this->editcp_exists = true; } } --- 3375,3379 ---- if ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in']) { ! $this->editcp_exists = true; } } *************** *** 3505,3528 **** function mx_getip() { ! if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) ! { ! return getenv("HTTP_CLIENT_IP"); ! } ! else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) ! { ! return getenv("HTTP_X_FORWARDED_FOR"); ! } ! else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) ! { ! return getenv("REMOTE_ADDR"); ! } ! else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) ! { ! return $_SERVER['REMOTE_ADDR']; ! } ! else ! { ! return "unknown"; ! } } --- 3505,3528 ---- function mx_getip() { ! if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) ! { ! return getenv("HTTP_CLIENT_IP"); ! } ! else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) ! { ! return getenv("HTTP_X_FORWARDED_FOR"); ! } ! else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) ! { ! return getenv("REMOTE_ADDR"); ! } ! else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) ! { ! return $_SERVER['REMOTE_ADDR']; ! } ! else ! { ! return "unknown"; ! } } |