diff -r 512951548faa -r e9a7e37bdadd plugins/gallery/browser.php --- a/plugins/gallery/browser.php Wed Aug 26 23:37:37 2009 -0400 +++ b/plugins/gallery/browser.php Sun Aug 01 12:42:21 2010 -0400 @@ -16,15 +16,7 @@ ## BROWSER INTERFACE ## -$plugins->attachHook('base_classes_initted', ' - global $paths; - $paths->add_page(Array( - \'name\'=>\'Image gallery\', - \'urlname\'=>\'Gallery\', - \'namespace\'=>\'Special\', - \'special\'=>0,\'visible\'=>1,\'comments_on\'=>0,\'protected\'=>1,\'delvotes\'=>0,\'delvote_ips\'=>\'\', - )); - '); +$plugins->attachHook('session_started', 'register_special_page("Gallery", "Image gallery");'); /** * Class to handle building the HTML for gallery pages. Called by the pagination function. @@ -281,7 +273,8 @@ $first_row = $row; - $db->sql_data_seek(0, $img_query); + if ( $db->numrows($img_query) > 0 ) + $db->sql_data_seek(0, $img_query); /* $folders = $folders_old; */ } @@ -430,7 +423,8 @@