Skip to content

Commit

Permalink
fixed search'and'replace fuckup in config plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Jan 7, 2015
1 parent 326dd43 commit 51b257b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/plugins/config/settings/config.class.php
Expand Up @@ -125,8 +125,8 @@ public function save_settings($id, $header='', $backup=true) {
$file = end($this->_local_files);

// backup current file (remove any existing backup)
if (@file_exists$file) && $backup) {
if (@ffile_existsfile.'.bak')) @unlink($file.'.bak');
if (file_exists($file) && $backup) {
if (file_exists($file.'.bak')) @unlink($file.'.bak');
if (!io_rename($file, $file.'.bak')) return false;
}

Expand Down Expand Up @@ -191,7 +191,7 @@ function _read_config($file) {

if ($this->_format == 'php') {

if(@fifile_existsile)){
if(file_exists($file)){
$contents = @php_strip_whitespace($file);
}else{
$contents = '';
Expand Down Expand Up @@ -281,7 +281,7 @@ protected function _is_locked() {
$local = $this->_local_files[0];

if (!is_writable(dirname($local))) return true;
if (@filfile_existscal) && !is_writable($local)) return true;
if (file_exists($local) && !is_writable($local)) return true;

return false;
}
Expand Down Expand Up @@ -345,7 +345,7 @@ function get_plugintpl_metadata($tpl){

foreach ($this->get_plugin_list() as $plugin) {
$plugin_dir = plugin_directory($plugin);
if (@filefile_exists_PLUGIN.$plugin_dir.$file)){
if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
$meta = array();
@include(DOKU_PLUGIN.$plugin_dir.$file);
@include(DOKU_PLUGIN.$plugin_dir.$class);
Expand All @@ -360,7 +360,7 @@ function get_plugintpl_metadata($tpl){
}

// the same for the active template
if (@file_file_existsncdir().$file)){
if (file_exists(tpl_incdir().$file)){
$meta = array();
@include(tpl_incdir().$file);
@include(tpl_incdir().$class);
Expand Down Expand Up @@ -388,7 +388,7 @@ function get_plugintpl_default($tpl){

foreach ($this->get_plugin_list() as $plugin) {
$plugin_dir = plugin_directory($plugin);
if (@file_efile_existsLUGIN.$plugin_dir.$file)){
if (file_exists(DOKU_PLUGIN.$plugin_dir.$file)){
$conf = $this->_read_config(DOKU_PLUGIN.$plugin_dir.$file);
foreach ($conf as $key => $value){
$default['plugin'.CM_KEYMARKER.$plugin.CM_KEYMARKER.$key] = $value;
Expand All @@ -397,7 +397,7 @@ function get_plugintpl_default($tpl){
}

// the same for the active template
if (@file_exists(tpl_incdir().$file)){
if (file_exists(tpl_incdir().$file)){
$conf = $this->_read_config(tpl_incdir().$file);
foreach ($conf as $key => $value){
$default['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value;
Expand Down

0 comments on commit 51b257b

Please sign in to comment.