summaryrefslogtreecommitdiffstats
path: root/application/controllers/file.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-07-23 21:56:01 +0200
committerFlorian Pritz <bluewind@xinu.at>2014-07-23 21:58:19 +0200
commitcc72236f71c60396b69631656f8e0ad00a6301c8 (patch)
treea981833a17cba56e85682048a84e544e877af773 /application/controllers/file.php
parentce58ad70b8f3800adeaaadd46d8ed499bc21eda6 (diff)
Move migration code to CLI callable function
This is necessary to prevent migrations from running multiple times in parallel. A git hook can be used to run this after checkout so impact should be fairly low. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/controllers/file.php')
-rw-r--r--application/controllers/file.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index bb06e17d4..51d6cf156 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -31,16 +31,8 @@ class File extends MY_Controller {
function index()
{
if ($this->input->is_cli_request()) {
- echo "php index.php file <function> [arguments]\n";
- echo "\n";
- echo "Functions:\n";
- echo " cron Cronjob\n";
- echo " nuke_id <ID> Nukes all IDs sharing the same hash\n";
- echo "\n";
- echo "Functions that shouldn't have to be run:\n";
- echo " clean_stale_files Remove files without database entries\n";
- echo " update_file_metadata Update filesize and mimetype in database\n";
- exit;
+ $this->load->library("../controllers/tools");
+ return $this->tools->index();
}
// Try to guess what the user would like to do.
$id = $this->uri->segment(1);