diff --git a/include/class.i18n.php b/include/class.i18n.php index a06edbae1319a0e9b314b476111aa3e6afe466ea..884dc7cb9863f51e796e5fe812c03eeb67d697ab 100644 --- a/include/class.i18n.php +++ b/include/class.i18n.php @@ -306,7 +306,8 @@ class DataTemplate { $this->filepath = Misc::realpath("{$this->base}/$l/$path"); break; } - elseif (Phar::isValidPharFilename("{$this->base}/$l.phar") + elseif (class_exists('Phar') + && Phar::isValidPharFilename("{$this->base}/$l.phar") && file_exists("phar://{$this->base}/$l.phar/$path")) { $this->lang = $l; $this->filepath = "phar://{$this->base}/$l.phar/$path"; diff --git a/include/class.plugin.php b/include/class.plugin.php index 7e1a2b228bdcc9f7e4379c15ec4e8190d66859cf..ffa86b614161cb15b9ea9b418155b1d7f2c0e208 100644 --- a/include/class.plugin.php +++ b/include/class.plugin.php @@ -192,6 +192,7 @@ class PluginManager { GLOB_NOSORT|GLOB_BRACE) as $p) { $is_phar = false; if (substr($p, strlen($p) - 5) == '.phar' + && class_exists('Phar') && Phar::isValidPharFilename($p)) { try { // When public key is invalid, openssl throws a diff --git a/include/staff/system.inc.php b/include/staff/system.inc.php index f1fb08204dfe49f61f4bfb5a8a1f7357be47fa11..6532762fc8f77faf737f696094871f91fd04b5ea 100644 --- a/include/staff/system.inc.php +++ b/include/staff/system.inc.php @@ -51,6 +51,21 @@ $commit = GIT_VERSION != '$git' ? GIT_VERSION : ( echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i></td> <td>mbstring</td> <td>Highly recommended for non western european language content</td></tr> + <tr><td><i class="icon icon-<?php + echo extension_loaded('phar')?'check':'warning-sign'; ?>"></i></td> + <td>phar</td> + <td>Highly recommended for plugins and language packs</td></tr> + </tbody></table></td></tr> + <tr><td>PHP Settings</td> + <td><table><tbody> + <tr><td><i class="icon icon-<?php + echo extension_loaded('mbstring')?'check':'warning-sign'; ?>"></i> + </td><td> + <code>cgi.fix_pathinfo</code> = + <?php echo ini_get('cgi.fix_pathinfo'); ?> + </td><td> + <span class="faded">"1" is recommended if AJAX is not working</span> + </td></tr> </tbody></table></td></tr> </tbody> <thead> diff --git a/setup/inc/install-prereq.inc.php b/setup/inc/install-prereq.inc.php index f004ba6883fbd858e51f09fc2db92edadddc6cc0..fa86058ba3744075b8d933d0317d3f5d90aaee2b 100644 --- a/setup/inc/install-prereq.inc.php +++ b/setup/inc/install-prereq.inc.php @@ -29,6 +29,7 @@ if(!defined('SETUPINC')) die('Kwaheri!'); <li class="<?php echo extension_loaded('json')?'yes':'no'; ?>">PHP JSON extension (faster performance)</li> <li class="<?php echo extension_loaded('gettext')?'yes':'no'; ?>">Gettext is used for translations (faster performance)</li> <li class="<?php echo extension_loaded('mbstring')?'yes':'no'; ?>">Mbstring is <b>strongly</b> recommended for all installations</li> + <li class="<?php echo extension_loaded('phar')?'yes':'no'; ?>">Phar is <b>strongly</b> recommended for plugins and language packs</li> </ul> <div id="bar"> <form method="post" action="install.php"> diff --git a/setup/test/tests/stubs.php b/setup/test/tests/stubs.php index e41ac16d32d35c48b21b11b77ac0ac2fc4af6ff3..9479e274486467ffd000bbe7be06690911faa39e 100644 --- a/setup/test/tests/stubs.php +++ b/setup/test/tests/stubs.php @@ -96,9 +96,9 @@ class Phar { class ZipArchive { function statIndex() {} + function addFromString() {} function getFromIndex() {} function setCommentName() {} - function addFromString() {} } class finfo {