From d45a73777935c86fc5131955831833d7465b5e9d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 21 Jan 2013 01:22:01 -0500 Subject: Update copyright to 2013. Fixes #1953. --- modules/server_add/controllers/admin_server_add.php | 2 +- modules/server_add/controllers/server_add.php | 2 +- modules/server_add/helpers/server_add.php | 2 +- modules/server_add/helpers/server_add_event.php | 2 +- modules/server_add/helpers/server_add_installer.php | 2 +- modules/server_add/helpers/server_add_theme.php | 2 +- modules/server_add/models/server_add_entry.php | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/server_add') diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php index 5b75c02d..ba2b9b3f 100644 --- a/modules/server_add/controllers/admin_server_add.php +++ b/modules/server_add/controllers/admin_server_add.php @@ -1,7 +1,7 @@ Date: Tue, 22 Jan 2013 18:39:24 -0500 Subject: gallery.menalto.com -> galleryproject.org codex.gallery2.org -> codex.galleryproject.org Fixes #1957. --- README | 12 ++++++------ index.php | 2 +- installer/cli.php | 4 ++-- installer/views/install.html.php | 4 ++-- modules/akismet/module.info | 6 +++--- modules/comment/module.info | 6 +++--- modules/digibug/module.info | 6 +++--- modules/exif/module.info | 6 +++--- modules/g2_import/module.info | 6 +++--- modules/gallery/helpers/gallery_block.php | 2 +- modules/gallery/helpers/gallery_theme.php | 2 +- modules/gallery/helpers/graphics.php | 2 +- modules/gallery/helpers/l10n_client.php | 2 +- modules/gallery/helpers/upgrade_checker.php | 2 +- modules/gallery/module.info | 6 +++--- modules/gallery/views/admin_graphics.html.php | 2 +- modules/gallery/views/admin_languages.html.php | 2 +- modules/gallery/views/admin_modules.html.php | 2 +- modules/gallery/views/admin_themes.html.php | 6 +++--- modules/gallery/views/error_admin.html.php | 2 +- modules/gallery/views/form_uploadify.html.php | 4 ++-- modules/gallery/views/upgrader.html.php | 4 ++-- modules/gallery/views/welcome_message.html.php | 4 ++-- modules/image_block/module.info | 6 +++--- modules/info/module.info | 6 +++--- modules/notification/module.info | 6 +++--- modules/organize/module.info | 6 +++--- modules/recaptcha/module.info | 6 +++--- modules/rest/module.info | 6 +++--- modules/rss/module.info | 6 +++--- modules/search/module.info | 6 +++--- modules/server_add/module.info | 6 +++--- modules/slideshow/module.info | 6 +++--- modules/tag/module.info | 6 +++--- modules/user/module.info | 6 +++--- modules/watermark/module.info | 6 +++--- themes/admin_wind/theme.info | 6 +++--- themes/wind/theme.info | 6 +++--- 38 files changed, 92 insertions(+), 92 deletions(-) (limited to 'modules/server_add') diff --git a/README b/README index 11256921..b50186d2 100644 --- a/README +++ b/README @@ -15,14 +15,14 @@ welcome theme and module developers to play with this release and start turning out slick new designs for our happy users. If you have questions or problems, you can get help in the Gallery forums: - http://gallery.menalto.com/forum/96 + http://galleryproject.org/forum/96 SECURITY: We've contracted a professional security audit, received their results and resolved all the issues they found. -Did you find a security flaw? Please email security@gallery.menalto.com +Did you find a security flaw? Please email security@galleryproject.org with the details and we'll fix it ASAP! @@ -34,12 +34,12 @@ SUPPORTED CONFIGURATION: - Database: MySQL 5 and newer. For complete system requirements, please refer to: - http://codex.gallery2.org/Gallery3:Requirements + http://codex.galleryproject.org/Gallery3:Requirements INSTALLING AND UPGRADING INSTRUCTIONS: For comprehensive instructions, The online User Guide is your best resource: - http://codex.gallery2.org/Gallery3:User_guide + http://codex.galleryproject.org/Gallery3:User_guide There are also simple instructions below. NOTE: You can upgrade from beta 1 and beyond, but not from alpha releases. @@ -68,7 +68,7 @@ and log in with your SourceForge username and password, then click the QUESTIONS, PROBLEMS: - - Check out the gallery3 FAQ http://codex.gallery2.org/Gallery3:FAQ - - Post to the Gallery 3 forums: http://gallery.menalto.com/forum/96 + - Check out the gallery3 FAQ http://codex.galleryproject.org/Gallery3:FAQ + - Post to the Gallery 3 forums: http://galleryproject.org/forum/96 - Email gallery-devel@lists.sourceforge.net diff --git a/index.php b/index.php index 763cfbbd..9ff8e3b4 100644 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ if (!ini_get("date.timezone")) { !ini_get("short_open_tag") and exit("Gallery requires short_open_tag to be on."); // Suppress errors. For information on how to debug Gallery 3, see: -// http://codex.gallery2.org/Gallery3:FAQ#How_do_I_see_debug_information.3F +// http://codex.galleryproject.org/Gallery3:FAQ#How_do_I_see_debug_information.3F error_reporting(0); // Disabling display_errors will effectively disable Kohana error display diff --git a/installer/cli.php b/installer/cli.php index 93699ba9..f5a9e260 100644 --- a/installer/cli.php +++ b/installer/cli.php @@ -78,8 +78,8 @@ function oops($message) { print "==> " . $message; print "\n"; print "For help you can try:\n"; - print " * The Gallery 3 FAQ - http://codex.gallery2.org/Gallery3:FAQ\n"; - print " * The Gallery Forums - http://gallery.menalto.com/forum\n"; + print " * The Gallery 3 FAQ - http://codex.galleryproject.org/Gallery3:FAQ\n"; + print " * The Gallery Forums - http://galleryproject.org/forum\n"; print "\n\n** INSTALLATION FAILED **\n"; exit(1); } diff --git a/installer/views/install.html.php b/installer/views/install.html.php index a0eddaf3..7a30561a 100644 --- a/installer/views/install.html.php +++ b/installer/views/install.html.php @@ -13,9 +13,9 @@ diff --git a/modules/akismet/module.info b/modules/akismet/module.info index 63473468..263b7b82 100644 --- a/modules/akismet/module.info +++ b/modules/akismet/module.info @@ -2,6 +2,6 @@ name = "Akismet" description = "Filter comments through the Akismet web service to detect and eliminate spam (http://akismet.com). You'll need a WordPress.com API key to use it." version = 1 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:akismet" -discuss_url = "http://gallery.menalto.com/forum_module_akismet" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:akismet" +discuss_url = "http://galleryproject.org/forum_module_akismet" diff --git a/modules/comment/module.info b/modules/comment/module.info index 97e8a73b..b69379fa 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -2,6 +2,6 @@ name = "Comments" description = "Allows users and guests to leave comments on photos and albums." version = 7 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:comment" -discuss_url = "http://gallery.menalto.com/forum_module_comment" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:comment" +discuss_url = "http://galleryproject.org/forum_module_comment" diff --git a/modules/digibug/module.info b/modules/digibug/module.info index 781d5f01..5e5ca10f 100644 --- a/modules/digibug/module.info +++ b/modules/digibug/module.info @@ -2,6 +2,6 @@ name = "Digibug" description = "Digibug Photo Printing Module" version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:digibug" -discuss_url = "http://gallery.menalto.com/forum_module_digibug" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:digibug" +discuss_url = "http://galleryproject.org/forum_module_digibug" diff --git a/modules/exif/module.info b/modules/exif/module.info index e266e20e..9bbda957 100644 --- a/modules/exif/module.info +++ b/modules/exif/module.info @@ -2,6 +2,6 @@ name = "Exif Data" description = "Extract Exif data and display it on photo pages." version = 1 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:exif" -discuss_url = "http://gallery.menalto.com/forum_module_exif" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:exif" +discuss_url = "http://galleryproject.org/forum_module_exif" diff --git a/modules/g2_import/module.info b/modules/g2_import/module.info index 6b03d097..32af27d0 100644 --- a/modules/g2_import/module.info +++ b/modules/g2_import/module.info @@ -2,6 +2,6 @@ name = "Gallery 2 Import" description = "Import your Gallery 2 content into Gallery 3" version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:g2_import" -discuss_url = "http://gallery.menalto.com/forum_module_g2_import" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:g2_import" +discuss_url = "http://galleryproject.org/forum_module_g2_import" diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index 5ab811de..5ac4d74d 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -78,7 +78,7 @@ class gallery_block_Core { $block->css_id = "g-project-news"; $block->title = t("Gallery project news"); $block->content = new View("admin_block_news.html"); - $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); + $block->content->feed = feed::parse("http://galleryproject.org/node/feed", 3); break; case "block_adder": diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index e592db53..f94b9ecd 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -134,7 +134,7 @@ class gallery_theme_Core { 'Gallery ' . gallery::version_string() . ''); return "
  • " . t(module::get_var("gallery", "credits"), - array("url" => "http://gallery.menalto.com", + array("url" => "http://galleryproject.org", "gallery_version" => $version_string)) . "
  • "; } diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php index b8735120..51437d4b 100644 --- a/modules/gallery/helpers/graphics.php +++ b/modules/gallery/helpers/graphics.php @@ -124,7 +124,7 @@ class graphics_Core { // don't do this, the album may be permanently marked as "needs rebuilding" // // ref: http://sourceforge.net/apps/trac/gallery/ticket/1172 - // http://gallery.menalto.com/node/96926 + // http://galleryproject.org/node/96926 if ($item->album_cover_item_id) { $item->album_cover_item_id = null; $item->save(); diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php index 5954865d..2a1be2f9 100644 --- a/modules/gallery/helpers/l10n_client.php +++ b/modules/gallery/helpers/l10n_client.php @@ -21,7 +21,7 @@ class l10n_client_Core { private static function _server_url($path) { - return "http://gallery.menalto.com/translations/$path"; + return "http://galleryproject.org/translations/$path"; } static function server_api_key_url() { diff --git a/modules/gallery/helpers/upgrade_checker.php b/modules/gallery/helpers/upgrade_checker.php index 5059e619..492f72e9 100644 --- a/modules/gallery/helpers/upgrade_checker.php +++ b/modules/gallery/helpers/upgrade_checker.php @@ -18,7 +18,7 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class upgrade_checker_Core { - const CHECK_URL = "http://gallery.menalto.com/versioncheck/gallery3"; + const CHECK_URL = "http://galleryproject.org/versioncheck/gallery3"; const AUTO_CHECK_INTERVAL = 604800; // 7 days in seconds /** diff --git a/modules/gallery/module.info b/modules/gallery/module.info index 64cad0a7..566ca2eb 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -2,6 +2,6 @@ name = "Gallery 3" description = "Gallery core application" version = 53 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:gallery" -discuss_url = "http://gallery.menalto.com/forum_module_gallery" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:gallery" +discuss_url = "http://galleryproject.org/forum_module_gallery" diff --git a/modules/gallery/views/admin_graphics.html.php b/modules/gallery/views/admin_graphics.html.php index ae76f1e1..1f45bb14 100644 --- a/modules/gallery/views/admin_graphics.html.php +++ b/modules/gallery/views/admin_graphics.html.php @@ -16,7 +16,7 @@

    - We can help!", array("url" => "http://codex.gallery2.org/Gallery3:Choosing_A_Graphics_Toolkit")) ?> + We can help!", array("url" => "http://codex.galleryproject.org/Gallery3:Choosing_A_Graphics_Toolkit")) ?>

    diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index eef087e1..d6a9c225 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -80,7 +80,7 @@

    - for_html_attr() ?>"> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 03993bb2..5a7f7b6c 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -43,7 +43,7 @@

    - adding more modules! Each module provides new cool features.", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Modules")) ?> + adding more modules! Each module provides new cool features.", array("url" => "http://codex.galleryproject.org/Category:Gallery_3:Modules")) ?>

    diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php index 9d53779f..547f27d2 100644 --- a/modules/gallery/views/admin_themes.html.php +++ b/modules/gallery/views/admin_themes.html.php @@ -10,7 +10,7 @@

    - with a new theme! There are separate themes for the regular site and for the administration interface. Click a theme below to preview and activate it.", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?> + with a new theme! There are separate themes for the regular site and for the administration interface. Click a theme below to preview and activate it.", array("url" => "http://codex.galleryproject.org/Category:Gallery_3:Themes")) ?>

    @@ -48,7 +48,7 @@

    - Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?> + Download one now!", array("url" => "http://codex.galleryproject.org/Category:Gallery_3:Themes")) ?>

    @@ -88,7 +88,7 @@

    - Download one now!", array("url" => "http://codex.gallery2.org/Category:Gallery_3:Themes")) ?> + Download one now!", array("url" => "http://codex.galleryproject.org/Category:Gallery_3:Themes")) ?>

    diff --git a/modules/gallery/views/error_admin.html.php b/modules/gallery/views/error_admin.html.php index 3e7c286e..cd1bd569 100644 --- a/modules/gallery/views/error_admin.html.php +++ b/modules/gallery/views/error_admin.html.php @@ -170,7 +170,7 @@

    There's an error message below and you can find more details in gallery3/var/logs (look for the file with the most recent - date on it). Stuck? Stop by the Gallery 3 + date on it). Stuck? Stop by the Gallery 3 Forums and ask for help. You can also look at our list of open tickets to see if the problem you're seeing has been diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index c1f985c3..4426514a 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -89,7 +89,7 @@ .replace("__INFO__", errorObj.info) .replace("__TYPE__", errorObj.type); } - msg = " - " + + msg = " - " + error_msg + ""; $("#g-add-photos-status ul").append( @@ -131,7 +131,7 @@ admin && !$movies_allowed): ?>

    - ffmpeg on your system. Movie uploading disabled. Help!", array("help_url" => "http://codex.gallery2.org/Gallery3:FAQ#Why_does_it_say_I.27m_missing_ffmpeg.3F")) ?> + ffmpeg on your system. Movie uploading disabled. Help!", array("help_url" => "http://codex.galleryproject.org/Gallery3:FAQ#Why_does_it_say_I.27m_missing_ffmpeg.3F")) ?>

    diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php index 70d37dd1..edfaf720 100644 --- a/modules/gallery/views/upgrader.html.php +++ b/modules/gallery/views/upgrader.html.php @@ -144,8 +144,8 @@

    FAQ or ask in the Gallery forums.", - array("faq_url" => "http://codex.gallery2.org/Gallery3:FAQ", - "forums_url" => "http://gallery.menalto.com/forum")) ?> + array("faq_url" => "http://codex.galleryproject.org/Gallery3:FAQ", + "forums_url" => "http://galleryproject.org/forum")) ?>

    diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php index 1fcca971..bb6b4a83 100644 --- a/modules/gallery/views/welcome_message.html.php +++ b/modules/gallery/views/welcome_message.html.php @@ -27,10 +27,10 @@

    - Gallery website has news and information about the Gallery project and community.", array("url" => "http://gallery.menalto.com")) ?> + Gallery website has news and information about the Gallery project and community.", array("url" => "http://galleryproject.org")) ?>

    - documentation site or you can ask for help in the forums!", array("codex_url" => "http://codex.gallery2.org/Main_Page", "forum_url" => "http://gallery.menalto.com/forum")) ?> + documentation site or you can ask for help in the forums!", array("codex_url" => "http://codex.galleryproject.org/Main_Page", "forum_url" => "http://galleryproject.org/forum")) ?>

    diff --git a/modules/image_block/module.info b/modules/image_block/module.info index 6722cc8f..25b89e6a 100644 --- a/modules/image_block/module.info +++ b/modules/image_block/module.info @@ -2,6 +2,6 @@ name = "Image Block" description = "Display a random image in the sidebar" version = 3 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:image_block" -discuss_url = "http://gallery.menalto.com/forum_module_image_block" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:image_block" +discuss_url = "http://galleryproject.org/forum_module_image_block" diff --git a/modules/info/module.info b/modules/info/module.info index f8964a78..0f35c922 100644 --- a/modules/info/module.info +++ b/modules/info/module.info @@ -2,6 +2,6 @@ name = "Info" description = "Display extra information about photos and albums" version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:info" -discuss_url = "http://gallery.menalto.com/forum_module_info" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:info" +discuss_url = "http://galleryproject.org/forum_module_info" diff --git a/modules/notification/module.info b/modules/notification/module.info index 84be8f99..0e2cdb65 100644 --- a/modules/notification/module.info +++ b/modules/notification/module.info @@ -2,6 +2,6 @@ name = "Notification" description = "Send notifications to users when changes are made to watched albums." version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:notification" -discuss_url = "http://gallery.menalto.com/forum_module_notification" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:notification" +discuss_url = "http://galleryproject.org/forum_module_notification" diff --git a/modules/organize/module.info b/modules/organize/module.info index 07b9dc38..4d4560b9 100644 --- a/modules/organize/module.info +++ b/modules/organize/module.info @@ -2,6 +2,6 @@ name = "Organize" description = "Visually rearrange and move photos in your gallery" version = 4 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:organize" -discuss_url = "http://gallery.menalto.com/forum_module_organize" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:organize" +discuss_url = "http://galleryproject.org/forum_module_organize" diff --git a/modules/recaptcha/module.info b/modules/recaptcha/module.info index ebaff7de..6806bb91 100644 --- a/modules/recaptcha/module.info +++ b/modules/recaptcha/module.info @@ -2,6 +2,6 @@ name = "reCAPTCHA" description = "reCAPTCHA displays a graphical verification that protects the input form from abuse from 'bots,' or automated programs usually written to generate spam (http://recaptcha.net)." version = 1 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:recaptcha" -discuss_url = "http://gallery.menalto.com/forum_module_recaptcha" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:recaptcha" +discuss_url = "http://galleryproject.org/forum_module_recaptcha" diff --git a/modules/rest/module.info b/modules/rest/module.info index 33c9f1cf..93a7873b 100644 --- a/modules/rest/module.info +++ b/modules/rest/module.info @@ -3,6 +3,6 @@ description = "A REST-based API that allows desktop clients and other apps to in version = 3 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:rest" -discuss_url = "http://gallery.menalto.com/forum_module_rest" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:rest" +discuss_url = "http://galleryproject.org/forum_module_rest" diff --git a/modules/rss/module.info b/modules/rss/module.info index cd13c1b0..5f32387e 100644 --- a/modules/rss/module.info +++ b/modules/rss/module.info @@ -2,6 +2,6 @@ name = "RSS" description = "Provides RSS feeds" version = 1 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:rss" -discuss_url = "http://gallery.menalto.com/forum_module_rss" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:rss" +discuss_url = "http://galleryproject.org/forum_module_rss" diff --git a/modules/search/module.info b/modules/search/module.info index 1389798d..f1bb1fab 100644 --- a/modules/search/module.info +++ b/modules/search/module.info @@ -2,6 +2,6 @@ name = "Search" description = "Allows users to search their Gallery" version = 1 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:search" -discuss_url = "http://gallery.menalto.com/forum_module_search" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:search" +discuss_url = "http://galleryproject.org/forum_module_search" diff --git a/modules/server_add/module.info b/modules/server_add/module.info index 4ce0a97d..dc455c71 100644 --- a/modules/server_add/module.info +++ b/modules/server_add/module.info @@ -2,6 +2,6 @@ name = "Server Add" description = "Allows authorized users to load images directly from your web server" version = 4 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:server_add" -discuss_url = "http://gallery.menalto.com/forum_module_server_add" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:server_add" +discuss_url = "http://galleryproject.org/forum_module_server_add" diff --git a/modules/slideshow/module.info b/modules/slideshow/module.info index 8c9a3176..2d71f710 100644 --- a/modules/slideshow/module.info +++ b/modules/slideshow/module.info @@ -2,6 +2,6 @@ name = "Slideshow" description = "Allows users to view a slideshow of photos" version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:slideshow" -discuss_url = "http://gallery.menalto.com/forum_module_slideshow" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:slideshow" +discuss_url = "http://galleryproject.org/forum_module_slideshow" diff --git a/modules/tag/module.info b/modules/tag/module.info index 75d16bf0..19fbdb45 100644 --- a/modules/tag/module.info +++ b/modules/tag/module.info @@ -2,6 +2,6 @@ name = "Tags" description = "Allows users to tag photos and albums" version = 3 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:tag" -discuss_url = "http://gallery.menalto.com/forum_module_tag" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:tag" +discuss_url = "http://galleryproject.org/forum_module_tag" diff --git a/modules/user/module.info b/modules/user/module.info index 503bcd0d..d5128db4 100644 --- a/modules/user/module.info +++ b/modules/user/module.info @@ -3,6 +3,6 @@ description = "Gallery 3 user and group management" version = 4 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:user" -discuss_url = "http://gallery.menalto.com/forum_module_user" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:user" +discuss_url = "http://galleryproject.org/forum_module_user" diff --git a/modules/watermark/module.info b/modules/watermark/module.info index 58efa43f..e5003cda 100644 --- a/modules/watermark/module.info +++ b/modules/watermark/module.info @@ -2,6 +2,6 @@ name = "Watermarks" description = "Allows users to watermark their photos" version = 2 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Modules:watermark" -discuss_url = "http://gallery.menalto.com/forum_module_watermark" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Modules:watermark" +discuss_url = "http://galleryproject.org/forum_module_watermark" diff --git a/themes/admin_wind/theme.info b/themes/admin_wind/theme.info index 466d8e43..e2be9284 100644 --- a/themes/admin_wind/theme.info +++ b/themes/admin_wind/theme.info @@ -5,6 +5,6 @@ author = "Gallery Team" admin = 1 site = 0 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Themes:admin_wind" -discuss_url = "http://gallery.menalto.com/forum_theme_admin_wind" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Themes:admin_wind" +discuss_url = "http://galleryproject.org/forum_theme_admin_wind" diff --git a/themes/wind/theme.info b/themes/wind/theme.info index e0be78b9..b00e56d7 100644 --- a/themes/wind/theme.info +++ b/themes/wind/theme.info @@ -5,6 +5,6 @@ author = "Gallery Team" site = 1 admin = 0 author_name = "Gallery Team" -author_url = "http://codex.gallery2.org/Gallery:Team" -info_url = "http://codex.gallery2.org/Gallery3:Themes:wind" -discuss_url = "http://gallery.menalto.com/forum_theme_wind" +author_url = "http://codex.galleryproject.org/Gallery:Team" +info_url = "http://codex.galleryproject.org/Gallery3:Themes:wind" +discuss_url = "http://galleryproject.org/forum_theme_wind" -- cgit v1.2.3 From 5fca371a616dba16f955087c4477ee229ee222d0 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Mon, 28 Jan 2013 23:31:18 +0100 Subject: #1945 - Extend legal_file helper functions. - Added get_types_by_extension function, which is a merged version of get...types_by_extension functions (similar to get_extensions). - Added optional extension argument to get...extensions functions similar to get...types_by_extension functions. - Added unit tests. Now, every legal_file function has one. - Restructured helper file to include caches. - Added array_unique to get...types (derived from get...types_by_extension, which can be many-to-one). - Edited server_add, uploader, and item model to use new functionality. --- modules/gallery/controllers/uploader.php | 2 +- modules/gallery/helpers/legal_file.php | 146 +++++++++++++++++------ modules/gallery/models/item.php | 13 +- modules/gallery/tests/Legal_File_Helper_Test.php | 57 +++++++++ modules/server_add/controllers/server_add.php | 8 +- 5 files changed, 176 insertions(+), 50 deletions(-) (limited to 'modules/server_add') diff --git a/modules/gallery/controllers/uploader.php b/modules/gallery/controllers/uploader.php index b2ec5b55..55c65c95 100644 --- a/modules/gallery/controllers/uploader.php +++ b/modules/gallery/controllers/uploader.php @@ -69,7 +69,7 @@ class Uploader_Controller extends Controller { $path_info = @pathinfo($temp_filename); if (array_key_exists("extension", $path_info) && - in_array(strtolower($path_info["extension"]), legal_file::get_movie_extensions())) { + legal_file::get_movie_extensions($path_info["extension"])) { $item->type = "movie"; $item->save(); log::success("content", t("Added a movie"), diff --git a/modules/gallery/helpers/legal_file.php b/modules/gallery/helpers/legal_file.php index 5768cf14..ab9047c8 100644 --- a/modules/gallery/helpers/legal_file.php +++ b/modules/gallery/helpers/legal_file.php @@ -18,6 +18,13 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class legal_file_Core { + private static $photo_types_by_extension; + private static $movie_types_by_extension; + private static $photo_extensions; + private static $movie_extensions; + private static $photo_types; + private static $movie_types; + /** * Create a default list of allowed photo MIME types paired with their extensions and then let * modules modify it. This is an ordered map, mapping extensions to their MIME types. @@ -26,21 +33,24 @@ class legal_file_Core { * @param string $extension (opt.) - return MIME of extension; if not given, return complete array */ static function get_photo_types_by_extension($extension=null) { - $types_by_extension_wrapper = new stdClass(); - $types_by_extension_wrapper->types_by_extension = array( - "jpg" => "image/jpeg", "jpeg" => "image/jpeg", "gif" => "image/gif", "png" => "image/png"); - module::event("photo_types_by_extension", $types_by_extension_wrapper); + if (empty(self::$photo_types_by_extension)) { + $types_by_extension_wrapper = new stdClass(); + $types_by_extension_wrapper->types_by_extension = array( + "jpg" => "image/jpeg", "jpeg" => "image/jpeg", "gif" => "image/gif", "png" => "image/png"); + module::event("photo_types_by_extension", $types_by_extension_wrapper); + self::$photo_types_by_extension = $types_by_extension_wrapper->types_by_extension; + } if ($extension) { // return matching MIME type $extension = strtolower($extension); - if (isset($types_by_extension_wrapper->types_by_extension[$extension])) { - return $types_by_extension_wrapper->types_by_extension[$extension]; + if (isset(self::$photo_types_by_extension[$extension])) { + return self::$photo_types_by_extension[$extension]; } else { return null; } } else { // return complete array - return $types_by_extension_wrapper->types_by_extension; + return self::$photo_types_by_extension; } } @@ -52,53 +62,111 @@ class legal_file_Core { * @param string $extension (opt.) - return MIME of extension; if not given, return complete array */ static function get_movie_types_by_extension($extension=null) { - $types_by_extension_wrapper = new stdClass(); - $types_by_extension_wrapper->types_by_extension = array( - "flv" => "video/x-flv", "mp4" => "video/mp4", "m4v" => "video/x-m4v"); - module::event("movie_types_by_extension", $types_by_extension_wrapper); + if (empty(self::$movie_types_by_extension)) { + $types_by_extension_wrapper = new stdClass(); + $types_by_extension_wrapper->types_by_extension = array( + "flv" => "video/x-flv", "mp4" => "video/mp4", "m4v" => "video/x-m4v"); + module::event("movie_types_by_extension", $types_by_extension_wrapper); + self::$movie_types_by_extension = $types_by_extension_wrapper->types_by_extension; + } + if ($extension) { + // return matching MIME type + $extension = strtolower($extension); + if (isset(self::$movie_types_by_extension[$extension])) { + return self::$movie_types_by_extension[$extension]; + } else { + return null; + } + } else { + // return complete array + return self::$movie_types_by_extension; + } + } + + /** + * Create a merged list of all allowed photo and movie MIME types paired with their extensions. + * + * @param string $extension (opt.) - return MIME of extension; if not given, return complete array + */ + static function get_types_by_extension($extension=null) { + $types_by_extension = legal_file::get_photo_types_by_extension(); + if (movie::find_ffmpeg()) { + $types_by_extension = array_merge($types_by_extension, + legal_file::get_movie_types_by_extension()); + } if ($extension) { // return matching MIME type $extension = strtolower($extension); - if (isset($types_by_extension_wrapper->types_by_extension[$extension])) { - return $types_by_extension_wrapper->types_by_extension[$extension]; + if (isset($types_by_extension[$extension])) { + return $types_by_extension[$extension]; } else { return null; } } else { // return complete array - return $types_by_extension_wrapper->types_by_extension; + return $types_by_extension; } } /** * Create a default list of allowed photo extensions and then let modules modify it. + * + * @param string $extension (opt.) - return true if allowed; if not given, return complete array */ - static function get_photo_extensions() { - $extensions_wrapper = new stdClass(); - $extensions_wrapper->extensions = array_keys(legal_file::get_photo_types_by_extension()); - module::event("legal_photo_extensions", $extensions_wrapper); - return $extensions_wrapper->extensions; + static function get_photo_extensions($extension=null) { + if (empty(self::$photo_extensions)) { + $extensions_wrapper = new stdClass(); + $extensions_wrapper->extensions = array_keys(legal_file::get_photo_types_by_extension()); + module::event("legal_photo_extensions", $extensions_wrapper); + self::$photo_extensions = $extensions_wrapper->extensions; + } + if ($extension) { + // return true if in array, false if not + return in_array(strtolower($extension), self::$photo_extensions); + } else { + // return complete array + return self::$photo_extensions; + } } /** * Create a default list of allowed movie extensions and then let modules modify it. + * + * @param string $extension (opt.) - return true if allowed; if not given, return complete array */ - static function get_movie_extensions() { - $extensions_wrapper = new stdClass(); - $extensions_wrapper->extensions = array_keys(legal_file::get_movie_types_by_extension()); - module::event("legal_movie_extensions", $extensions_wrapper); - return $extensions_wrapper->extensions; + static function get_movie_extensions($extension=null) { + if (empty(self::$movie_extensions)) { + $extensions_wrapper = new stdClass(); + $extensions_wrapper->extensions = array_keys(legal_file::get_movie_types_by_extension()); + module::event("legal_movie_extensions", $extensions_wrapper); + self::$movie_extensions = $extensions_wrapper->extensions; + } + if ($extension) { + // return true if in array, false if not + return in_array(strtolower($extension), self::$movie_extensions); + } else { + // return complete array + return self::$movie_extensions; + } } /** * Create a merged list of all allowed photo and movie extensions. + * + * @param string $extension (opt.) - return true if allowed; if not given, return complete array */ - static function get_extensions() { + static function get_extensions($extension=null) { $extensions = legal_file::get_photo_extensions(); if (movie::find_ffmpeg()) { $extensions = array_merge($extensions, legal_file::get_movie_extensions()); } - return $extensions; + if ($extension) { + // return true if in array, false if not + return in_array(strtolower($extension), $extensions); + } else { + // return complete array + return $extensions; + } } /** @@ -119,10 +187,14 @@ class legal_file_Core { * (e.g. flv maps to video/x-flv by default, but video/flv is still legal). */ static function get_photo_types() { - $types_wrapper = new stdClass(); - $types_wrapper->types = array_values(legal_file::get_photo_types_by_extension()); - module::event("legal_photo_types", $types_wrapper); - return $types_wrapper->types; + if (empty(self::$photo_types)) { + $types_wrapper = new stdClass(); + // Need array_unique since types_by_extension can be many-to-one (e.g. jpeg and jpg). + $types_wrapper->types = array_unique(array_values(legal_file::get_photo_types_by_extension())); + module::event("legal_photo_types", $types_wrapper); + self::$photo_types = $types_wrapper->types; + } + return self::$photo_types; } /** @@ -131,11 +203,15 @@ class legal_file_Core { * (e.g. flv maps to video/x-flv by default, but video/flv is still legal). */ static function get_movie_types() { - $types_wrapper = new stdClass(); - $types_wrapper->types = array_values(legal_file::get_movie_types_by_extension()); - $types_wrapper->types[] = "video/flv"; - module::event("legal_movie_types", $types_wrapper); - return $types_wrapper->types; + if (empty(self::$movie_types)) { + $types_wrapper = new stdClass(); + // Need array_unique since types_by_extension can be many-to-one (e.g. jpeg and jpg). + $types_wrapper->types = array_unique(array_values(legal_file::get_movie_types_by_extension())); + $types_wrapper->types[] = "video/flv"; + module::event("legal_movie_types", $types_wrapper); + self::$movie_types = $types_wrapper->types; + } + return self::$movie_types; } /** diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index e4b997aa..60318c26 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -879,16 +879,9 @@ class Item_Model_Core extends ORM_MPTT { return; } - if ($this->is_photo()) { - if (!in_array(strtolower($ext), legal_file::get_photo_extensions())) { - $v->add_error("name", "illegal_data_file_extension"); - } - } - - if ($this->is_movie()) { - if (!in_array(strtolower($ext), legal_file::get_movie_extensions())) { - $v->add_error("name", "illegal_data_file_extension"); - } + if ($this->is_photo() && !legal_file::get_photo_extensions($ext) || + $this->is_movie() && !legal_file::get_movie_extensions($ext)) { + $v->add_error("name", "illegal_data_file_extension"); } } diff --git a/modules/gallery/tests/Legal_File_Helper_Test.php b/modules/gallery/tests/Legal_File_Helper_Test.php index 5db99935..84a29a52 100644 --- a/modules/gallery/tests/Legal_File_Helper_Test.php +++ b/modules/gallery/tests/Legal_File_Helper_Test.php @@ -40,6 +40,63 @@ class Legal_File_Helper_Test extends Gallery_Unit_Test_Case { $this->assert_equal(3, count(legal_file::get_movie_types_by_extension())); } + public function get_types_by_extension_test() { + $this->assert_equal("image/jpeg", legal_file::get_types_by_extension("jpg")); // photo + $this->assert_equal("video/x-flv", legal_file::get_types_by_extension("FLV")); // movie + $this->assert_equal(null, legal_file::get_types_by_extension("php")); // invalid + $this->assert_equal(null, legal_file::get_types_by_extension("php.flv")); // invalid w/ . + + // No extension returns full array + $this->assert_equal(7, count(legal_file::get_types_by_extension())); + } + + public function get_photo_extensions_test() { + $this->assert_equal(true, legal_file::get_photo_extensions("jpg")); // regular + $this->assert_equal(true, legal_file::get_photo_extensions("JPG")); // all caps + $this->assert_equal(true, legal_file::get_photo_extensions("Png")); // some caps + $this->assert_equal(false, legal_file::get_photo_extensions("php")); // invalid + $this->assert_equal(false, legal_file::get_photo_extensions("php.jpg")); // invalid w/ . + + // No extension returns full array + $this->assert_equal(4, count(legal_file::get_photo_extensions())); + } + + public function get_movie_extensions_test() { + $this->assert_equal(true, legal_file::get_movie_extensions("flv")); // regular + $this->assert_equal(true, legal_file::get_movie_extensions("FLV")); // all caps + $this->assert_equal(true, legal_file::get_movie_extensions("Mp4")); // some caps + $this->assert_equal(false, legal_file::get_movie_extensions("php")); // invalid + $this->assert_equal(false, legal_file::get_movie_extensions("php.jpg")); // invalid w/ . + + // No extension returns full array + $this->assert_equal(3, count(legal_file::get_movie_extensions())); + } + + public function get_extensions_test() { + $this->assert_equal(true, legal_file::get_extensions("jpg")); // photo + $this->assert_equal(true, legal_file::get_extensions("FLV")); // movie + $this->assert_equal(false, legal_file::get_extensions("php")); // invalid + $this->assert_equal(false, legal_file::get_extensions("php.jpg")); // invalid w/ . + + // No extension returns full array + $this->assert_equal(7, count(legal_file::get_extensions())); + } + + public function get_filters_test() { + // All 7 extensions both uppercase and lowercase + $this->assert_equal(14, count(legal_file::get_filters())); + } + + public function get_photo_types_test() { + // Note that this is one *less* than photo extensions since jpeg and jpg have the same mime. + $this->assert_equal(3, count(legal_file::get_photo_types())); + } + + public function get_movie_types_test() { + // Note that this is one *more* than movie extensions since video/flv is added. + $this->assert_equal(4, count(legal_file::get_movie_types())); + } + public function change_extension_test() { $this->assert_equal("foo.jpg", legal_file::change_extension("foo.png", "jpg")); } diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php index df55d8db..f6e0a944 100644 --- a/modules/server_add/controllers/server_add.php +++ b/modules/server_add/controllers/server_add.php @@ -61,7 +61,7 @@ class Server_Add_Controller extends Admin_Controller { } if (!is_dir($file)) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); - if (!in_array($ext, legal_file::get_extensions())) { + if (!legal_file::get_extensions($ext)) { continue; } } @@ -169,7 +169,7 @@ class Server_Add_Controller extends Admin_Controller { foreach ($child_paths as $child_path) { if (!is_dir($child_path)) { $ext = strtolower(pathinfo($child_path, PATHINFO_EXTENSION)); - if (!in_array($ext, legal_file::get_extensions()) || !filesize($child_path)) { + if (!legal_file::get_extensions($ext) || !filesize($child_path)) { // Not importable, skip it. continue; } @@ -255,7 +255,7 @@ class Server_Add_Controller extends Admin_Controller { } else { try { $extension = strtolower(pathinfo($name, PATHINFO_EXTENSION)); - if (in_array($extension, legal_file::get_photo_extensions())) { + if (legal_file::get_photo_extensions($extension)) { $photo = ORM::factory("item"); $photo->type = "photo"; $photo->parent_id = $parent->id; @@ -265,7 +265,7 @@ class Server_Add_Controller extends Admin_Controller { $photo->owner_id = $owner_id; $photo->save(); $entry->item_id = $photo->id; - } else if (in_array($extension, legal_file::get_movie_extensions())) { + } else if (legal_file::get_movie_extensions($extension)) { $movie = ORM::factory("item"); $movie->type = "movie"; $movie->parent_id = $parent->id; -- cgit v1.2.3 From 93963422505ecc790af62ae0503f301145debac3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 31 Jan 2013 19:55:53 -0500 Subject: Drop the requirement to have the install() function set the module version. It's redundant. Fixes #1985. --- modules/comment/helpers/comment_installer.php | 1 - modules/digibug/helpers/digibug_installer.php | 1 - modules/exif/helpers/exif_installer.php | 1 - modules/g2_import/helpers/g2_import_installer.php | 1 - modules/gallery/helpers/gallery_installer.php | 2 -- modules/gallery/helpers/module.php | 3 +-- modules/image_block/helpers/image_block_installer.php | 1 - modules/info/helpers/info_installer.php | 1 - modules/notification/helpers/notification_installer.php | 2 -- modules/rest/helpers/rest_installer.php | 1 - modules/search/helpers/search_installer.php | 1 - modules/server_add/helpers/server_add_installer.php | 1 - modules/slideshow/helpers/slideshow_installer.php | 1 - modules/tag/helpers/tag_installer.php | 1 - modules/user/helpers/user_installer.php | 1 - modules/watermark/helpers/watermark_installer.php | 1 - 16 files changed, 1 insertion(+), 19 deletions(-) (limited to 'modules/server_add') diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 6dbd31cf..136f96ef 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -49,7 +49,6 @@ class comment_installer { module::set_var("comment", "spam_caught", 0); module::set_var("comment", "access_permissions", "everybody"); module::set_var("comment", "rss_visible", "all"); - module::set_version("comment", 7); } static function upgrade($version) { diff --git a/modules/digibug/helpers/digibug_installer.php b/modules/digibug/helpers/digibug_installer.php index b2e529d7..be88b5ec 100644 --- a/modules/digibug/helpers/digibug_installer.php +++ b/modules/digibug/helpers/digibug_installer.php @@ -30,7 +30,6 @@ class digibug_installer { module::set_var("digibug", "company_id", "3153"); module::set_var("digibug", "event_id", "8491"); - module::set_version("digibug", 2); } static function upgrade($version) { diff --git a/modules/exif/helpers/exif_installer.php b/modules/exif/helpers/exif_installer.php index f4c2aa3b..75d0f835 100644 --- a/modules/exif/helpers/exif_installer.php +++ b/modules/exif/helpers/exif_installer.php @@ -29,7 +29,6 @@ class exif_installer { PRIMARY KEY (`id`), KEY(`item_id`)) DEFAULT CHARSET=utf8;"); - module::set_version("exif", 1); } static function activate() { diff --git a/modules/g2_import/helpers/g2_import_installer.php b/modules/g2_import/helpers/g2_import_installer.php index b0c14425..c7569819 100644 --- a/modules/g2_import/helpers/g2_import_installer.php +++ b/modules/g2_import/helpers/g2_import_installer.php @@ -31,7 +31,6 @@ class g2_import_installer { KEY `g2_id` (`g2_id`)) DEFAULT CHARSET=utf8;"); - module::set_version("g2_import", 2); mkdir(VARPATH . "modules/g2_import"); } diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php index d4c4de14..7f10cdee 100644 --- a/modules/gallery/helpers/gallery_installer.php +++ b/modules/gallery/helpers/gallery_installer.php @@ -315,8 +315,6 @@ class gallery_installer { module::set_var("gallery", "timezone", null); module::set_var("gallery", "lock_timeout", 1); module::set_var("gallery", "movie_extract_frame_time", 3); - - module::set_version("gallery", 55); } static function upgrade($version) { diff --git a/modules/gallery/helpers/module.php b/modules/gallery/helpers/module.php index f4ab5571..df258e87 100644 --- a/modules/gallery/helpers/module.php +++ b/modules/gallery/helpers/module.php @@ -175,9 +175,8 @@ class module_Core { $installer_class = "{$module_name}_installer"; if (method_exists($installer_class, "install")) { call_user_func_array(array($installer_class, "install"), array()); - } else { - module::set_version($module_name, module::available()->$module_name->code_version); } + module::set_version($module_name, module::available()->$module_name->code_version); // Set the weight of the new module, which controls the order in which the modules are // loaded. By default, new modules are installed at the end of the priority list. Since the diff --git a/modules/image_block/helpers/image_block_installer.php b/modules/image_block/helpers/image_block_installer.php index 8558fe51..b177b971 100644 --- a/modules/image_block/helpers/image_block_installer.php +++ b/modules/image_block/helpers/image_block_installer.php @@ -21,7 +21,6 @@ class image_block_installer { static function install() { module::set_var("image_block", "image_count", "1"); - module::set_version("image_block", $version = 3); } static function upgrade($version) { diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php index 560af15c..43c216dc 100644 --- a/modules/info/helpers/info_installer.php +++ b/modules/info/helpers/info_installer.php @@ -25,7 +25,6 @@ class info_installer { module::set_var("info", "show_owner", 1); module::set_var("info", "show_name", 1); module::set_var("info", "show_captured", 1); - module::set_version("info", 2); } static function upgrade($version) { diff --git a/modules/notification/helpers/notification_installer.php b/modules/notification/helpers/notification_installer.php index 58435641..f6b05c18 100644 --- a/modules/notification/helpers/notification_installer.php +++ b/modules/notification/helpers/notification_installer.php @@ -36,8 +36,6 @@ class notification_installer { `text` text, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); - - module::set_version("notification", 2); } static function upgrade($version) { diff --git a/modules/rest/helpers/rest_installer.php b/modules/rest/helpers/rest_installer.php index df7484fe..96f8acfa 100644 --- a/modules/rest/helpers/rest_installer.php +++ b/modules/rest/helpers/rest_installer.php @@ -29,7 +29,6 @@ class rest_installer { UNIQUE KEY(`user_id`)) DEFAULT CHARSET=utf8;"); module::set_var("rest", "allow_guest_access", false); - module::set_version("rest", 3); } static function upgrade($version) { diff --git a/modules/search/helpers/search_installer.php b/modules/search/helpers/search_installer.php index 78dbce38..c9e8f26c 100644 --- a/modules/search/helpers/search_installer.php +++ b/modules/search/helpers/search_installer.php @@ -30,7 +30,6 @@ class search_installer { FULLTEXT INDEX (`data`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;"); - module::set_version("search", 1); } static function activate() { diff --git a/modules/server_add/helpers/server_add_installer.php b/modules/server_add/helpers/server_add_installer.php index e843fc79..b62bbcfa 100644 --- a/modules/server_add/helpers/server_add_installer.php +++ b/modules/server_add/helpers/server_add_installer.php @@ -30,7 +30,6 @@ class server_add_installer { `task_id` int(9) NOT NULL, PRIMARY KEY (`id`)) DEFAULT CHARSET=utf8;"); - module::set_version("server_add", 4); server_add::check_config(); } diff --git a/modules/slideshow/helpers/slideshow_installer.php b/modules/slideshow/helpers/slideshow_installer.php index d283487d..22bd9534 100644 --- a/modules/slideshow/helpers/slideshow_installer.php +++ b/modules/slideshow/helpers/slideshow_installer.php @@ -20,7 +20,6 @@ class slideshow_installer { static function install() { module::set_var("slideshow", "max_scale", 0); - module::set_version("slideshow", 2); } static function upgrade($version) { diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php index f80a9de3..1fd18f3e 100644 --- a/modules/tag/helpers/tag_installer.php +++ b/modules/tag/helpers/tag_installer.php @@ -37,7 +37,6 @@ class tag_installer { KEY(`item_id`, `id`)) DEFAULT CHARSET=utf8;"); module::set_var("tag", "tag_cloud_size", 30); - module::set_version("tag", 3); } static function upgrade($version) { diff --git a/modules/user/helpers/user_installer.php b/modules/user/helpers/user_installer.php index e28af69a..67f6a3d5 100644 --- a/modules/user/helpers/user_installer.php +++ b/modules/user/helpers/user_installer.php @@ -138,6 +138,5 @@ class user_installer { access::allow($registered, "view_full", $root); module::set_var("user", "minimum_password_length", 5); - module::set_version("user", 4); } } \ No newline at end of file diff --git a/modules/watermark/helpers/watermark_installer.php b/modules/watermark/helpers/watermark_installer.php index 5df780a1..13338912 100644 --- a/modules/watermark/helpers/watermark_installer.php +++ b/modules/watermark/helpers/watermark_installer.php @@ -33,7 +33,6 @@ class watermark_installer { DEFAULT CHARSET=utf8;"); @mkdir(VARPATH . "modules/watermark"); - module::set_version("watermark", 2); } static function uninstall() { -- cgit v1.2.3