cvs: phd / build.php
| From: | Christian Weiske | Date: | Sun, 05 Oct 2008 16:06:51 +0000 |
| Subject: | cvs: phd / build.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-2193@lists.php.net to get a copy of this message | ||
cweiske Sun Oct 5 16:06:51 2008 UTC
Modified files:
/phd build.php
Log:
Tell the user he needs php5.3
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.59&r2=1.60&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.59 phd/build.php:1.60
--- phd/build.php:1.59 Fri Jul 18 13:18:21 2008
+++ phd/build.php Sun Oct 5 16:06:50 2008
@@ -1,11 +1,15 @@
#!@php_bin@
<?php
-/* $Id: build.php,v 1.59 2008/07/18 13:18:21 loudi Exp $ */
+/* $Id: build.php,v 1.60 2008/10/05 16:06:50 cweiske Exp $ */
/* {{{ Find the $ROOT directory of PhD
- @php_dir@ will be replaced by the pear package manager
+ @php_dir@ will be replaced by the pear package manager
If @php_dir@ however hasn't been replaced by anything,
fallback to the dir containing this file */
+if (!version_compare(PHP_VERSION, "5.3", '>=')) {
+ die("PhD needs at least PHP 5.3 to run\n");
+}
+
$ROOT = "@php_dir@/phd";
if ($ROOT == "@php_dir"."@/phd") {
$ROOT = dirname(__FILE__);
@@ -124,7 +128,7 @@
foreach(val(PhDConfig::output_theme(), $output_format) as $theme => $array) {
is_dir($ROOT. "/themes/$theme") or die("Can't find the
'$theme' theme");
v("Using the %s theme (%s)", $theme, join(", ", $array),
VERBOSE_THEME_RENDERING);
-
+
foreach($array as $themename) {
$themename = basename($themename);
require_once $ROOT. "/themes/$theme/$themename.php";
@@ -141,11 +145,11 @@
default:
$themes[$themename] = new $themename(array($IDs, $REFS));
}
-
+
// FIXME: this needs to go away when we add support for
// things other than xhtml
$themes[$themename]->registerFormat($format);
-
+
// If the theme returns empty callback map there is no need to include it
$tmp = $themes[$themename]->getElementMap();