only require flexihash once

This commit is contained in:
Shish 2012-02-02 04:35:26 +00:00
parent f198128f06
commit 16745aadc6

View File

@ -27,6 +27,8 @@ $tag_n = 0; // temp hack
$_flexihash = null;
$_fh_last_opts = null;
require_once "lib/flexihash.php";
/**
* An object representing an entry in the images table. As of 2.2, this no
* longer necessarily represents an image per se, but could be a video,
@ -534,7 +536,6 @@ class Image {
if($opts != $_fh_last_opts) {
$_fh_last_opts = $opts;
require_once "lib/flexihash.php";
$_flexihash = new Flexihash();
foreach(explode(",", $opts) as $opt) {
$parts = explode("=", $opt);