Changeset ca18a90 in github
- Timestamp:
- Apr 12, 2011 5:16:01 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 12dac491
- Parents:
- 23b4955
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_template.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r23b4955 rca18a90 2 2 =========================== 3 3 4 - Fix bug where template name without plugin prefix was used in render_page hook 4 5 - Fix handling of debug_level=4 in ajax requests (#1487831) 5 6 - Support 'abort' and 'result' response in 'preferences_save' hook, add error handling -
program/include/rcube_template.php
r79cd6ce rca18a90 369 369 { 370 370 $skin_path = $this->config['skin_path']; 371 $plugin = false; 371 $plugin = false; 372 $realname = $name; 373 $temp = explode('.', $name, 2); 372 374 $this->plugin_skin_path = null; 373 375 374 $temp = explode(".", $name, 2);375 376 if (count($temp) > 1) { 376 $plugin = $temp[0];377 $name = $temp[1];378 $skin_dir = $plugin . '/skins/' . $this->config['skin'];377 $plugin = $temp[0]; 378 $name = $temp[1]; 379 $skin_dir = $plugin . '/skins/' . $this->config['skin']; 379 380 $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; 380 if (!is_dir($skin_path)) { // fallback to default skin 381 382 // fallback to default skin 383 if (!is_dir($skin_path)) { 381 384 $skin_dir = $plugin . '/skins/default'; 382 385 $skin_path = $this->plugin_skin_path = $this->app->plugins->dir . $skin_dir; … … 386 389 $path = "$skin_path/templates/$name.html"; 387 390 388 if (!is_readable($path) && $this->deprecated_templates[$ name]) {389 $path = "$skin_path/templates/".$this->deprecated_templates[$ name].".html";391 if (!is_readable($path) && $this->deprecated_templates[$realname]) { 392 $path = "$skin_path/templates/".$this->deprecated_templates[$realname].".html"; 390 393 if (is_readable($path)) 391 394 raise_error(array('code' => 502, 'type' => 'php', 392 395 'file' => __FILE__, 'line' => __LINE__, 393 'message' => "Using deprecated template '".$this->deprecated_templates[$name]."' in ".$this->config['skin_path']."/templates. Please rename to '".$name."'"), 396 'message' => "Using deprecated template '".$this->deprecated_templates[$realname] 397 ."' in ".$this->config['skin_path']."/templates. Please rename to '".$realname."'"), 394 398 true, false); 395 399 } … … 402 406 'line' => __LINE__, 403 407 'file' => __FILE__, 404 'message' => 'Error loading template for '.$ name408 'message' => 'Error loading template for '.$realname 405 409 ), true, true); 406 410 return false; … … 418 422 419 423 // trigger generic hook where plugins can put additional content to the page 420 $hook = $this->app->plugins->exec_hook("render_page", array('template' => $ name, 'content' => $output));424 $hook = $this->app->plugins->exec_hook("render_page", array('template' => $realname, 'content' => $output)); 421 425 422 426 // add debug console
Note: See TracChangeset
for help on using the changeset viewer.
