equal
deleted
inserted
replaced
108 |
108 |
109 // For each theme, check ACLs and delete from RAM if not authorized |
109 // For each theme, check ACLs and delete from RAM if not authorized |
110 foreach ( $this->theme_list as $i => $theme ) |
110 foreach ( $this->theme_list as $i => $theme ) |
111 { |
111 { |
112 if ( !$theme['group_list'] ) |
112 if ( !$theme['group_list'] ) |
|
113 continue; |
|
114 if ( $theme['theme_id'] === getConfig('theme_default') ) |
113 continue; |
115 continue; |
114 switch ( $theme['group_policy'] ) |
116 switch ( $theme['group_policy'] ) |
115 { |
117 { |
116 case 'allow_all': |
118 case 'allow_all': |
117 // Unconditionally allowed |
119 // Unconditionally allowed |
1086 |
1088 |
1087 // Make sure the template even exists |
1089 // Make sure the template even exists |
1088 if ( !is_file($tpl_file_fullpath) ) |
1090 if ( !is_file($tpl_file_fullpath) ) |
1089 { |
1091 { |
1090 die_semicritical('Cannot find template file', |
1092 die_semicritical('Cannot find template file', |
1091 '<p>The template parser was asked to load the file "' . htmlspecialchars($filename) . '", but that file couldn\'t be found in the directory for |
1093 '<p>The template parser was asked to load the file "' . htmlspecialchars($tpl_file_fullpath) . '", but that file couldn\'t be found in the directory for |
1092 the current theme.</p> |
1094 the current theme.</p> |
1093 <p>Additional debugging information:<br /> |
1095 <p>Additional debugging information:<br /> |
1094 <b>Theme currently in use: </b>' . $this->theme . '<br /> |
1096 <b>Theme currently in use: </b>' . $this->theme . '<br /> |
1095 <b>Requested file: </b>' . $file . ' |
1097 <b>Requested file: </b>' . $file . ' |
1096 </p>'); |
1098 </p>'); |
1843 $c = ob_get_contents(); |
1845 $c = ob_get_contents(); |
1844 ob_end_clean(); |
1846 ob_end_clean(); |
1845 break; |
1847 break; |
1846 case BLOCK_PLUGIN: |
1848 case BLOCK_PLUGIN: |
1847 $parser = $this->makeParserText('{CONTENT}'); |
1849 $parser = $this->makeParserText('{CONTENT}'); |
1848 $c = (gettype($this->fetch_block($row['block_content'])) == 'string') ? $this->fetch_block($row['block_content']) : 'Can\'t find plugin block'; |
1850 $c = (gettype($this->fetch_block($row['block_content'])) == 'string') ? $this->fetch_block($row['block_content']) : /* This used to say "can't find plugin block" but I think it's more friendly to just silently hide it. */ ''; |
1849 break; |
1851 break; |
1850 } |
1852 } |
1851 $parser->assign_vars(Array( 'TITLE'=>$this->tplWikiFormat($row['block_name']), 'CONTENT'=>$c )); |
1853 $parser->assign_vars(Array( 'TITLE'=>$this->tplWikiFormat($row['block_name']), 'CONTENT'=>$c )); |
1852 $run = $parser->run(); |
1854 $run = $parser->run(); |
1853 if ( $row['block_type'] == BLOCK_PLUGIN ) |
1855 if ( $row['block_type'] == BLOCK_PLUGIN ) |