mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Disable procFileImageResize and related ruleset
This commit is contained in:
parent
c160623f35
commit
0d529ef682
4 changed files with 4 additions and 41 deletions
|
|
@ -354,6 +354,7 @@ class Cleanup extends Base
|
|||
'modules/editor/skins/xpresseditor/' => 'deleted:xe',
|
||||
'modules/editor/styles/' => 'deleted:xe',
|
||||
'modules/editor/tpl/preview.html' => 'deleted',
|
||||
'modules/file/ruleset/imageResize.xml' => 'deleted',
|
||||
'modules/module/schemas/site_admin.xml' => 'deleted',
|
||||
'modules/module/tpl/css/module_admin.less' => 'deleted',
|
||||
'modules/page/page.wap.php' => 'deleted:xe',
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<action name="procFileUpload" type="controller" check_csrf="false" />
|
||||
<action name="procFileIframeUpload" type="controller" />
|
||||
<action name="procFileImageResize" type="controller" ruleset="imageResize" />
|
||||
<action name="procFileImageResize" type="controller" />
|
||||
<action name="procFileDelete" type="controller" />
|
||||
<action name="procFileSetCoverImage" type="controller" />
|
||||
<action name="procFileDownload" type="controller" method="GET|POST" />
|
||||
|
|
|
|||
|
|
@ -235,42 +235,11 @@ class FileController extends File
|
|||
/**
|
||||
* Image resize
|
||||
*
|
||||
* @return void
|
||||
* @deprecated
|
||||
*/
|
||||
function procFileImageResize()
|
||||
{
|
||||
$file_srl = Context::get('file_srl');
|
||||
$width = Context::get('width');
|
||||
$height = Context::get('height');
|
||||
|
||||
if(!$file_srl || !$width)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$fileInfo = FileModel::getFile($file_srl);
|
||||
if(!$fileInfo || $fileInfo->direct_download != 'Y')
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$source_src = $fileInfo->uploaded_filename;
|
||||
$output_src = $source_src . '.resized' . strrchr($source_src,'.');
|
||||
|
||||
if(!$height) $height = $width-1;
|
||||
|
||||
if(FileHandler::createImageFile($source_src,$output_src,$width,$height,'','ratio'))
|
||||
{
|
||||
$output = new stdClass();
|
||||
$output->info = getimagesize($output_src);
|
||||
$output->src = $output_src;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
$this->add('resized_info',$output);
|
||||
throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<fields>
|
||||
<field name="width" required="true" rule="number" />
|
||||
<field name="file_srl" required="true" rule="number" />
|
||||
</fields>
|
||||
</ruleset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue