* [bug#59671,done,0.5h] unset sub menu when preview image.
This commit is contained in:
@@ -146,6 +146,9 @@ class file extends control
|
||||
return print($this->view->error);
|
||||
}
|
||||
|
||||
/* Unset the menu. */
|
||||
if(!empty($this->lang->{$this->app->tab}->menu)) $this->lang->{$this->app->tab}->menu = array();
|
||||
|
||||
if(!$this->file->checkPriv($file))
|
||||
{
|
||||
if(isInModal()) return $this->send(array('result' => 'success', 'message' => $this->lang->file->accessDenied, 'closeModal' => true, 'load' => true));
|
||||
@@ -164,6 +167,7 @@ class file extends control
|
||||
}
|
||||
|
||||
/* If the mode is open, locate directly. */
|
||||
$this->view->title = $this->lang->file->previewFile;
|
||||
$this->view->file = $file;
|
||||
$this->view->charset = $this->get->charset ? $this->get->charset : $this->config->charset;
|
||||
$this->view->fileType = ($file->extension == 'txt') ? 'txt' : ($file->extension == 'mp4' ? 'video' : 'image');
|
||||
|
||||
@@ -23,7 +23,7 @@ if(!empty($error))
|
||||
else
|
||||
{
|
||||
$fileContent = trim(file_get_contents($file->realPath));
|
||||
$fromOld = strpos($_SERVER['HTTP_REFERER'], 'ajaxIframeModal') !== false;
|
||||
$fromOld = !empty($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'ajaxIframeModal') !== false;
|
||||
if($charset != $config->charset)
|
||||
{
|
||||
$fileContent = helper::convertEncoding($fileContent, $charset . "//IGNORE", $config->charset);
|
||||
|
||||
Reference in New Issue
Block a user