summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers')
-rw-r--r--modules/gallery/controllers/l10n_client.php14
-rw-r--r--modules/gallery/controllers/simple_uploader.php3
2 files changed, 15 insertions, 2 deletions
diff --git a/modules/gallery/controllers/l10n_client.php b/modules/gallery/controllers/l10n_client.php
index aa93a758..831c79c1 100644
--- a/modules/gallery/controllers/l10n_client.php
+++ b/modules/gallery/controllers/l10n_client.php
@@ -106,7 +106,19 @@ class L10n_Client_Controller extends Controller {
}
public static function l10n_form() {
- $calls = I18n::instance()->call_log();
+ if (Input::instance()->get("show_all_l10n_messages")) {
+ $calls = array();
+ foreach (Database::instance()
+ ->select("key", "message")
+ ->from("incoming_translations")
+ ->where(array("locale" => 'root'))
+ ->get()
+ ->as_array() as $row) {
+ $calls[$row->key] = array(unserialize($row->message), array());
+ }
+ } else {
+ $calls = I18n::instance()->call_log();
+ }
$locale = I18n::instance()->locale();
if ($calls) {
diff --git a/modules/gallery/controllers/simple_uploader.php b/modules/gallery/controllers/simple_uploader.php
index dfbd4f17..e68df2b8 100644
--- a/modules/gallery/controllers/simple_uploader.php
+++ b/modules/gallery/controllers/simple_uploader.php
@@ -39,7 +39,8 @@ class Simple_Uploader_Controller extends Controller {
access::verify_csrf();
$file_validation = new Validation($_FILES);
- $file_validation->add_rules("Filedata", "upload::valid", "upload::type[gif,jpg,png,flv,mp4]");
+ $file_validation->add_rules(
+ "Filedata", "upload::valid", "upload::type[gif,jpg,jpeg,png,flv,mp4]");
if ($file_validation->validate()) {
// SimpleUploader.swf does not yet call /start directly, so simulate it here for now.
if (!batch::in_progress()) {