diff options
Diffstat (limited to 'modules/gallery/views')
-rw-r--r-- | modules/gallery/views/admin_block_log_entries.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/admin_modules.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/admin_modules_confirm.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/form_uploadify.html.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/in_place_edit.html.php | 9 | ||||
-rw-r--r-- | modules/gallery/views/kohana/error.php | 3 | ||||
-rw-r--r-- | modules/gallery/views/user_languages_block.html.php | 2 | ||||
-rw-r--r-- | modules/gallery/views/user_profile.html.php | 3 | ||||
-rw-r--r-- | modules/gallery/views/user_profile_info.html.php | 6 |
9 files changed, 21 insertions, 16 deletions
diff --git a/modules/gallery/views/admin_block_log_entries.html.php b/modules/gallery/views/admin_block_log_entries.html.php index 453724cb..5a8ed23c 100644 --- a/modules/gallery/views/admin_block_log_entries.html.php +++ b/modules/gallery/views/admin_block_log_entries.html.php @@ -2,7 +2,11 @@ <ul> <? foreach ($entries as $entry): ?> <li class="<?= log::severity_class($entry->severity) ?>" style="direction: ltr"> + <? if ($entry->user->guest): ?> + </span><?= html::clean($entry->user->name) ?></span> + <? else: ?> <a href="<?= user_profile::url($entry->user->id) ?>"><?= html::clean($entry->user->name) ?></a> + <? endif ?> <?= gallery::date_time($entry->timestamp) ?> <?= $entry->message ?> <?= $entry->html ?> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 26b2c87c..c5015e68 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -22,7 +22,7 @@ buttons: { <?= t("Continue")->for_js() ?>: function() { $("form", this).submit(); - $(".ui-dialog-buttonpane button:contains(<?= t("Continue") ?>)") + $(".ui-dialog-buttonpane button:contains(" + <?= t("Continue")->for_js() ?> + ")") .attr("disabled", "disabled") .addClass("ui-state-disabled"); }, @@ -32,7 +32,7 @@ } }); if (!data.allow_continue) { - $(".ui-dialog-buttonpane button:contains(<?= t("Continue") ?>)") + $(".ui-dialog-buttonpane button:contains(" + <?= t("Continue")->for_js() ?> + ")") .attr("disabled", "disabled") .addClass("ui-state-disabled"); } diff --git a/modules/gallery/views/admin_modules_confirm.html.php b/modules/gallery/views/admin_modules_confirm.html.php index 59592505..8c4cb2bd 100644 --- a/modules/gallery/views/admin_modules_confirm.html.php +++ b/modules/gallery/views/admin_modules_confirm.html.php @@ -6,9 +6,9 @@ <div id="g-admin-modules-messages" class="g-block-content"> <ul> - <? foreach (array("error" => "g-error", "warn" => "g-warning") as $type => $class): ?> + <? foreach (array("error" => "g-error", "warn" => "g-warning") as $type => $css_class): ?> <? foreach ($messages[$type] as $message): ?> - <li class="<?= $class ?>" style="padding-bottom: 0"><?= $message ?></li> + <li class="<?= $css_class ?>" style="padding-bottom: 0"><?= $message ?></li> <? endforeach ?> <? endforeach ?> </ul> diff --git a/modules/gallery/views/form_uploadify.html.php b/modules/gallery/views/form_uploadify.html.php index b3b81ecb..137cb353 100644 --- a/modules/gallery/views/form_uploadify.html.php +++ b/modules/gallery/views/form_uploadify.html.php @@ -58,7 +58,7 @@ "<li class=\"g-error\">" + fileObj.name + " - " + msg[1] + "</li>"); } else { $("#g-add-photos-status ul").append( - "<li class=\"g-success\">" + fileObj.name + " - <?= t("Completed") ?></li>"); + "<li class=\"g-success\">" + fileObj.name + " - " + <?= t("Completed")->for_js() ?> + "</li>"); } return true; }, diff --git a/modules/gallery/views/in_place_edit.html.php b/modules/gallery/views/in_place_edit.html.php index 45cf1d8c..05a16ad4 100644 --- a/modules/gallery/views/in_place_edit.html.php +++ b/modules/gallery/views/in_place_edit.html.php @@ -1,5 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form"), $hidden) ?> +<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form")) ?> + <?= access::csrf_form_field() ?> <ul> <li<? if (!empty($errors["input"])): ?> class="g-error"<? endif ?>> <?= form::input("input", $form["input"], " class=\"textbox\"") ?> @@ -9,8 +10,6 @@ </li> <li><a href="#" class="g-cancel"><?= t("Cancel") ?></a></li> </ul> -<?= form::close() ?> -<? if (!empty($errors["input"])): ?> -<div id="g-in-place-edit-message" class="g-error"><?= $errors["input"] ?></div> -<? endif ?> +</form> + diff --git a/modules/gallery/views/kohana/error.php b/modules/gallery/views/kohana/error.php index 7271db14..26628cf2 100644 --- a/modules/gallery/views/kohana/error.php +++ b/modules/gallery/views/kohana/error.php @@ -1,5 +1,6 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <? $error_id = uniqid("error") ?> +<? if (!function_exists("t")) { function t($msg) { return $msg; } } ?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <style type="text/css"> @@ -131,7 +132,7 @@ </head> <body> <? try { $user = identity::active_user(); } catch (Exception $e) { } ?> - <? $admin = php_sapi_name() == "cli" || isset($user) && $user->admin ?> + <? $admin = php_sapi_name() == "cli" || (class_exists("User_Model") && isset($user) && $user->admin) ?> <div class="big_box" id="framework_error"> <h1> <?= t("Dang... Something went wrong!") ?> diff --git a/modules/gallery/views/user_languages_block.html.php b/modules/gallery/views/user_languages_block.html.php index 89185967..3776ca13 100644 --- a/modules/gallery/views/user_languages_block.html.php +++ b/modules/gallery/views/user_languages_block.html.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <?= form::dropdown("g-select-session-locale", $installed_locales, $selected) ?> <script type="text/javascript"> - $("#g-select-session-locale").change(function() { + $("select[name=g-select-session-locale]").change(function() { var old_locale_preference = <?= html::js_string($selected) ?>; var locale = $(this).val(); if (old_locale_preference == locale) { diff --git a/modules/gallery/views/user_profile.html.php b/modules/gallery/views/user_profile.html.php index 708b1613..f35f8c3f 100644 --- a/modules/gallery/views/user_profile.html.php +++ b/modules/gallery/views/user_profile.html.php @@ -26,6 +26,7 @@ $(document).ready(function() { $("#g-profile-return").click(function(event) { history.go(-1); + return false; }) }); </script> @@ -41,7 +42,7 @@ <? foreach ($info_parts as $info): ?> <div> <fieldset> - <label><?= $info->title ?></label> + <label><?= html::purify($info->title) ?></label> <div> <?= $info->view ?> </div> diff --git a/modules/gallery/views/user_profile_info.html.php b/modules/gallery/views/user_profile_info.html.php index 2a2549c8..58e134bb 100644 --- a/modules/gallery/views/user_profile_info.html.php +++ b/modules/gallery/views/user_profile_info.html.php @@ -1,9 +1,9 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> <table> - <? foreach ($fields as $field => $value): ?> + <? foreach ($user_profile_data as $label => $value): ?> <tr> - <td><?= $field ?></td> - <td><?= $value ?></td> + <td><?= html::clean($label) ?></td> + <td><?= html::purify($value) ?></td> </tr> <? endforeach ?> </table> |