mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Fix for lancheck failing due to ../ in the URL on plugin/theme folders.
This commit is contained in:
parent
710394273c
commit
b5ff8c76f7
@ -401,7 +401,7 @@ class lancheck
|
||||
$dir2 = dirname($fullpath_trans)."/";
|
||||
}
|
||||
|
||||
return $this->edit_lanfiles($dir1,$dir2,$f1,$f2,$lan);
|
||||
return $this->edit_lanfiles($dir1,$dir2,$f1,$f2,$lan, varset($_GET['type']));
|
||||
// return true;
|
||||
}
|
||||
|
||||
@ -1200,7 +1200,8 @@ class lancheck
|
||||
}
|
||||
else
|
||||
{
|
||||
$caption = LAN_SAVED." <b>".$lan."/".$writeit."</b>";
|
||||
// $caption = LAN_SAVED." <b>".$lan."/".$writeit."</b>";
|
||||
$caption = LAN_SAVED." <b>".$writeit."</b>";
|
||||
$status = e107::getMessage()->addSuccess($caption)->render();
|
||||
}
|
||||
fclose($fp);
|
||||
@ -1703,7 +1704,7 @@ class lancheck
|
||||
|
||||
$parms = $_GET;
|
||||
$parms['sub'] = 'edit';
|
||||
$parms['file'] = $comp_dir."/languages/".$lnk;
|
||||
$parms['file'] = $comp_name."/languages/".$lnk;
|
||||
$parms['lan'] = $this->transLanguage;
|
||||
$parms['iframe'] = 1;
|
||||
$parms['type'] = $mode;
|
||||
@ -1748,7 +1749,7 @@ class lancheck
|
||||
}
|
||||
|
||||
|
||||
function edit_lanfiles($dir1,$dir2,$f1,$f2,$lan)
|
||||
function edit_lanfiles($dir1, $dir2, $f1, $f2, $lan, $type=null)
|
||||
{
|
||||
if($lan == '')
|
||||
{
|
||||
@ -1756,6 +1757,18 @@ class lancheck
|
||||
return null;
|
||||
}
|
||||
|
||||
if($type === 'P')
|
||||
{
|
||||
$dir1 = e_PLUGIN.$dir1;
|
||||
$dir2 = e_PLUGIN.$dir2;
|
||||
}
|
||||
|
||||
if($type === 'T')
|
||||
{
|
||||
$dir1 = e_THEME.$dir1;
|
||||
$dir2 = e_THEME.$dir2;
|
||||
}
|
||||
|
||||
// $ns = e107::getRender();
|
||||
$sql = e107::getDb();
|
||||
|
||||
@ -1788,6 +1801,12 @@ class lancheck
|
||||
|
||||
$writable = is_writable($dir2);
|
||||
$trans = $this->get_lan_file_phrases($dir1,$dir2,$f1,$f2);
|
||||
|
||||
if(empty($trans))
|
||||
{
|
||||
//return array('caption'=>"Error", 'text'=>"Unable to open file", 'mode'=>'edit', 'file'=>$capFile);
|
||||
}
|
||||
|
||||
$keys = array_keys($trans);
|
||||
sort($keys);
|
||||
|
||||
|
@ -180,6 +180,7 @@ if(!empty($_GET['iframe']))
|
||||
{
|
||||
$this->loadPackInfo();
|
||||
$pref = e107::getPref();
|
||||
/** @var lancheck $lck */
|
||||
$lck = e107::getSingleton('lancheck', e_ADMIN."lancheck.php");
|
||||
|
||||
$lck->errorsOnly($pref['multilanguage_verify_errorsonly']);
|
||||
|
@ -476,7 +476,7 @@ class e_parse_shortcode
|
||||
}
|
||||
else
|
||||
{
|
||||
e107::getDebug()->log("Couldn't Find Class '".$className."' OR 'plugin_".$className."'in <b>".$path."</b>");
|
||||
e107::getDebug()->log("Found file: <b>".$path."</b> but couldn't Find Class <b>".$className."</b> OR <b>plugin_".$className."</b> inside.");
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user