Changeset 13736 for trunk/include/derivative_std_params.inc.php
- Timestamp:
- Mar 26, 2012, 6:07:03 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/derivative_std_params.inc.php
r13683 r13736 118 118 } 119 119 120 static function load_from_file()121 {122 global $conf;123 $arr = @unserialize(@file_get_contents(PHPWG_ROOT_PATH.$conf['data_location'].'derivatives.dat'));124 if (false!==$arr)125 {126 self::$type_map = $arr['d'];127 self::$watermark = @$arr['w'];128 if (!self::$watermark) self::$watermark = new WatermarkParams();129 self::$custom = @$arr['c'];130 if (!self::$custom) self::$custom = array();131 }132 else133 {134 self::make_default();135 }136 self::build_maps();137 }138 139 120 static function set_watermark($watermark) 140 121 { … … 159 140 ) ); 160 141 conf_update_param('derivatives', addslashes($ser) ); 161 file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'derivatives.dat', $ser);162 142 } 163 143
Note: See TracChangeset
for help on using the changeset viewer.