backports
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@895 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
94725f1266
commit
c4fdf771ee
@ -29,6 +29,11 @@ class RandomImage extends Extension {
|
||||
$event->page->set_data(file_get_contents($image->get_image_filename()));
|
||||
}
|
||||
}
|
||||
if($event->get_arg(0) == "view") {
|
||||
if(!is_null($image)) {
|
||||
send_event(new DisplayingImageEvent($image, $event->page));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,6 +128,14 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
function check_cli() {
|
||||
if(isset($_SERVER['REMOTE_ADDR'])) {
|
||||
print "This script is to be run from the command line only.";
|
||||
exit;
|
||||
}
|
||||
$_SERVER['REMOTE_ADDR'] = "127.0.0.1";
|
||||
}
|
||||
|
||||
function get_thumbnail_size($orig_width, $orig_height) {
|
||||
global $config;
|
||||
|
||||
|
@ -9,7 +9,6 @@ version_check();
|
||||
sanitise_environment();
|
||||
|
||||
|
||||
|
||||
// load base files
|
||||
$files = array_merge(glob("core/*.php"), glob("ext/*/main.php"));
|
||||
foreach($files as $filename) {
|
||||
@ -40,8 +39,7 @@ if($custom_themelets) {
|
||||
$m = array();
|
||||
foreach($custom_themelets as $filename) {
|
||||
if(preg_match("/themes\/$_theme\/(.*)\.theme\.php/",$filename,$m)
|
||||
&& array_contains($themelets, "ext/{$m[1]}/theme.php"))
|
||||
{
|
||||
&& array_contains($themelets, "ext/{$m[1]}/theme.php")) {
|
||||
require_once $filename;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user