Changeset 30226 for documentation/trunk/wiki
- Timestamp:
- 2015-09-08T15:49:20+12:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/wiki/plugins/greenstonedocs/syntax.php
r30114 r30226 74 74 { 75 75 // Determine the starting point for the update 76 $base_dir = DOKU_INC . 'data/pages/' . $this->getConf('currentnamespace') . '/'; 76 $base_dir = DOKU_INC . 'data/pages/'; 77 if (!empty($this->getConf('currentnamespace'))) 78 { 79 $base_dir .= $this->getConf('currentnamespace') . '/'; 80 } 77 81 // - ensure trailing : for consistency in namespaces 78 82 $current_namespace = $this->getConf('currentnamespace'); … … 173 177 $pattern = '/(<imgcaption .+?>)(<\/imgcaption>)\s*(\{\{.+?\}\})/s'; 174 178 $replace = '${1}${3}${2}'; 175 $page_content = preg_replace($pattern, $replace, $page_content, -1, $replace_count); 179 $image_replace_count = 0; 180 $page_content = preg_replace($pattern, $replace, $page_content, -1, $image_replace_count); 181 $replace_count = $replace_count + $image_replace_count; 176 182 if ($replace_count > 0) 177 183 { … … 209 215 // Note that the result is FALSE if no match, and should be 0 if name- 210 216 // space starts with prefix. 211 if ( strpos($current_full_namespace, $this->target_namespace_prefix) === 0)217 if (empty($this->target_namespace_prefix) || strpos($current_full_namespace, $this->target_namespace_prefix) === 0) 212 218 { 213 219 // Hiding the section/translation ID tags in headers
Note:
See TracChangeset
for help on using the changeset viewer.