Changeset 13038 for trunk/include/derivative_std_params.inc.php
- Timestamp:
- Feb 6, 2012, 9:59:20 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/derivative_std_params.inc.php
r13021 r13038 73 73 return self::$all_type_map[$type]; 74 74 } 75 75 76 76 static function get_custom($w, $h, $crop=0, $minw=null, $minh=null) 77 77 { … … 99 99 global $conf; 100 100 $arr = @unserialize($conf['derivatives']); 101 if (false!==$arr)102 {103 self::$type_map = $arr['d'];104 self::$watermark = @$arr['w'];105 if (!self::$watermark) self::$watermark = new WatermarkParams();106 }107 else108 {109 self::make_default();110 }111 self::build_maps();112 }113 114 static function load_from_file()115 {116 global $conf;117 $arr = @unserialize(@file_get_contents(PHPWG_ROOT_PATH.$conf['data_location'].'derivatives.dat'));118 101 if (false!==$arr) 119 102 { … … 131 114 } 132 115 116 static function load_from_file() 117 { 118 global $conf; 119 $arr = @unserialize(@file_get_contents(PHPWG_ROOT_PATH.$conf['data_location'].'derivatives.dat')); 120 if (false!==$arr) 121 { 122 self::$type_map = $arr['d']; 123 self::$watermark = @$arr['w']; 124 if (!self::$watermark) self::$watermark = new WatermarkParams(); 125 self::$custom = @$arr['c']; 126 if (!self::$custom) self::$custom = array(); 127 } 128 else 129 { 130 self::make_default(); 131 } 132 self::build_maps(); 133 } 134 133 135 static function set_watermark($watermark) 134 136 { 135 137 self::$watermark = $watermark; 136 138 } 137 139 138 140 static function set_and_save($map) 139 141 { … … 177 179 } 178 180 } 179 181 180 182 private static function build_maps() 181 183 {
Note: See TracChangeset
for help on using the changeset viewer.