summaryrefslogtreecommitdiff
path: root/modules/server_add/controllers
diff options
context:
space:
mode:
authorNathan Kinkade <nath@nkinka.de>2013-02-14 14:28:46 +0000
committerNathan Kinkade <nath@nkinka.de>2013-02-14 14:28:46 +0000
commit711651f727e093cc7357a6bbff6bd992fd6dfd80 (patch)
tree2dadc1c06acf1ab3d42d3ed5415568535db54416 /modules/server_add/controllers
parent0047af90bf4db08b22838e6ded22a7fa70cee98a (diff)
parente5ed05004f005bdccdbf68e199ae2324ad97e895 (diff)
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/server_add/controllers')
-rw-r--r--modules/server_add/controllers/admin_server_add.php2
-rw-r--r--modules/server_add/controllers/server_add.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/server_add/controllers/admin_server_add.php b/modules/server_add/controllers/admin_server_add.php
index 5b75c02d..ba2b9b3f 100644
--- a/modules/server_add/controllers/admin_server_add.php
+++ b/modules/server_add/controllers/admin_server_add.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2012 Bharat Mediratta
+ * Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php
index c6d36a11..f6e0a944 100644
--- a/modules/server_add/controllers/server_add.php
+++ b/modules/server_add/controllers/server_add.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2012 Bharat Mediratta
+ * Copyright (C) 2000-2013 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ class Server_Add_Controller extends Admin_Controller {
}
if (!is_dir($file)) {
$ext = strtolower(pathinfo($file, PATHINFO_EXTENSION));
- if (!in_array($ext, legal_file::get_extensions())) {
+ if (!legal_file::get_extensions($ext)) {
continue;
}
}
@@ -169,7 +169,7 @@ class Server_Add_Controller extends Admin_Controller {
foreach ($child_paths as $child_path) {
if (!is_dir($child_path)) {
$ext = strtolower(pathinfo($child_path, PATHINFO_EXTENSION));
- if (!in_array($ext, legal_file::get_extensions()) || !filesize($child_path)) {
+ if (!legal_file::get_extensions($ext) || !filesize($child_path)) {
// Not importable, skip it.
continue;
}
@@ -255,7 +255,7 @@ class Server_Add_Controller extends Admin_Controller {
} else {
try {
$extension = strtolower(pathinfo($name, PATHINFO_EXTENSION));
- if (in_array($extension, legal_file::get_photo_extensions())) {
+ if (legal_file::get_photo_extensions($extension)) {
$photo = ORM::factory("item");
$photo->type = "photo";
$photo->parent_id = $parent->id;
@@ -265,7 +265,7 @@ class Server_Add_Controller extends Admin_Controller {
$photo->owner_id = $owner_id;
$photo->save();
$entry->item_id = $photo->id;
- } else if (in_array($extension, legal_file::get_movie_extensions())) {
+ } else if (legal_file::get_movie_extensions($extension)) {
$movie = ORM::factory("item");
$movie->type = "movie";
$movie->parent_id = $parent->id;