From effccfd41d2618cfd41ce6db0834c2298fdb42d8 Mon Sep 17 00:00:00 2001
From: Andy Staudacher
Date: Sun, 30 Aug 2009 07:00:56 -0700
Subject: Change all instances of SafeString::of_safe_html() to
html::mark_safe() in views.
---
modules/akismet/helpers/akismet.php | 2 +-
modules/digibug/views/admin_digibug.html.php | 2 +-
modules/exif/helpers/exif.php | 2 +-
modules/g2_import/views/admin_g2_import.html.php | 4 ++--
modules/gallery/controllers/admin_languages.php | 2 +-
modules/gallery/helpers/graphics.php | 2 +-
modules/gallery/views/admin_block_welcome.html.php | 10 +++++-----
modules/gallery/views/upgrader.html.php | 2 +-
modules/recaptcha/helpers/recaptcha.php | 2 +-
modules/search/helpers/search.php | 2 +-
modules/server_add/helpers/server_add.php | 2 +-
modules/user/views/login.html.php | 2 +-
modules/user/views/reset_password.html.php | 2 +-
13 files changed, 18 insertions(+), 18 deletions(-)
(limited to 'modules')
diff --git a/modules/akismet/helpers/akismet.php b/modules/akismet/helpers/akismet.php
index abca78d2..7cd598cd 100644
--- a/modules/akismet/helpers/akismet.php
+++ b/modules/akismet/helpers/akismet.php
@@ -94,7 +94,7 @@ class akismet_Core {
if (empty($api_key)) {
site_status::warning(
t("Akismet is not quite ready! Please provide an API Key",
- array("url" => SafeString::of_safe_html(url::site("admin/akismet")))),
+ array("url" => html::mark_safe(url::site("admin/akismet")))),
"akismet_config");
} else {
site_status::clear("akismet_config");
diff --git a/modules/digibug/views/admin_digibug.html.php b/modules/digibug/views/admin_digibug.html.php
index 5f27a3fd..c4956591 100644
--- a/modules/digibug/views/admin_digibug.html.php
+++ b/modules/digibug/views/admin_digibug.html.php
@@ -16,7 +16,7 @@
= t("You don't need an account with Digibug, but if you register with Digibug and enter your Digibug id in the Advanced Settings page you can make money off of your photos!",
array("signup_url" => "http://www.digibug.com/signup.php",
- "advanced_settings_url" => SafeString::of_safe_html(url::site("admin/advanced_settings")))) ?>
+ "advanced_settings_url" => html::mark_safe(url::site("admin/advanced_settings")))) ?>
diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php
index d4e60338..9a4dbeec 100644
--- a/modules/exif/helpers/exif.php
+++ b/modules/exif/helpers/exif.php
@@ -164,7 +164,7 @@ class exif_Core {
if ($remaining) {
site_status::warning(
t('Your Exif index needs to be updated. Fix this now',
- array("url" => SafeString::of_safe_html(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))),
+ array("url" => html::mark_safe(url::site("admin/maintenance/start/exif_task::update_index?csrf=__CSRF__")))),
"exif_index_out_of_date");
}
}
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index f53510f6..fde3464b 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -39,7 +39,7 @@
= t("Your most common thumbnail size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
array("g2_pixels" => $g2_sizes["thumb"]["size"],
"g3_pixels" => $thumb_size,
- "url" => SafeString::of_safe_html(url::site("admin/theme_options")))) ?>
+ "url" => html::mark_safe(url::site("admin/theme_options")))) ?>
endif ?>
@@ -48,7 +48,7 @@
= t("Your most common intermediate size in Gallery 2 is %g2_pixels pixels, but your Gallery 3 thumbnail size is set to %g3_pixels pixels. Using the same value will speed up your import.",
array("g2_pixels" => $g2_sizes["resize"]["size"],
"g3_pixels" => $resize_size,
- "url" => SafeString::of_safe_html(url::site("admin/theme_options")))) ?>
+ "url" => html::mark_safe(url::site("admin/theme_options")))) ?>
endif ?>
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php
index 68be709e..b1bc4cff 100644
--- a/modules/gallery/controllers/admin_languages.php
+++ b/modules/gallery/controllers/admin_languages.php
@@ -111,7 +111,7 @@ class Admin_Languages_Controller extends Admin_Controller {
$group->input("api_key")
->label(empty($api_key)
? t("This is a unique key that will allow you to send translations to the remote server. To get your API key go to %server-link.",
- array("server-link" => SafeString::of_safe_html(html::anchor($server_link))))
+ array("server-link" => html::mark_safe(html::anchor($server_link))))
: t("API Key"))
->value($api_key)
->error_messages("invalid", t("The API key you provided is invalid."));
diff --git a/modules/gallery/helpers/graphics.php b/modules/gallery/helpers/graphics.php
index fbb85bec..cc37a193 100644
--- a/modules/gallery/helpers/graphics.php
+++ b/modules/gallery/helpers/graphics.php
@@ -442,7 +442,7 @@ class graphics_Core {
if (!module::get_var("gallery", "graphics_toolkit")) {
site_status::warning(
t("Graphics toolkit missing! Please choose a toolkit",
- array("url" => SafeString::of_safe_html(url::site("admin/graphics")))),
+ array("url" => html::mark_safe(url::site("admin/graphics")))),
"missing_graphics_toolkit");
}
}
diff --git a/modules/gallery/views/admin_block_welcome.html.php b/modules/gallery/views/admin_block_welcome.html.php
index c6ccdbf3..71ef4368 100644
--- a/modules/gallery/views/admin_block_welcome.html.php
+++ b/modules/gallery/views/admin_block_welcome.html.php
@@ -5,16 +5,16 @@
-
= t("General Settings - choose your graphics and language settings.",
- array("graphics_url" => SafeString::of_safe_html(url::site("admin/graphics")),
- "language_url" => SafeString::of_safe_html(url::site("admin/languages")))) ?>
+ array("graphics_url" => html::mark_safe(url::site("admin/graphics")),
+ "language_url" => html::mark_safe(url::site("admin/languages")))) ?>
-
= t("Appearance - choose a theme, or customize the way it looks.",
- array("theme_url" => SafeString::of_safe_html(url::site("admin/themes")),
- "theme_options_url" => SafeString::of_safe_html(url::site("admin/theme_options")))) ?>
+ array("theme_url" => html::mark_safe(url::site("admin/themes")),
+ "theme_options_url" => html::mark_safe(url::site("admin/theme_options")))) ?>
-
= t("Customize - install modules to add cool features!",
- array("modules_url" => SafeString::of_safe_html(url::site("admin/modules")))) ?>
+ array("modules_url" => html::mark_safe(url::site("admin/modules")))) ?>
diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php
index ccc86da8..de6ce0e7 100644
--- a/modules/gallery/views/upgrader.html.php
+++ b/modules/gallery/views/upgrader.html.php
@@ -18,7 +18,7 @@
= t("That's it!") ?>
= t("Your Gallery is up to date.",
- array("url" => SafeString::of_safe_html(url::site("albums/1")))) ?>
+ array("url" => html::mark_safe(url::site("albums/1")))) ?>
diff --git a/modules/recaptcha/helpers/recaptcha.php b/modules/recaptcha/helpers/recaptcha.php
index 35d9febd..5ac65661 100644
--- a/modules/recaptcha/helpers/recaptcha.php
+++ b/modules/recaptcha/helpers/recaptcha.php
@@ -43,7 +43,7 @@ class recaptcha_Core {
if (empty($public_key) || empty($private_key)) {
site_status::warning(
t("reCAPTCHA is not quite ready! Please configure the reCAPTCHA Keys",
- array("url" => SafeString::of_safe_html(url::site("admin/recaptcha")))),
+ array("url" => html::mark_safe(url::site("admin/recaptcha")))),
"recaptcha_config");
} else {
site_status::clear("recaptcha_config");
diff --git a/modules/search/helpers/search.php b/modules/search/helpers/search.php
index 4be04039..5e23a04b 100644
--- a/modules/search/helpers/search.php
+++ b/modules/search/helpers/search.php
@@ -58,7 +58,7 @@ class search_Core {
if ($remaining) {
site_status::warning(
t('Your search index needs to be updated. Fix this now',
- array("url" => SafeString::of_safe_html(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))),
+ array("url" => html::mark_safe(url::site("admin/maintenance/start/search_task::update_index?csrf=__CSRF__")))),
"search_index_out_of_date");
}
}
diff --git a/modules/server_add/helpers/server_add.php b/modules/server_add/helpers/server_add.php
index 57afac12..a84e1afd 100644
--- a/modules/server_add/helpers/server_add.php
+++ b/modules/server_add/helpers/server_add.php
@@ -25,7 +25,7 @@ class server_add_Core {
if (empty($paths)) {
site_status::warning(
t("Server Add needs configuration. Configure it now!",
- array("url" => SafeString::of_safe_html(url::site("admin/server_add")))),
+ array("url" => html::mark_safe(url::site("admin/server_add")))),
"server_add_configuration");
} else {
site_status::clear("server_add_configuration");
diff --git a/modules/user/views/login.html.php b/modules/user/views/login.html.php
index 85f673ce..dfd09661 100644
--- a/modules/user/views/login.html.php
+++ b/modules/user/views/login.html.php
@@ -8,7 +8,7 @@
else: ?>
- = t('Logged in as %name', array('name' => SafeString::of_safe_html(
+ = t('Logged in as %name', array('name' => html::mark_safe(
'id}") .
'" title="' . t("Edit Your Profile")->for_html_attr() .
'" id="gUserProfileLink" class="gDialogLink">' .
diff --git a/modules/user/views/reset_password.html.php b/modules/user/views/reset_password.html.php
index 6fa92d54..4097bb82 100644
--- a/modules/user/views/reset_password.html.php
+++ b/modules/user/views/reset_password.html.php
@@ -10,7 +10,7 @@
= t("We received a request to reset your password for %site_url. If you made this request, you can confirm it by clicking this link. If you didn't request this password reset, it's ok to ignore this mail.",
- array("site_url" => SafeString::of_safe_html(url::base(false, "http")),
+ array("site_url" => html::mark_safe(url::base(false, "http")),
"confirm_url" => $confirm_url)) ?>