Deutschland United States United Kingdom
ContentLion - Open Source CMS

Compare Revisions

Ignore whitespace Rev 2 → Rev 3

/trunk/config.php
New file
0,0 → 1,17
<?php
 
/*
* This is a little configuration-file for the phppage-plugin.
* The default value secures your ContentLion-installation.
* If you change this, all admin's can execute foreign uploaded php-scripts.
* For more informations please visit http://contentlion.pf-control.de/phppage.html
*/
 
$config = array();
 
/*
* If this value is true, scripts can only execute from content/scripts.
*/
$config['executeOnlyFromScriptsPath'] = true;
 
?>
/trunk/classes/page.php
17,6 → 17,12
public function display () {
$content = $this->page->getEditorContent($this);
require(dirname(__FILE__) . "/../config.php");
if (isset($config['executeOnlyFromScriptsPath']) && $config['executeOnlyFromScriptsPath']) {
$content = "content/scripts/" . trim(str_replace("/", "", str_replace("content/scripts/", "", $content)));
}
if ($content == "" || $content == null || !file_exists(trim(Settings::getInstance()->get("root") . $content))) {
echo Language::DirectTranslate("plugin_phppage_not-found");
} else {