Changeset c739c71 in github
- Timestamp:
- May 9, 2011 7:47:33 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- fd540ba
- Parents:
- ac3ad69
- File:
-
- 1 edited
-
program/include/rcube_template.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_template.php
r49dac95 rc739c71 110 110 } 111 111 112 113 112 /** 114 113 * Set page title variable … … 118 117 $this->pagetitle = $title; 119 118 } 120 121 119 122 120 /** … … 139 137 return $title; 140 138 } 141 142 139 143 140 /** … … 223 220 } 224 221 225 226 222 /** 227 223 * Add a localized label to the client environment … … 237 233 } 238 234 } 239 240 235 241 236 /** … … 256 251 } 257 252 } 258 259 253 260 254 /** … … 277 271 } 278 272 279 280 273 /** 281 274 * Redirect to a certain url … … 290 283 exit; 291 284 } 292 293 285 294 286 /** … … 360 352 361 353 /** 362 * Parse a specific skin template and deliver to stdout 363 * 364 * Either returns nothing, or exists hard (exit();) 354 * Parse a specific skin template and deliver to stdout (or return) 365 355 * 366 356 * @param string Template name 367 357 * @param boolean Exit script 368 * @return void 358 * @param boolean Don't write to stdout, return parsed content instead 359 * 369 360 * @link http://php.net/manual/en/function.exit.php 370 361 */ 371 private function parse($name = 'main', $exit= true)362 function parse($name = 'main', $exit = true, $write = true) 372 363 { 373 364 $skin_path = $this->config['skin_path']; … … 427 418 $hook = $this->app->plugins->exec_hook("render_page", array('template' => $realname, 'content' => $output)); 428 419 429 // add debug console430 if ($this->config['debug_level'] & 8) {431 $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;">432 <a href="#toggle" onclick="con=$(\'#dbgconsole\');con[con.is(\':visible\')?\'hide\':\'show\']();return false">console</a>433 <textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:10px" spellcheck="false"></textarea></div>'434 );435 }436 437 420 $output = $this->parse_with_globals($hook['content']); 438 $this->write(trim($output)); 421 422 if ($write) { 423 // add debug console 424 if ($this->config['debug_level'] & 8) { 425 $this->add_footer('<div id="console" style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;z-index:9000;"> 426 <a href="#toggle" onclick="con=$(\'#dbgconsole\');con[con.is(\':visible\')?\'hide\':\'show\']();return false">console</a> 427 <textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:10px" spellcheck="false"></textarea></div>' 428 ); 429 } 430 $this->write(trim($output)); 431 } 432 else { 433 return $output; 434 } 435 439 436 if ($exit) { 440 437 exit; 441 438 } 442 439 } 443 444 440 445 441 /**
Note: See TracChangeset
for help on using the changeset viewer.
