weighted CDN targets
This commit is contained in:
parent
153e3ca3db
commit
e46c22a228
@ -521,7 +521,18 @@ class Image {
|
|||||||
require_once("lib/flexihash.php");
|
require_once("lib/flexihash.php");
|
||||||
$_flexihash = new Flexihash();
|
$_flexihash = new Flexihash();
|
||||||
foreach(explode(",", $opts) as $opt) {
|
foreach(explode(",", $opts) as $opt) {
|
||||||
$_flexihash->addTarget($opt);
|
$parts = explode("=", $opt);
|
||||||
|
$opt_val = "";
|
||||||
|
$opt_weight = 0;
|
||||||
|
if(count($parts) == 2) {
|
||||||
|
$opt_val = $parts[0];
|
||||||
|
$opt_weight = $parts[1];
|
||||||
|
}
|
||||||
|
elseif(count($parts) == 1) {
|
||||||
|
$opt_val = $parts[0];
|
||||||
|
$opt_weight = 1;
|
||||||
|
}
|
||||||
|
$_flexihash->addTarget($opt_val, $opt_weight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user