scorify the site_description extension

This commit is contained in:
Shish 2009-01-04 08:37:08 -08:00
parent 8dfb7e5ed3
commit 85c8875ffe

View file

@ -9,12 +9,12 @@
class SiteDescription implements Extension {
public function receive_event(Event $event) {
if($event instanceof PageRequestEvent) {
global $config;
if(strlen($config->get_string("site_description")) > 0) {
$description = $config->get_string("site_description");
$event->page->add_header("<meta name=\"description\" content=\"$description\">");
if(strlen($event->context->config->get_string("site_description")) > 0) {
$description = $event->context->config->get_string("site_description");
$event->context->page->add_header("<meta name=\"description\" content=\"$description\">");
}
}
if($event instanceof SetupBuildingEvent) {
$sb = new SetupBlock("Site Description");
$sb->add_longtext_option("site_description");