From 76f688a070c7c36eb84dc22b21b165f00440a4a4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 27 Jun 2009 16:41:05 -0700 Subject: Clean up poor english. Use the latest recaptcha info from their website. Fixes ticket #470. --- modules/recaptcha/views/admin_recaptcha.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 06a664e1..4c041ba2 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -2,7 +2,7 @@

- ReCaptcha Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", + ReCaptcha Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", array("domain_url" => $form->get_key_url, "recaptcha_url" => "http://recaptcha.net")) ?>

-- cgit v1.2.3 From 72281d2b448d77afde709929abaf3ab92883ccce Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Thu, 2 Jul 2009 20:50:29 -0700 Subject: Fix for ticket 470. Replace ReCaptcha with reCAPTCHA in user visible strings. --- modules/recaptcha/controllers/admin_recaptcha.php | 8 ++++---- modules/recaptcha/helpers/recaptcha.php | 4 ++-- modules/recaptcha/helpers/recaptcha_menu.php | 2 +- modules/recaptcha/module.info | 4 ++-- modules/recaptcha/views/admin_recaptcha.html.php | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/controllers/admin_recaptcha.php b/modules/recaptcha/controllers/admin_recaptcha.php index 5813df8b..6874fce9 100644 --- a/modules/recaptcha/controllers/admin_recaptcha.php +++ b/modules/recaptcha/controllers/admin_recaptcha.php @@ -32,8 +32,8 @@ class Admin_Recaptcha_Controller extends Admin_Controller { if ($public_key && $private_key) { module::set_var("recaptcha", "public_key", $public_key); module::set_var("recaptcha", "private_key", $private_key); - message::success(t("Recaptcha configured!")); - log::success("recaptcha", t("Recaptcha public and private keys set")); + message::success(t("reCAPTCHA configured!")); + log::success("recaptcha", t("reCAPTCHA public and private keys set")); url::redirect("admin/recaptcha"); } else if ($public_key && !$private_key) { $form->configure_recaptcha->private_key->add_error("invalid"); @@ -42,8 +42,8 @@ class Admin_Recaptcha_Controller extends Admin_Controller { } else { module::set_var("recaptcha", "public_key", ""); module::set_var("recaptcha", "private_key", ""); - message::success(t("Recaptcha disabled!")); - log::success("recaptcha", t("Recaptcha public and private keys cleared")); + message::success(t("reCAPTCHA disabled!")); + log::success("recaptcha", t("reCAPTCHA public and private keys cleared")); url::redirect("admin/recaptcha"); } } diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php index f0bf2aef..501dd972 100644 --- a/modules/recaptcha/helpers/recaptcha.php +++ b/modules/recaptcha/helpers/recaptcha.php @@ -21,7 +21,7 @@ class recaptcha_Core { static function get_configure_form() { $form = new Forge("admin/recaptcha", "", "post", array("id" => "gConfigureRecaptchaForm")); $group = $form->group("configure_recaptcha") - ->label(t("Configure Recaptcha")); + ->label(t("Configure reCAPTCHA")); $group->input("public_key") ->label(t("Public Key")) ->value(module::get_var("recaptcha", "public_key")); @@ -42,7 +42,7 @@ class recaptcha_Core { $private_key = module::get_var("recaptcha", "private_key"); if (empty($public_key) || empty($private_key)) { site_status::warning( - t("Recaptcha is not quite ready! Please configure the Recaptcha Keys", + t("reCAPTCHA is not quite ready! Please configure the reCAPTCHA Keys", array("url" => url::site("admin/recaptcha"))), "recaptcha_config"); } else { diff --git a/modules/recaptcha/helpers/recaptcha_menu.php b/modules/recaptcha/helpers/recaptcha_menu.php index ba3c8b78..047abf8f 100644 --- a/modules/recaptcha/helpers/recaptcha_menu.php +++ b/modules/recaptcha/helpers/recaptcha_menu.php @@ -22,7 +22,7 @@ class recaptcha_menu_Core { $menu->get("settings_menu") ->append(Menu::factory("link") ->id("recaptcha") - ->label(t("Recaptcha")) + ->label(t("reCAPTCHA")) ->url(url::site("admin/recaptcha"))); } } diff --git a/modules/recaptcha/module.info b/modules/recaptcha/module.info index f2cc50cf..9f44648a 100644 --- a/modules/recaptcha/module.info +++ b/modules/recaptcha/module.info @@ -1,3 +1,3 @@ -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)." +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 diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 4c041ba2..9c2911ef 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -1,8 +1,8 @@
-

+

- ReCaptcha Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", + reCAPTCHA Public/Private Key pair, which is also free. Once registered, the challenge and response strings are evaluated at recaptcha.net to determine if the form content has been entered by a bot.", array("domain_url" => $form->get_key_url, "recaptcha_url" => "http://recaptcha.net")) ?>

@@ -12,9 +12,9 @@
-

+

- +

-- cgit v1.2.3 From 67e61d30e5ae22a8c01d76d8e202ead443ae19d4 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Tue, 7 Jul 2009 13:08:35 -0700 Subject: More fixes for ticket 470 (capitalization of reCAPTCHA) --- modules/recaptcha/libraries/Form_Recaptcha.php | 2 +- modules/recaptcha/views/admin_recaptcha.html.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/recaptcha/libraries/Form_Recaptcha.php b/modules/recaptcha/libraries/Form_Recaptcha.php index 4c0c4997..f4e9d4ac 100644 --- a/modules/recaptcha/libraries/Form_Recaptcha.php +++ b/modules/recaptcha/libraries/Form_Recaptcha.php @@ -28,7 +28,7 @@ class Form_Recaptcha_Core extends Form_Input { public function __construct($name) { parent::__construct($name); $this->error_messages("incorrect-captcha-sol", - t("The values supplied to recaptcha are incorrect.")); + t("The values supplied to reCAPTCHA are incorrect.")); $this->error_messages("invalid-site-private-key", t("The site private key is incorrect.")); } diff --git a/modules/recaptcha/views/admin_recaptcha.html.php b/modules/recaptcha/views/admin_recaptcha.html.php index 9c2911ef..43b4da8a 100644 --- a/modules/recaptcha/views/admin_recaptcha.html.php +++ b/modules/recaptcha/views/admin_recaptcha.html.php @@ -14,7 +14,7 @@

- +

-- cgit v1.2.3 From e2a9a1d28459b96e412004df4d4ec010fb9b30e2 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 13 Jul 2009 10:36:55 -0700 Subject: Add quotes around all values that contain spaces in them, and add a test to make sure that we continue to do so. This makes sure that we don't have problems with 5.3 which treats the literal "on" as a boolean. --- modules/akismet/module.info | 2 +- modules/comment/module.info | 2 +- modules/digibug/module.info | 4 +-- modules/exif/module.info | 2 +- modules/g2_import/module.info | 4 +-- modules/gallery/module.info | 4 +-- modules/gallery/tests/File_Structure_Test.php | 37 +++++++++++++++++++++++++++ modules/image_block/module.info | 4 +-- modules/info/module.info | 4 +-- modules/notification/module.info | 2 +- modules/organize/module.info | 4 +-- modules/recaptcha/module.info | 2 +- modules/rss/module.info | 4 +-- modules/search/module.info | 4 +-- modules/server_add/module.info | 4 +-- modules/slideshow/module.info | 4 +-- modules/tag/module.info | 4 +-- modules/user/module.info | 4 +-- modules/watermark/module.info | 4 +-- themes/admin_default/theme.info | 6 ++--- themes/default/theme.info | 6 ++--- 21 files changed, 74 insertions(+), 37 deletions(-) (limited to 'modules/recaptcha') diff --git a/modules/akismet/module.info b/modules/akismet/module.info index d45d8a7b..b61ed107 100644 --- a/modules/akismet/module.info +++ b/modules/akismet/module.info @@ -1,3 +1,3 @@ -name = Akismet +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 diff --git a/modules/comment/module.info b/modules/comment/module.info index 55997317..c371cf27 100644 --- a/modules/comment/module.info +++ b/modules/comment/module.info @@ -1,3 +1,3 @@ -name = Comments +name = "Comments" description = "Allows users and guests to leave comments on photos and albums." version = 2 diff --git a/modules/digibug/module.info b/modules/digibug/module.info index c25a2454..be4e880a 100644 --- a/modules/digibug/module.info +++ b/modules/digibug/module.info @@ -1,3 +1,3 @@ -name = Digibug -description = Digibug Photo Printing Module +name = "Digibug" +description = "Digibug Photo Printing Module" version = 2 diff --git a/modules/exif/module.info b/modules/exif/module.info index 1e16a5ff..c8ae688e 100644 --- a/modules/exif/module.info +++ b/modules/exif/module.info @@ -1,3 +1,3 @@ -name = Exif Data +name = "Exif Data" description = "Extract Exif data and display it on photo pages." version = 1 diff --git a/modules/g2_import/module.info b/modules/g2_import/module.info index 9e04f49b..554cf33b 100644 --- a/modules/g2_import/module.info +++ b/modules/g2_import/module.info @@ -1,3 +1,3 @@ -name = Gallery2 Import -description = Import your Gallery 2 content into Gallery 3 +name = "Gallery2 Import" +description = "Import your Gallery 2 content into Gallery 3" version = 1 diff --git a/modules/gallery/module.info b/modules/gallery/module.info index c184aba7..64a30b1f 100644 --- a/modules/gallery/module.info +++ b/modules/gallery/module.info @@ -1,3 +1,3 @@ -name = Gallery 3 -description = Gallery core application +name = "Gallery 3" +description = "Gallery core application" version = 6 diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php index 06f456ff..8a97e00b 100644 --- a/modules/gallery/tests/File_Structure_Test.php +++ b/modules/gallery/tests/File_Structure_Test.php @@ -213,6 +213,43 @@ class File_Structure_Test extends Unit_Test_Case { } } } + + public function module_info_is_well_formed_test() { + $info_files = array_merge( + glob("modules/*/module.info"), + glob("themes/*/module.info")); + + $errors = array(); + foreach ($info_files as $file) { + foreach (file($file) as $line) { + $parts = explode("=", $line, 2); + $values[trim($parts[0])] = trim($parts[1]); + } + + $module = dirname($file); + // Certain keys must exist + foreach (array("name", "description", "version") as $key) { + if (!array_key_exists($key, $values)) { + $errors[] = "$module: missing key $key"; + } + } + + // Any values containing spaces must be quoted + foreach ($values as $key => $value) { + if (strpos($value, " ") !== false && !preg_match('/^".*"$/', $value)) { + $errors[] = "$module: value for $key must be quoted"; + } + } + + // The file must parse + if (!is_array(parse_ini_file($file))) { + $errors[] = "$module: info file is not parseable"; + } + } + if ($errors) { + $this->assert_true(false, $errors); + } + } } class PhpCodeFilterIterator extends FilterIterator { diff --git a/modules/image_block/module.info b/modules/image_block/module.info index 8852d33c..e6d85048 100644 --- a/modules/image_block/module.info +++ b/modules/image_block/module.info @@ -1,3 +1,3 @@ -name = Image Block -description = Display a random image in the sidebar +name = "Image Block" +description = "Display a random image in the sidebar" version = 1 diff --git a/modules/info/module.info b/modules/info/module.info index ce03473e..e352213c 100644 --- a/modules/info/module.info +++ b/modules/info/module.info @@ -1,3 +1,3 @@ -name = Info -description = Display extra information about photos and albums +name = "Info" +description = "Display extra information about photos and albums" version = 1 diff --git a/modules/notification/module.info b/modules/notification/module.info index d4dc34e0..31684ccf 100644 --- a/modules/notification/module.info +++ b/modules/notification/module.info @@ -1,3 +1,3 @@ -name = Notification +name = "Notification" description = "Send notifications to users when changes are made to watched albums." version = 1 diff --git a/modules/organize/module.info b/modules/organize/module.info index b3ae94a3..5c6b1de0 100644 --- a/modules/organize/module.info +++ b/modules/organize/module.info @@ -1,3 +1,3 @@ -name = Organize -description = Organize your gallery by apply tags or moving images +name = "Organize" +description = "Organize your gallery by apply tags or moving images" version = 1 diff --git a/modules/recaptcha/module.info b/modules/recaptcha/module.info index 9f44648a..cfa1bf7a 100644 --- a/modules/recaptcha/module.info +++ b/modules/recaptcha/module.info @@ -1,3 +1,3 @@ -name = reCAPTCHA +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 diff --git a/modules/rss/module.info b/modules/rss/module.info index ffd26192..81ee7848 100644 --- a/modules/rss/module.info +++ b/modules/rss/module.info @@ -1,3 +1,3 @@ -name = RSS -description = Provide a RSS feeds +name = "RSS" +description = "Provide a RSS feeds" version = 1 diff --git a/modules/search/module.info b/modules/search/module.info index b286ab6c..f417c4fa 100644 --- a/modules/search/module.info +++ b/modules/search/module.info @@ -1,3 +1,3 @@ -name = Search -description = Allows users to search their Gallery +name = "Search" +description = "Allows users to search their Gallery" version = 1 diff --git a/modules/server_add/module.info b/modules/server_add/module.info index 295d3beb..23acab94 100644 --- a/modules/server_add/module.info +++ b/modules/server_add/module.info @@ -1,3 +1,3 @@ -name = Server Add -description = Allows authorized users to load images directly from your web server +name = "Server Add" +description = "Allows authorized users to load images directly from your web server" version = 3 diff --git a/modules/slideshow/module.info b/modules/slideshow/module.info index 5eb69ce3..6841199a 100644 --- a/modules/slideshow/module.info +++ b/modules/slideshow/module.info @@ -1,3 +1,3 @@ -name = Slideshow -description = Allows users to view a slideshow of photos +name = "Slideshow" +description = "Allows users to view a slideshow of photos" version = 1 diff --git a/modules/tag/module.info b/modules/tag/module.info index 562d5c32..e505dd81 100644 --- a/modules/tag/module.info +++ b/modules/tag/module.info @@ -1,3 +1,3 @@ -name = Tags -description = Allows users to tag photos and albums +name = "Tags" +description = "Allows users to tag photos and albums" version = 1 diff --git a/modules/user/module.info b/modules/user/module.info index 2dba517d..8a9af407 100644 --- a/modules/user/module.info +++ b/modules/user/module.info @@ -1,3 +1,3 @@ -name = Users and Groups -description = Provides user and group management +name = "Users and Groups" +description = "Provides user and group management" version = 1 diff --git a/modules/watermark/module.info b/modules/watermark/module.info index 7f866695..abd4a3cf 100644 --- a/modules/watermark/module.info +++ b/modules/watermark/module.info @@ -1,3 +1,3 @@ -name = Watermarks -description = Allows users to watermark their photos +name = "Watermarks" +description = "Allows users to watermark their photos" version = 1 diff --git a/themes/admin_default/theme.info b/themes/admin_default/theme.info index d21b0ff5..b3d9741d 100644 --- a/themes/admin_default/theme.info +++ b/themes/admin_default/theme.info @@ -1,6 +1,6 @@ -name = Gallery Default -description = A crisp Site Administration theme with soft colors and drop down menus. +name = "Gallery Default" +description = "A crisp Site Administration theme with soft colors and drop down menus." version = 1 -author = Gallery Team +author = "Gallery Team" admin = 1 site = 0 diff --git a/themes/default/theme.info b/themes/default/theme.info index 71e8a740..5f19d0d7 100644 --- a/themes/default/theme.info +++ b/themes/default/theme.info @@ -1,6 +1,6 @@ -name = Gallery Default -description = A crisp and distinctive theme that uses large fonts and icons for easy navigation and an enjoyable browsing experience. +name = "Gallery Default" +description = "A crisp and distinctive theme that uses large fonts and icons for easy navigation and an enjoyable browsing experience." version = 1 -author = Gallery Team +author = "Gallery Team" site = 1 admin = 0 -- cgit v1.2.3