diff --git a/core/config.class.php b/core/config.class.php index 757f191e..913965d4 100644 --- a/core/config.class.php +++ b/core/config.class.php @@ -3,13 +3,10 @@ class Config { var $values = array(); var $defaults = array( 'title' => 'Shimmie', # setup - 'version' => 'Shimmie2-2.0.2', // internal - 'db_version' => '2.0.0.9', // this should be managed by upgrade.php + 'version' => 'Shimmie2-2.0.3', // internal 'front_page' => 'index', # setup 'base_href' => './index.php?q=', # setup 'data_href' => './', # setup - 'theme' => 'default', # setup - 'debug_enabled' => true, # hidden 'index_width' => 3, # index 'index_height' => 4, # index 'index_tips' => true, @@ -17,8 +14,6 @@ class Config { 'thumb_height' => 192, # index 'thumb_quality' => 75, # index 'thumb_mem_limit' => '8MB', # upload - 'tags_default' => 'map', # (ignored) - 'tags_min' => '2', # tags 'upload_count' => 3, # upload 'upload_size' => '256KB', # upload 'upload_anon' => true, # upload diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php index cfbd8723..b4f17c4a 100644 --- a/ext/tag_list/main.php +++ b/ext/tag_list/main.php @@ -1,4 +1,6 @@ page == "index")) { global $config; global $page; - if($config->get_int('tag_list_length') > 0) { + if($config->get_int('tag_list_length', TAG_LIST_LENGTH) > 0) { if(isset($_GET['search'])) { $this->add_refine_block($page, tag_explode($_GET['search'])); } @@ -43,7 +45,7 @@ class TagList extends Extension { if(is_a($event, 'DisplayingImageEvent')) { global $config; - if($config->get_int('tag_list_length') > 0) { + if($config->get_int('tag_list_length', TAG_LIST_LENGTH) > 0) { $this->add_related_block($event->page, $event->image); } } @@ -80,7 +82,7 @@ class TagList extends Extension { global $database; global $config; - $tags_min = $config->get_int('tags_min'); + $tags_min = $config->get_int('tags_min', TAGS_MIN); $result = $database->Execute( "SELECT tag,count FROM tags WHERE count > ? ORDER BY tag", array($tags_min)); @@ -104,7 +106,7 @@ class TagList extends Extension { global $database; global $config; - $tags_min = $config->get_int('tags_min'); + $tags_min = $config->get_int('tags_min', TAGS_MIN); $result = $database->Execute( "SELECT tag,count FROM tags WHERE count > ? ORDER BY tag", array($tags_min)); @@ -131,7 +133,7 @@ class TagList extends Extension { global $database; global $config; - $tags_min = $config->get_int('tags_min'); + $tags_min = $config->get_int('tags_min', TAGS_MIN); $result = $database->Execute( "SELECT tag,count FROM tags WHERE count > ? ORDER BY count DESC, tag ASC", array($tags_min)