Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
goFrendiAsgard committed May 3, 2016
1 parent 63006cf commit 4bfe150
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions application/core/CMS_Controller.php
Expand Up @@ -1185,8 +1185,6 @@ private function __cms_preg_replace_callback_widget($arr)
} elseif ($option == '_name' || $option == '_code') {
$widget_name = $arr[2];
}
//$slug = $arr[1];
//var_dump(array($slug, $widget_name));
$html = $this->__cms_build_widget($slug, $widget_name);
}

Expand Down
1 change: 0 additions & 1 deletion application/core/CMS_Module.php
Expand Up @@ -83,7 +83,6 @@ public function __construct()
$module_list = $this->cms_get_module_list();
foreach ($module_list as $module_info) {
if ($module_info['module_path'] == $module_path) {
var_dump($module_info);
$this->NAME = $module_info['module_name'];
$this->IS_ACTIVE = $module_info['active'];
$this->IS_OLD = $module_info['old'];
Expand Down
8 changes: 5 additions & 3 deletions modules/main/controllers/Setting.php
Expand Up @@ -4,20 +4,22 @@ class Setting extends CMS_Controller{
protected $theme = 'neutral';

private function update_static_content($widget_name, $content){
$content = $this->cms_parse_keyword($content);
$parsed_content = $this->cms_parse_keyword($content);
$no_change = FALSE;
$seek_no_longer = FALSE;
// see if there are changes
$widgets = $this->cms_widgets(NULL, $widget_name);
foreach($widgets as $slug => $widget_list){
foreach($widget_list as $widget){
if($widget['widget_name'] == $widget_name){
if($widget['content'] == $content){
if($widget['content'] == $parsed_content){
$no_change = TRUE;
}
$seek_no_longer = TRUE;
break;
}
}
if($no_change){
if($seek_no_longer){
break;
}
}
Expand Down

0 comments on commit 4bfe150

Please sign in to comment.