[geeklog-cvs] geeklog: Raised minimum required PHP version to PHP 4.3.0

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Feb 21 11:08:21 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/93f182e7807e
changeset: 6790:93f182e7807e
user:      Dirk Haun <dirk at haun-online.de>
date:      Sat Feb 21 16:46:34 2009 +0100
description:
Raised minimum required PHP version to PHP 4.3.0

diffstat:

20 files changed, 65 insertions(+), 112 deletions(-)
plugins/spamx/BlackList.Examine.class.php                        |    9 -
plugins/spamx/IPofUrl.Examine.class.php                          |    9 -
plugins/spamx/MTBlackList.Examine.class.php                      |    9 -
public_html/admin/install/index.php                              |    4 
public_html/admin/install/language/chinese_simplified_utf-8.php  |    4 
public_html/admin/install/language/chinese_traditional_utf-8.php |    4 
public_html/admin/install/language/english.php                   |    4 
public_html/admin/install/language/german.php                    |    4 
public_html/admin/install/language/hebrew_utf-8.php              |    4 
public_html/admin/install/language/japanese_utf-8.php            |    4 
public_html/admin/install/language/polish.php                    |    4 
public_html/admin/install/lib-install.php                        |   13 +-
public_html/admin/user.php                                       |    1 
public_html/docs/changes.html                                    |   21 ++++
public_html/docs/history                                         |    4 
public_html/lib-common.php                                       |   47 ++--------
system/classes/story.class.php                                   |   23 ----
system/lib-sessions.php                                          |    1 
system/lib-user.php                                              |    1 
system/pear/README                                               |    7 -

diffs (truncated from 415 to 300 lines):

diff -r 6e9c261610c2 -r 93f182e7807e plugins/spamx/BlackList.Examine.class.php
--- a/plugins/spamx/BlackList.Examine.class.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/plugins/spamx/BlackList.Examine.class.php	Sat Feb 21 16:46:34 2009 +0100
@@ -20,15 +20,6 @@
  * Include Abstract Examine Class
  */
 require_once $_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php';
-
-/**
-* html_entity_decode is only available as of PHP 4.3.0
-*/
-if (!function_exists ('html_entity_decode')) {
-    require_once ('PHP/Compat.php');
-
-    PHP_Compat::loadFunction ('html_entity_decode');
-}
 
 /**
  * Examines Comment according to Personal BLacklist
diff -r 6e9c261610c2 -r 93f182e7807e plugins/spamx/IPofUrl.Examine.class.php
--- a/plugins/spamx/IPofUrl.Examine.class.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/plugins/spamx/IPofUrl.Examine.class.php	Sat Feb 21 16:46:34 2009 +0100
@@ -20,15 +20,6 @@
 * Include Abstract Examine Class
 */
 require_once $_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php';
-
-/**
-* html_entity_decode is only available as of PHP 4.3.0
-*/
-if (!function_exists ('html_entity_decode')) {
-    require_once ('PHP/Compat.php');
-
-    PHP_Compat::loadFunction ('html_entity_decode');
-}
 
 /**
 * Examines Comment according to Personal BLacklist
diff -r 6e9c261610c2 -r 93f182e7807e plugins/spamx/MTBlackList.Examine.class.php
--- a/plugins/spamx/MTBlackList.Examine.class.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/plugins/spamx/MTBlackList.Examine.class.php	Sat Feb 21 16:46:34 2009 +0100
@@ -24,15 +24,6 @@
  * Include Abstract Examine Class
  */
 require_once $_CONF['path'] . 'plugins/spamx/' . 'BaseCommand.class.php';
