Permalink
Browse files

Set pH7CMS for PHP 5.5+ only

And make code more exciting and better! Use the best of PHP right now ๐Ÿ˜ƒ
  • Loading branch information...
1 parent e7af655 commit 7b1d9d923271e65e7dbf38c3e3e9d5899b40b9db @pH-7 pH-7 committed Jan 14, 2016
View
@@ -106,7 +106,7 @@ Thank you so much in advance!
## Requirements
-**Application Server** PHP 5.4.0 or higher.
+**Application Server** PHP 5.5.0 or higher.
**Database** MySQL/MariaDB 5.0.15 or higher.
View
@@ -10,7 +10,7 @@ Except certain files and library (JavaScript, PHP, or other) whose license and/o
==============================================
pH7 Dating CMS is based on the pH7Core framework (written specifically for this project!).
-This software is only compatible with PHP versions 5.4 (PHP 5.5) and higher and the code is 100% object-oriented.
+This software is only compatible with PHP versions PHP 5.5 and higher and the code is 100% object-oriented.
We need help to continue this project, so we are waiting for you!
We want to train a large team to work on this dating software open source project.
Please contact us to work on this exciting project.
@@ -19,7 +19,7 @@
<h2>PHP:</h2>
<h3>Minimum:</h3>
<ul>
- <li>Version - 5.4.0.</li>
+ <li>Version - 5.5.0.</li>
<li>PDO extension.</li>
<li>exec() PHP (system program execution) must be allowed.</li>
<li>GD complied with your PHP Build.</li>
@@ -39,7 +39,7 @@
<h3>Recommended:</h3>
<ul>
- <li>PHP 5.4.15 or higher.</li>
+ <li>PHP 5.5.9 or higher.</li>
</ul>
<h3>Recommended Extensions:</h3>
@@ -26,8 +26,7 @@
//---------------------------- Constants --------------------------------//
//------------ Other ----------------//
-//define('PH7_REQUIRE_SERVER_VERSION', '5.5.0'); // For pH7CMS 2.0
-define('PH7_REQUIRE_SERVER_VERSION', '5.4.0');
+define('PH7_REQUIRE_SERVER_VERSION', '5.5.0');
define('PH7_REQUIRE_SQL_VERSION', '5.0');
define('PH7_ENCODING', 'utf-8');
define('PH7_DEFAULT_TIMEZONE', 'America/Chicago');
@@ -123,16 +123,9 @@
{
Except\PH7Exception::launch($oE);
}
-
-/* Soon in pH7CMS 2.0 version (when it will accept only PHP 5.5 or higher)
finally
{
if ('' !== session_id()) session_write_close();
ob_end_flush();
exit(0);
-}*/
-
-# Finally Block Emulator because PHP does not support finally block.
-if ('' !== session_id()) session_write_close();
-ob_end_flush();
-exit(0);
+}
@@ -15,9 +15,7 @@
<div class="splash_slideshow">
<div class="window">
<div class="img_reel">
- {* For PHP 5.5+, keep just only the following *} {* {for $i in [1,2,3,4,5]} *}
- {{ $num = [1,2,3,4,5] }}
- {for $i in $num}
+ {for $i in [1,2,3,4,5]}
<a href="{url_root}"><img src="{url_tpl_img}slideshow/{i}.jpg" alt="{lang 'Social Dating Web App'}" /></a>
{/for}
</div>
@@ -663,17 +663,14 @@ public function readFiles($sPath = './', &$mFiles)
public function readDirs($sPath = './')
{
if (!($rHandle = opendir($sPath))) return false;
- $aRet = array();//remove it for yield
while (false !== ($sFolder = readdir($rHandle)))
{
if ('.' == $sFolder || '..' == $sFolder || !is_dir($sPath . $sFolder))
continue;
- //yield $sFolder; // PHP 5.5
- $aRet[] = $sFolder;//remove it for yield
+ yield $sFolder; // PHP 5.5
}
closedir($rHandle);
- return $aRet;//remove it for yield
}
/**
@@ -49,22 +49,17 @@ public static function atUsernameToLink($sContents)
*/
protected static function getAtUsernames($sContents)
{
- $aUsername = array();//remove it for yield
-
if (preg_match_all('#' . static::AT . '('.PH7_USERNAME_PATTERN.'{'.DbConfig::getSetting('minUsernameLength').','.DbConfig::getSetting('maxUsernameLength').'})#u', $sContents, $aMatches, PREG_PATTERN_ORDER))
{
$aMatches[1] = array_unique($aMatches[1]); // Delete duplicate usernames.
foreach ($aMatches[1] as $sUsername)
{
if ((new \PH7\ExistsCoreModel)->username($sUsername))
{
- //yield $sUsername; // PHP 5.5
- $aUsername[] = $sUsername;//remove it for yield
+ yield $sUsername; // PHP 5.5
}
}
}
-
- return $aUsername;//remove it for yield
}
}
@@ -27,12 +27,7 @@
*/
public static function load()
{
- /**
- * PHP 5.5
- *
$sClass = static::class;
- */
- $sClass = get_called_class();//remove it for static::class
$aArgs = func_get_args();
if (class_exists($sClass))
@@ -15,9 +15,6 @@
use PH7\Framework\Util\Various;
-if (version_compare(PHP_VERSION, '5.5.0', '<'))
- require __DIR__ . PH7_DS . 'crypt.inc.php';
-
final class Security
{
const
View
@@ -17,8 +17,7 @@
define('PH7', 1);
-//define('PH7_REQUIRE_SERVER_VERSION', '5.5.0'); // For pH7CMS 2.0
-define('PH7_REQUIRE_SERVER_VERSION', '5.4.0');
+define('PH7_REQUIRE_SERVER_VERSION', '5.5.0');
define('PH7_REQUIRE_SQL_VERSION', '5.0');
if (version_compare(PHP_VERSION, PH7_REQUIRE_SERVER_VERSION, '<'))
View
@@ -17,8 +17,7 @@ namespace PH7;
define('PH7', 1);
-//define('PH7_REQUIRE_SERVER_VERSION', '5.5.0'); // For pH7CMS 2.0
-define('PH7_REQUIRE_SERVER_VERSION', '5.4.0');
+define('PH7_REQUIRE_SERVER_VERSION', '5.5.0');
define('PH7_REQUIRE_SQL_VERSION', '5.0');
if (version_compare(PHP_VERSION, PH7_REQUIRE_SERVER_VERSION, '<'))

0 comments on commit 7b1d9d9

Please sign in to comment.