summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gallery/controllers/file_proxy.php9
-rw-r--r--modules/gallery/views/welcome_message.html.php2
-rw-r--r--modules/user/controllers/admin_users.php1
3 files changed, 5 insertions, 7 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php
index bead9f3f..15b4279f 100644
--- a/modules/gallery/controllers/file_proxy.php
+++ b/modules/gallery/controllers/file_proxy.php
@@ -72,8 +72,8 @@ class File_Proxy_Controller extends Controller {
// necessary, it's easily resurrected.
// If we're looking for a .jpg then it's it's possible that we're requesting the thumbnail
- // for a movie. In that case, the .flv, .mp4 or .m4v file would have been converted to a .jpg.
- // So try some alternate types:
+ // for a movie. In that case, the .flv, .mp4 or .m4v file would have been converted to a
+ // .jpg. So try some alternate types:
if (preg_match('/.jpg$/', $path)) {
foreach (array("flv", "mp4", "m4v") as $ext) {
$movie_path = preg_replace('/.jpg$/', ".$ext", $encoded_path);
@@ -131,10 +131,7 @@ class File_Proxy_Controller extends Controller {
} else {
header("Content-Type: $item->mime_type");
}
-
Kohana::close_buffers(false);
- $fd = fopen($file, "rb");
- fpassthru($fd);
- fclose($fd);
+ readfile($file);
}
}
diff --git a/modules/gallery/views/welcome_message.html.php b/modules/gallery/views/welcome_message.html.php
index 4d6ed726..1fcca971 100644
--- a/modules/gallery/views/welcome_message.html.php
+++ b/modules/gallery/views/welcome_message.html.php
@@ -18,7 +18,7 @@
<a href="<?= url::site("admin/users/edit_user_form/{$user->id}") ?>"
title="<?= t("Edit your profile")->for_html_attr() ?>"
id="g-after-install-change-password-link"
- class="g-button ui-state-default ui-corners-all">
+ class="g-button ui-state-default ui-corner-all">
<?= t("Change password and email now") ?>
</a>
<script type="text/javascript">
diff --git a/modules/user/controllers/admin_users.php b/modules/user/controllers/admin_users.php
index 64365f2b..3c6cfd32 100644
--- a/modules/user/controllers/admin_users.php
+++ b/modules/user/controllers/admin_users.php
@@ -282,6 +282,7 @@ class Admin_Users_Controller extends Admin_Controller {
"admin/users/edit_user/$user->id", "", "post", array("id" => "g-edit-user-form"));
$group = $form->group("edit_user")->label(t("Edit user"));
$group->input("name")->label(t("Username"))->id("g-username")->value($user->name)
+ ->error_messages("required", t("A name is required"))
->error_messages("conflict", t("There is already a user with that username"))
->error_messages("length", t("This name is too long"));
$group->input("full_name")->label(t("Full name"))->id("g-fullname")->value($user->full_name)