cvs: pres2 / display.php
| From: | jim winstead | Date: | Wed, 05 Nov 2003 15:43:01 +0000 |
| Subject: | cvs: pres2 / display.php | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-895@lists.php.net to get a copy of this message | ||
jimw Wed Nov 5 10:43:01 2003 EDT
Modified files:
/pres2 display.php
Log:
handle required_extension attribute on examples, so the results will be skipped
when an extension required to generate the results is not available
Index: pres2/display.php
diff -u pres2/display.php:1.5 pres2/display.php:1.6
--- pres2/display.php:1.5 Sat Nov 1 18:52:24 2003
+++ pres2/display.php Wed Nov 5 10:43:01 2003
@@ -343,7 +343,7 @@
echo "</div></div>\n";
}
- if($example->result && (empty($example->condition) ||
(!empty($example->condition) && isset(${$example->condition})))) {
+ if($example->result && (empty($example->condition) ||
isset(${$example->condition})) && (empty($example->required_extension) ||
extension_loaded($example->required_extension))) {
if(!$example->hide) echo '<div style="font-size:
'.(4*(float)$example->fontsize/3)."em;\">Output</div>\n";
$_html_sz = (float) $example->rfontsize;
if(!$_html_sz) $_html_sz = 0.1;
@@ -803,7 +803,7 @@
$example->highlight($this->slideDir);
echo "</td></tr></table>\n";
}
- if($example->result && (empty($example->condition) ||
(!empty($example->condition) && isset(${$example->condition})))) {
+ if($example->result && (empty($example->condition) ||
isset(${$example->condition})) && (empty($example->required_extension) ||
extension_loaded($example->required_extension))) {
if(!$example->hide) {
echo "<h2>Output</h2>\n";
}
@@ -1448,7 +1448,7 @@
}
$this->pdf_cy = pdf_get_value($this->pdf, "texty");
- if($example->result && $example->type!='iframe' &&
(empty($example->condition) || (!empty($example->condition) &&
isset(${$example->condition})))) {
+ if($example->result && $example->type != 'iframe' &&
(empty($example->condition) || isset(${$example->condition})) &&
(empty($example->required_extension) || extension_loaded($example->required_extension))) {
if(!$example->hide) {
$this->pdf_cy = pdf_get_value($this->pdf, "texty");
pdf_set_text_pos($this->pdf,$this->pdf_cx+20,$this->pdf_cy); // Force to
left-margin
@@ -1791,4 +1791,4 @@
}
}
-?>
\ No newline at end of file
+?>