set version number to 1.0.3.php7
This commit is contained in:
parent
2dc60cd41b
commit
d6843fa2b8
@ -5,9 +5,6 @@
|
|||||||
* string-to-php and general system functions
|
* string-to-php and general system functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* function system_save
|
* function system_save
|
||||||
*
|
*
|
||||||
@ -34,7 +31,8 @@
|
|||||||
* ?>
|
* ?>
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param string $file file path where $array contents will be saved
|
* @param string $file
|
||||||
|
* file path where $array contents will be saved
|
||||||
* @array $var_list list of vars to be saved
|
* @array $var_list list of vars to be saved
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
@ -44,15 +42,13 @@
|
|||||||
function system_save($file, $array) {
|
function system_save($file, $array) {
|
||||||
|
|
||||||
// if ( ( $numargs = func_num_args() ) > 1) {
|
// if ( ( $numargs = func_num_args() ) > 1) {
|
||||||
|
|
||||||
$string = "<?php\n\n";
|
$string = "<?php\n\n";
|
||||||
|
|
||||||
// $arg_list = func_get_args();
|
// $arg_list = func_get_args();
|
||||||
foreach ($array as $key => $arg) {
|
foreach ($array as $key => $arg) {
|
||||||
// $vname = utils_vname ($arg);
|
// $vname = utils_vname ($arg);
|
||||||
// var_export($arg);
|
// var_export($arg);
|
||||||
$s = /*" global {$key};\n*/ "\${$key} = " .
|
$s = /*" global {$key};\n*/ "\${$key} = " . var_export($arg, true) . ";\n";
|
||||||
var_export($arg, true) . ";\n";
|
|
||||||
$string .= $s;
|
$string .= $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,19 +57,19 @@
|
|||||||
return io_write_file($file, $string);
|
return io_write_file($file, $string);
|
||||||
|
|
||||||
// } else die('Wrong number of parameters!');
|
// } else die('Wrong number of parameters!');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function system_hashsalt_save($force = false) {
|
function system_hashsalt_save($force = false) {
|
||||||
global $fp_config;
|
global $fp_config;
|
||||||
if ($force || !file_exists(HASHSALT_FILE))
|
if ($force || !file_exists(HASHSALT_FILE))
|
||||||
return system_save(HASHSALT_FILE, array('fp_hashsalt'=>$fp_config['general']['blogid'] . ABS_PATH . BLOG_BASEURL .mt_rand()));
|
return system_save(HASHSALT_FILE, array(
|
||||||
|
'fp_hashsalt' => $fp_config ['general'] ['blogid'] . ABS_PATH . BLOG_BASEURL . mt_rand()
|
||||||
|
));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define('SYSTEM_VER', '1.0.3.php7');
|
||||||
|
|
||||||
|
|
||||||
define('SYSTEM_VER', '1.0.3');
|
|
||||||
function system_ver() {
|
function system_ver() {
|
||||||
return 'fp-' . SYSTEM_VER;
|
return 'fp-' . SYSTEM_VER;
|
||||||
}
|
}
|
||||||
@ -88,15 +84,18 @@
|
|||||||
// let's compare if one of the first version numbers differs
|
// let's compare if one of the first version numbers differs
|
||||||
// from new version, being greater
|
// from new version, being greater
|
||||||
for($i = 0; $i < $max; $i++) {
|
for($i = 0; $i < $max; $i++) {
|
||||||
if ( $nv_arr[ $i ] > $ov_arr[ $i ] ) { return 1; }
|
if ($nv_arr [$i] > $ov_arr [$i]) {
|
||||||
if ( $nv_arr[ $i ] < $ov_arr[ $i ] ) { return 0; }
|
return 1;
|
||||||
|
}
|
||||||
|
if ($nv_arr [$i] < $ov_arr [$i]) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if they equals, but still new version has more digits
|
// if they equals, but still new version has more digits
|
||||||
// then old-version is still outdated
|
// then old-version is still outdated
|
||||||
if ($cn > $co) return 1;
|
if ($cn > $co)
|
||||||
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function system_generate_id($string) {
|
function system_generate_id($string) {
|
||||||
@ -127,7 +126,6 @@
|
|||||||
unset($GLOBALS [$var]);
|
unset($GLOBALS [$var]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function system_sanitizequery() {
|
function system_sanitizequery() {
|
||||||
@ -153,9 +151,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function system_init_action_params() {
|
function system_init_action_params() {
|
||||||
|
|
||||||
global $fp_params;
|
global $fp_params;
|
||||||
|
|
||||||
$fp_params = array();
|
$fp_params = array();
|
||||||
@ -164,20 +160,16 @@
|
|||||||
$fp_params = utils_kexplode($x, ':;', false);
|
$fp_params = utils_kexplode($x, ':;', false);
|
||||||
|
|
||||||
$fp_params = array_merge($_GET, $fp_params);
|
$fp_params = array_merge($_GET, $fp_params);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function system_init() {
|
function system_init() {
|
||||||
|
|
||||||
system_sanitizequery();
|
system_sanitizequery();
|
||||||
system_unregister_globals();
|
system_unregister_globals();
|
||||||
system_prepare_iis();
|
system_prepare_iis();
|
||||||
|
|
||||||
$GLOBALS['fpdb'] = new FPDB;
|
$GLOBALS ['fpdb'] = new FPDB();
|
||||||
|
|
||||||
$GLOBALS['fp_widgets'] = new widget_indexer;
|
$GLOBALS ['fp_widgets'] = new widget_indexer();
|
||||||
|
|
||||||
$GLOBALS ['smarty'] = & $GLOBALS ['_FP_SMARTY'];
|
$GLOBALS ['smarty'] = & $GLOBALS ['_FP_SMARTY'];
|
||||||
$smarty = & $GLOBALS ['smarty'];
|
$smarty = & $GLOBALS ['smarty'];
|
||||||
@ -194,7 +186,6 @@
|
|||||||
|
|
||||||
$GLOBALS ['lang'] = lang_load();
|
$GLOBALS ['lang'] = lang_load();
|
||||||
|
|
||||||
|
|
||||||
plugin_loadall();
|
plugin_loadall();
|
||||||
|
|
||||||
// init smarty
|
// init smarty
|
||||||
@ -204,7 +195,6 @@
|
|||||||
|
|
||||||
do_action('init');
|
do_action('init');
|
||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function system_seterr($module, $val) {
|
function system_seterr($module, $val) {
|
||||||
@ -230,5 +220,4 @@
|
|||||||
add_action($action, $f);
|
add_action($action, $f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user