Skip to content

Commit

Permalink
Dev Some translations fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Jan 28, 2019
1 parent 702247d commit 84c4a7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/themes.php
Expand Up @@ -465,9 +465,9 @@ public function templatefiledelete()
$sPostedFile = CHtml::decode(App()->request->getPost('otherfile')); // Filename is encode, need to decode.
$sFileToDelete = str_replace($oEditedTemplate->filesPath, '', $sPostedFile);
$the_full_file_path = realpath($filesdir.$sFileToDelete);
/* Try to delete a file out of files dir */
if(substr($the_full_file_path, 0, strlen(realpath($filesdir))) != realpath($filesdir)) {
Yii::app()->user->setFlash('error', sprintf(gT("File %s couldn't be deleted, out of template files directory."), CHtml::encode($sPostedFile)));
/* User tries to delete a file outside of files dir */
Yii::app()->user->setFlash('error', sprintf(gT("File %s cannot be deleted for security reasons."), CHtml::encode($sPostedFile)));
$this->getController()->redirect(array('admin/themes', 'sa'=>'view', 'editfile'=> App()->request->getPost('editfile'), 'screenname'=>App()->request->getPost('screenname'), 'templatename'=>$sTemplateName));
}
/* No try to hack, go to delete */
Expand Down

0 comments on commit 84c4a7d

Please sign in to comment.