-
-/**
-* html_entity_decode is only available as of PHP 4.3.0
-*/
-if (!function_exists ('html_entity_decode')) {
-    require_once ('PHP/Compat.php');
-
-    PHP_Compat::loadFunction ('html_entity_decode');
-}
 
 /**
  * Examines Comment according to MT-BLacklist
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/index.php
--- a/public_html/admin/install/index.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/index.php	Sat Feb 21 16:46:34 2009 +0100
@@ -951,8 +951,8 @@
 if (INST_phpOutOfDate()) {
 
     // If their version of PHP is not supported, print an error:
-    $display .= '<h1 class="heading">' . $LANG_INSTALL[4] . '</h1>' . LB;
-    $display .= '<p>' . $LANG_INSTALL[5] . $phpv[0] . '.' . $phpv[1] . '.' . (int) $phpv[2] . $LANG_INSTALL[6] . '</p>' . LB;
+    $display .= '<h1 class="heading">' . str_replace('4.1.0', SUPPORTED_PHP_VER, $LANG_INSTALL[4]) . '</h1>' . LB;
+    $display .= '<p>' . str_replace('4.1.0', SUPPORTED_PHP_VER, $LANG_INSTALL[5]) . phpversion() . $LANG_INSTALL[6] . '</p>' . LB;
 
 } else {
 
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/chinese_simplified_utf-8.php
--- a/public_html/admin/install/language/chinese_simplified_utf-8.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/chinese_simplified_utf-8.php	Sat Feb 21 16:46:34 2009 +0100
@@ -54,8 +54,8 @@
     1 => '安装支助',
     2 => '终极网志系统',
     3 => '志乐安装',
-    4 => '需要PHP 4.1.0',
-    5 => '抱歉, 志乐要求最少 PHP 4.1.0 来操作(你有的是',
+    4 => '需要PHP 4.3.0',
+    5 => '抱歉, 志乐要求最少 PHP 4.3.0 来操作(你有的是',
     6 => '). 请 <a href="http://www.php.net/downloads.php">升级PHP</a> 安装 或请你的网站服务员帮你安装.',
     7 => '找不到志乐档案',
     8 => '安装系统无法找到关键的志乐档案. 也许你将它们搬移过. 请指定所需档案和目录的路径:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/chinese_traditional_utf-8.php
--- a/public_html/admin/install/language/chinese_traditional_utf-8.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/chinese_traditional_utf-8.php	Sat Feb 21 16:46:34 2009 +0100
@@ -54,8 +54,8 @@
     1 => '安裝支助',
     2 => '終極網志系統',
     3 => '志樂安裝',
-    4 => '需要PHP 4.1.0',
-    5 => '抱歉, 志樂要求最少 PHP 4.1.0 來操作(你有的是',
+    4 => '需要PHP 4.3.0',
+    5 => '抱歉, 志樂要求最少 PHP 4.3.0 來操作(你有的是',
     6 => '). 請 <a href="http://www.php.net/downloads.php">升級PHP</a> 安裝 或請你的網站服務員幫你安裝.',
     7 => '找不到志樂檔案',
     8 => '安裝系統無法找到關鍵的志樂檔案. 也許你將它們搬移過. 請指定所需檔案和目錄的路徑:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/english.php
--- a/public_html/admin/install/language/english.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/english.php	Sat Feb 21 16:46:34 2009 +0100
@@ -53,8 +53,8 @@
     1 => 'Installation Support',
     2 => 'The Ultimate Weblog System',
     3 => 'Geeklog Installation',
-    4 => 'PHP 4.1.0 required',
-    5 => 'Sorry, but Geeklog requires at least PHP 4.1.0 to run (you have version ',
+    4 => 'PHP 4.3.0 required',
+    5 => 'Sorry, but Geeklog requires at least PHP 4.3.0 to run (you have version ',
     6 => '). Please <a href="http://www.php.net/downloads.php">upgrade your PHP</a> install or ask your hosting service to do it for you.',
     7 => 'Unable to locate Geeklog files',
     8 => 'The installer was unable to locate critical Geeklog files. This is probably because you have moved them from their default location. Please specify the paths to the files and directories below:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/german.php
--- a/public_html/admin/install/language/german.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/german.php	Sat Feb 21 16:46:34 2009 +0100
@@ -53,8 +53,8 @@
     1 => 'Hilfe zur Installation',
     2 => 'Zuverlässigkeit eingebaut',
     3 => 'Geeklog-Installation',
-    4 => 'PHP 4.1.0 benötigt',
-    5 => 'Sorry, Geeklog benötigt mindestens PHP 4.1.0 (Du hast Version ',
+    4 => 'PHP 4.3.0 benötigt',
+    5 => 'Sorry, Geeklog benötigt mindestens PHP 4.3.0 (Du hast Version ',
     6 => '). Bitte <a href="http://www.php.net/downloads.php">aktualisiere Deine PHP-Installation</a> oder bitte Deinen Hosting-Provider darum.',
     7 => 'Geeklog-Dateien nicht gefunden',
     8 => 'Das Installations-Skript hat einige wichtige Geeklog-Dateien nicht gefunden. Wahrscheinlich hast Du diese in andere Verzeichnisse verschoben. Bitte gib hier die Pfade zu den Dateien und Verzeichnissen an:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/hebrew_utf-8.php
--- a/public_html/admin/install/language/hebrew_utf-8.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/hebrew_utf-8.php	Sat Feb 21 16:46:34 2009 +0100
@@ -49,8 +49,8 @@
     1 => 'תמיכת התקנה',
     2 => 'The Ultimate Weblog System',
     3 => 'התקנת Geeklog',
-    4 => 'דרוש PHP 4.1.0',
-    5 => 'מצטערים, אבל Geeklog דורש לפחות PHP 4.1.0 בשביל לרוץ (לכם יש גירסה ',
+    4 => 'דרוש PHP 4.3.0',
+    5 => 'מצטערים, אבל Geeklog דורש לפחות PHP 4.3.0 בשביל לרוץ (לכם יש גירסה ',
     6 => '). אנא <a href="http://www.php.net/downloads.php">שדרגו את גירסת ה-PHP שלכם</a> או בקשו ממארחי השרת שלכם לעשות זאת בשבילכם.',
     7 => 'לא אותרו הקבצים של Geeklog',
     8 => 'קובץ ההתקנה לא הצליח לאתר את הקבצים החשובים של Geeklog. זה כנראה מפני שהיזזתם אותם ממיקום ברירת המחדל שלהם. אנא ציינו את הנתיבים לקבצים ולספריות להלן:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/japanese_utf-8.php
--- a/public_html/admin/install/language/japanese_utf-8.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/japanese_utf-8.php	Sat Feb 21 16:46:34 2009 +0100
@@ -55,8 +55,8 @@
     1 => 'インストールで困ったら,こちらのサイトへ',
     2 => 'The Ultimate Weblog System',
     3 => 'Geeklogのインストール',
-    4 => 'PHP 4.1.0が必要です',
-    5 => '残念ですが,Geeklogをインストールするには最低でもPHP 4.1.0が必要です(現在のバージョンは ',
+    4 => 'PHP 4.3.0が必要です',
+    5 => '残念ですが,Geeklogをインストールするには最低でもPHP 4.3.0が必要です(現在のバージョンは ',
     6 => ')。自分で<a href="http://www.php.net/downloads.php">PHPをバージョンアップする</a>か,ホスティング会社に依頼してください。',
     7 => 'Geeklogのファイルがどこにあるかわかりません',
     8 => 'Geeklogの重要なファイルがどこにあるかわかりません。たぶん,デフォルトの位置から移動させているためでしょう。下のテキストボックスにファイルのパスを入力してください。:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/language/polish.php
--- a/public_html/admin/install/language/polish.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/language/polish.php	Sat Feb 21 16:46:34 2009 +0100
@@ -53,8 +53,8 @@
     1 => 'Instalacja Pomoc',
     2 => 'The Ultimate Weblog System',
     3 => 'Geeklog - Instalacja',
-    4 => 'Wymagane PHP 4.1.0',
-    5 => 'Sorry, ale Geeklog wymaga do uruchomienia co najmniej PHP 4.1.0 (wersja zainstalowana to ',
+    4 => 'Wymagane PHP 4.3.0',
+    5 => 'Sorry, ale Geeklog wymaga do uruchomienia co najmniej PHP 4.3.0 (wersja zainstalowana to ',
     6 => '). Proszê <a href="http://www.php.net/downloads.php">uaktualniæ wersjê PHP</a> lub zg³osiæ to do swojego providera hostingu.',
     7 => 'Nie mo¿na zlokalizowaæ plików Geeklog-a',
     8 => 'The installation script was unable to locate critical Geeklog files. This is probably because you have moved them from their default location. Please specify the paths to the files and directories below:',
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/install/lib-install.php
--- a/public_html/admin/install/lib-install.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/install/lib-install.php	Sat Feb 21 16:46:34 2009 +0100
@@ -58,7 +58,7 @@
     define('XHTML', ' /');
 }
 if (!defined('SUPPORTED_PHP_VER')) {
-    define('SUPPORTED_PHP_VER', '4.1.0');
+    define('SUPPORTED_PHP_VER', '4.3.0');
 }
 
 if (empty($LANG_DIRECTION)) {
@@ -237,6 +237,7 @@
 function php_v()
 {
     $phpv = explode('.', phpversion());
+
     return array($phpv[0], $phpv[1], (int) $phpv[2]);
 }
 
@@ -248,12 +249,16 @@
  */
 function INST_phpOutOfDate()
 {
+    $minv = explode('.', SUPPORTED_PHP_VER);
+
     $phpv = php_v();
-    if (($phpv[0] < 4) || (($phpv[0] == 4) && ($phpv[1] < 1))) {
+    if (($phpv[0] <  $minv[0]) ||
+       (($phpv[0] == $minv[0]) && ($phpv[1] <  $minv[1])) ||
+       (($phpv[0] == $minv[0]) && ($phpv[1] == $minv[1]) && ($phpv[2] < $minv[2]))) {
         return true;    
-    } else {
-        return false;
     }
+
+    return false;
 }
 
 /**
diff -r 6e9c261610c2 -r 93f182e7807e public_html/admin/user.php
--- a/public_html/admin/user.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/admin/user.php	Sat Feb 21 16:46:34 2009 +0100
@@ -488,7 +488,6 @@
         if (empty ($uid)) {
             if (empty ($passwd)) {
                 // no password? create one ...
-                srand ((double) microtime () * 1000000);
                 $passwd = rand ();
                 $passwd = md5 ($passwd);
                 $passwd = substr ($passwd, 1, 8);
diff -r 6e9c261610c2 -r 93f182e7807e public_html/docs/changes.html
--- a/public_html/docs/changes.html	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/docs/changes.html	Sat Feb 21 16:46:34 2009 +0100
@@ -15,6 +15,27 @@
 and / or obvious changes. For a detailed list of changes, please consult the
 <a href="history">ChangeLog</a>. The file <tt>docs/changed-files</tt> has a list
 of files that have been changed since the last release.</p>
+
+<h2><a name="changes160">Geeklog 1.6.0</a></h2>
+
+<h3>Results from the Summer of Code</h3>
+
+<p>This release incorporates the following projects implemented during the
+the 2008 Google Summer of Code:</p>
+
+<ul>
+<li>Site migration support and easier plugin installation, by Matt West</li>
+<li>Improved search, by Sami Barakat</li>
+<li>Comment moderation and editable comments, by Jared Wenerd</li>
+</ul>
+
+<h3>Other changes</h3>
+
+<ul>
+<li>The minimum PHP version required by Geeklog is now <strong>PHP 4.3.0</strong>. Given that the PHP team ended support for PHP in August 2008, you should be
+looking into upgrading to PHP 5 anyway.</li>
+</ul>
+
 
 <h2><a name="changes152">Geeklog 1.5.2</a></h2>
 
diff -r 6e9c261610c2 -r 93f182e7807e public_html/docs/history
--- a/public_html/docs/history	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/docs/history	Sat Feb 21 16:46:34 2009 +0100
@@ -7,10 +7,12 @@
 the 2008 Google Summer of Code:
 
 + Site migration support and easier plugin installation, by Matt West
-+ (TBD) Improved search, by Sami Barakat
++ Improved search, by Sami Barakat
 + (TBD) Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
+- Raised minimum required PHP version to PHP 4.3.0 and removed all workarounds
+  that ensured compatibility with PHP 4.1.0 [Dirk]
 - Added a filename mask config option for the names of the database backups
   [Dirk]
 - Removed $_CONF['pagetitle'] hack. Use COM_siteHeader('menu', $pagetitle)
diff -r 6e9c261610c2 -r 93f182e7807e public_html/lib-common.php
--- a/public_html/lib-common.php	Sat Feb 21 15:07:45 2009 +0100
+++ b/public_html/lib-common.php	Sat Feb 21 16:46:34 2009 +0100
@@ -137,39 +137,18 @@
 * If needed, add our PEAR path to the list of include paths
 *
 */
-if( !$_CONF['have_pear'] )
-{
-    $curPHPIncludePath = ini_get( 'include_path' );
-    if( defined( 'PATH_SEPARATOR' ))
-    {
-        $separator = PATH_SEPARATOR;
-    }
-    else
-    {
-        // prior to PHP 4.3.0, we have to guess the correct separator ...
-        $separator = ';';
-        if( strpos( $curPHPIncludePath, $separator ) === false )
-        {
-            $separator = ':';
-        }
-    }
-    if( ini_set( 'include_path', $_CONF['path_pear'] . $separator
-                                 . $curPHPIncludePath ) === false )
-    {
-        COM_errorLog( 'ini_set failed - there may be problems using the PEAR classes.', 1);
-    }
-}
-
-
-/**



More information about the geeklog-cvs mailing list