diff --git a/application/controllers/TestController.php b/application/controllers/TestController.php index 9bad73cea6d31fa7695b66e38cd850d21323ec1c..e3c6ae9b99b400644463051722fee3e83b6a72a4 100644 --- a/application/controllers/TestController.php +++ b/application/controllers/TestController.php @@ -10,13 +10,13 @@ class TestController extends Nmc_Controller_Action public function indexAction() { - header('Content-type: text/plain'); - $test = Test::getInstance(); - $rows = $test->fetchAll(); - foreach($rows as $row) { - echo 'Creation time: ' . $row->creationTime . "\n"; - echo 'Modification time: ' . $row->modifiedTime . "\n"; - echo 'Asset ID: ' . $row->getAssetId() . "\n"; + return; + + $files = Files::getInstance()->fetchAll(); + foreach($files as $file) { + $fileHash = hash('whirlpool', $file->data); + $file->hash = $fileHash; + $file->save(); } } }