Changeset 7fcb56b in github
- Timestamp:
- Nov 7, 2010 7:44:54 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 3bb9b52
- Parents:
- f664284
- File:
-
- 1 edited
-
program/include/rcube_template.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_template.php
r1ac5431 r7fcb56b 45 45 public $ajax_call = false; 46 46 47 // deprecated names of templates used before 0.5 48 private $deprecated_templates = array( 49 'contact' => 'showcontact', 50 'contactadd' => 'addcontact', 51 'contactedit' => 'editcontact', 52 'identityedit' => 'editidentity', 53 'messageprint' => 'printmessage', 54 ); 55 47 56 /** 48 57 * Constructor … … 166 175 { 167 176 $filename = $this->config['skin_path'] . '/templates/' . $name . '.html'; 168 169 return (is_file($filename) && is_readable($filename)); 177 return (is_file($filename) && is_readable($filename)) || ($this->deprecated_templates[$name] && $this->template_exists($this->deprecated_templates[$name])); 170 178 } 171 179 … … 380 388 381 389 $path = "$skin_path/templates/$name.html"; 390 391 if (!is_readable($path) && $this->deprecated_templates[$name]) { 392 $path = "$skin_path/templates/".$this->deprecated_templates[$name].".html"; 393 if (is_readable($path)) 394 raise_error(array('code' => 502, 'type' => 'php', 395 'file' => __FILE__, 'line' => __LINE__, 396 'message' => "Using deprecated template '".$this->deprecated_templates[$name]."' in ".$this->config['skin_path']."/templates. Please rename to '".$name."'"), 397 true, false); 398 } 382 399 383 400 // read template file
Note: See TracChangeset
for help on using the changeset viewer.
