repaired image selecta

This commit is contained in:
Logsol 2013-07-10 14:46:32 +02:00
parent 5b173f381c
commit 43152b3b68
3 changed files with 8 additions and 10 deletions

View file

@ -26,7 +26,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
$type = 'page';
}
$path = getcwd().'/img/' . $type . '/';
$path = getcwd().'/public/img/' . $type . '/';
if(isset($_FILES['myfile']))
{
@ -54,7 +54,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
}
$ar = array();
if (is_readable($path) && $handle = opendir())
if (is_readable($path) && $handle = opendir($path))
{
while (false !== ($file = readdir($handle))) {
if(is_dir($file)) continue;
@ -63,6 +63,7 @@ class AdminPageController extends Katharsis_Controller_Abstract
closedir($handle);
}
$this->_view->type = $type;
$this->_view->files = $ar;
echo $this->_view->render('AdminPage/image');