Permissions fixes
This commit is contained in:
parent
afb4fc685b
commit
696fd4475b
|
@ -20,11 +20,16 @@ function setSettings($args)
|
|||
|
||||
// Add slash at the begin and end.
|
||||
// This fields are in the settings->advanced mode
|
||||
if(isset($args['advanced'])) {
|
||||
if(isset($args['form-advanced'])) {
|
||||
$args['url'] = Text::addSlashes($args['url'],false,true);
|
||||
$args['uriPost'] = Text::addSlashes($args['uriPost']);
|
||||
$args['uriPage'] = Text::addSlashes($args['uriPage']);
|
||||
$args['uriTag'] = Text::addSlashes($args['uriTag']);
|
||||
|
||||
if(($args['uriPost']==$args['uriPage']) || ($args['uriPost']==$args['uriTag']) || ($args['uriPage']==$args['uriTag']) )
|
||||
{
|
||||
$args = array();
|
||||
}
|
||||
}
|
||||
|
||||
if( $Site->set($args) ) {
|
||||
|
|
|
@ -134,7 +134,14 @@ $Parsedown = new Parsedown();
|
|||
$Security = new Security();
|
||||
|
||||
// HTML PATHs
|
||||
$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
|
||||
//$base = (dirname(getenv('SCRIPT_NAME'))==DS)?'/':dirname(getenv('SCRIPT_NAME')).'/';
|
||||
$base = empty( $_SERVER['SCRIPT_NAME'] ) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
||||
$base = dirname($base);
|
||||
|
||||
if($base!=DS) {
|
||||
$base = $base.'/';
|
||||
}
|
||||
|
||||
define('HTML_PATH_ROOT', $base);
|
||||
|
||||
// Paths for themes
|
||||
|
@ -151,7 +158,7 @@ define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/');
|
|||
|
||||
// PHP paths with dependency
|
||||
define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/');
|
||||
define('PATH_THEME_PHP', PATH_THEME.'php'.DS)
|
||||
define('PATH_THEME_PHP', PATH_THEME.'php'.DS);
|
||||
|
||||
// Objects with dependency
|
||||
$Language = new dbLanguage( $Site->locale() );
|
||||
|
|
|
@ -64,8 +64,9 @@ class dbSite extends dbJSON
|
|||
$filters['page'] = $this->db['uriPage'];
|
||||
$filters['tag'] = $this->db['uriTag'];
|
||||
|
||||
if(empty($filter))
|
||||
if(empty($filter)) {
|
||||
return $filters;
|
||||
}
|
||||
|
||||
return $filters[$filter];
|
||||
}
|
||||
|
@ -97,15 +98,6 @@ class dbSite extends dbJSON
|
|||
return $this->db['slogan'];
|
||||
}
|
||||
|
||||
public function advancedOptions()
|
||||
{
|
||||
if($this->db['advancedOptions']==='true') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Returns the site description.
|
||||
public function description()
|
||||
{
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue