Inital commit
This commit is contained in:
@@ -8,6 +8,7 @@ use Symfony\Component\Routing\Router;
|
||||
use Thelia\Core\HttpFoundation\Request;
|
||||
use Thelia\Files\FileModelParentInterface;
|
||||
use Thelia\Form\BaseForm;
|
||||
use Thelia\Form\Definition\AdminForm;
|
||||
use Thelia\Form\FolderImageModification;
|
||||
use Thelia\Model\Base\FolderImage as BaseFolderImage;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
@@ -93,19 +94,7 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
|
||||
*/
|
||||
public function getUpdateFormId()
|
||||
{
|
||||
return 'thelia.admin.folder.image.modification';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the form instance used to change this object information
|
||||
*
|
||||
* @param \Thelia\Core\HttpFoundation\Request $request
|
||||
*
|
||||
* @return BaseForm the form
|
||||
*/
|
||||
public function getUpdateFormInstance(Request $request)
|
||||
{
|
||||
return new FolderImageModification($request);
|
||||
return AdminForm::FOLDER_IMAGE_MODIFICATION;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +102,14 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
|
||||
*/
|
||||
public function getUploadDir()
|
||||
{
|
||||
return THELIA_LOCAL_DIR . 'media'.DS.'images'.DS.'folder';
|
||||
$uploadDir = ConfigQuery::read('images_library_path');
|
||||
if ($uploadDir === null) {
|
||||
$uploadDir = THELIA_LOCAL_DIR . 'media' . DS . 'images';
|
||||
} else {
|
||||
$uploadDir = THELIA_ROOT . $uploadDir;
|
||||
}
|
||||
|
||||
return $uploadDir . DS . 'folder';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +118,7 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
|
||||
*/
|
||||
public function getRedirectionUrl()
|
||||
{
|
||||
return '/admin/folder/update/' . $this->getFolderId();
|
||||
return '/admin/folders/update/' . $this->getFolderId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user