self::$type_map ) ); conf_update_param('derivatives', addslashes($ser) ); file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'derivatives.dat', $ser); self::build_maps(); } static function make_default() { self::$type_map[IMG_SQUARE] = new DerivativeParams( SizingParams::square(100,100) ); self::$type_map[IMG_THUMB] = new DerivativeParams( SizingParams::classic(144,144) ); self::$type_map[IMG_SMALL] = new DerivativeParams( SizingParams::classic(240,240) ); self::$type_map[IMG_MEDIUM] = new DerivativeParams( SizingParams::classic(432,432) ); self::$type_map[IMG_LARGE] = new DerivativeParams( SizingParams::classic(648,576) ); self::$type_map[IMG_XLARGE] = new DerivativeParams( SizingParams::classic(864,648) ); self::$type_map[IMG_XXLARGE] = new DerivativeParams( SizingParams::classic(1200,900) ); } private static function build_maps() { foreach (self::$type_map as $type=>$params) { $params->type = $type; } self::$all_type_map = self::$type_map; for ($i=0; $i=0; $j--) { $target = self::$all_types[$j]; if (isset(self::$type_map[$target])) { self::$all_type_map[$tocheck] = self::$type_map[$target]; self::$undefined_type_map[$tocheck] = $target; break; } } } } } } ?>