backport
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@876 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
96509995a8
commit
384e8bbdda
@ -34,15 +34,20 @@ class Featured extends Extension {
|
|||||||
global $config, $database;
|
global $config, $database;
|
||||||
$fid = $config->get_int("featured_id");
|
$fid = $config->get_int("featured_id");
|
||||||
if($fid > 0) {
|
if($fid > 0) {
|
||||||
$this->theme->display_featured($event->page, $database->get_image($fid));
|
$image = $database->get_image($fid);
|
||||||
|
if(!is_null($image)) {
|
||||||
|
$this->theme->display_featured($event->page, $image);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if(is_a($event, 'SetupBuildingEvent')) {
|
if(is_a($event, 'SetupBuildingEvent')) {
|
||||||
$sb = new SetupBlock("Featured Image");
|
$sb = new SetupBlock("Featured Image");
|
||||||
$sb->add_int_option("featured_id", "Image ID: ");
|
$sb->add_int_option("featured_id", "Image ID: ");
|
||||||
$event->panel->add_block($sb);
|
$event->panel->add_block($sb);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if(is_a($event, 'DisplayingImageEvent')) {
|
if(is_a($event, 'DisplayingImageEvent')) {
|
||||||
global $user;
|
global $user;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user