Merge pull request #603 from jgen/develop
PHP Version check in the code should use a configurable value.
This commit is contained in:
commit
44bead8b92
@ -59,9 +59,19 @@ class Image {
|
|||||||
/** @var string[]|null */
|
/** @var string[]|null */
|
||||||
public $tag_array;
|
public $tag_array;
|
||||||
|
|
||||||
public $owner_id, $owner_ip;
|
/** @var int */
|
||||||
|
public $owner_id;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
public $owner_ip;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
public $posted;
|
public $posted;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
public $source;
|
public $source;
|
||||||
|
|
||||||
|
/** @var boolean */
|
||||||
public $locked;
|
public $locked;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ _d("TIMEZONE", null); // string timezone
|
|||||||
_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable
|
_d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable
|
||||||
_d("EXTRA_EXTS", ""); // string optional extra extensions
|
_d("EXTRA_EXTS", ""); // string optional extra extensions
|
||||||
_d("BASE_URL", null); // string force a specific base URL (default is auto-detect)
|
_d("BASE_URL", null); // string force a specific base URL (default is auto-detect)
|
||||||
|
_d("MIN_PHP_VERSION", '5.6');// string minium supported PHP version
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculated settings - you should never need to change these
|
* Calculated settings - you should never need to change these
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/** @private */
|
/**
|
||||||
|
* @private
|
||||||
|
* @param mixed $row
|
||||||
|
* @return User
|
||||||
|
*/
|
||||||
function _new_user($row) {
|
function _new_user($row) {
|
||||||
return new User($row);
|
return new User($row);
|
||||||
}
|
}
|
||||||
|
@ -1600,14 +1600,17 @@ function score_assert_handler($file, $line, $code, $desc = null) {
|
|||||||
/** @privatesection */
|
/** @privatesection */
|
||||||
|
|
||||||
function _version_check() {
|
function _version_check() {
|
||||||
$min_version = "5.4.8";
|
if(MIN_PHP_VERSION)
|
||||||
if(version_compare(PHP_VERSION, $min_version) == -1) {
|
{
|
||||||
print "
|
if(version_compare(phpversion(), MIN_PHP_VERSION, ">=") === FALSE) {
|
||||||
Currently SCore Engine doesn't support versions of PHP lower than $min_version --
|
print "
|
||||||
if your web host is running an older version, they are dangerously out of
|
Shimmie (SCore Engine) does not support versions of PHP lower than ".MIN_PHP_VERSION."
|
||||||
|
(PHP reports that it is version ".phpversion().")
|
||||||
|
If your web host is running an older version, they are dangerously out of
|
||||||
date and you should plan on moving elsewhere.
|
date and you should plan on moving elsewhere.
|
||||||
";
|
";
|
||||||
exit;
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@
|
|||||||
* extensions and read their documentation
|
* extensions and read their documentation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** @private */
|
/**
|
||||||
|
* @private
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
function __extman_extcmp(ExtensionInfo $a, ExtensionInfo $b) {
|
function __extman_extcmp(ExtensionInfo $a, ExtensionInfo $b) {
|
||||||
return strcmp($a->name, $b->name);
|
return strcmp($a->name, $b->name);
|
||||||
}
|
}
|
||||||
@ -189,6 +192,9 @@ class ExtManager extends Extension {
|
|||||||
$this->write_config($extras);
|
$this->write_config($extras);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string[] $extras
|
||||||
|
*/
|
||||||
private function write_config($extras) {
|
private function write_config($extras) {
|
||||||
file_put_contents(
|
file_put_contents(
|
||||||
"data/config/extensions.conf.php",
|
"data/config/extensions.conf.php",
|
||||||
|
@ -376,7 +376,7 @@ class ImageIO extends Extension {
|
|||||||
$image->tag_array = array();
|
$image->tag_array = array();
|
||||||
send_event(new TagSetEvent($image, $tags_to_set));
|
send_event(new TagSetEvent($image, $tags_to_set));
|
||||||
|
|
||||||
if($image->source) {
|
if($image->source !== null) {
|
||||||
log_info("core-image", "Source for Image #{$image->id} set to: {$image->source}");
|
log_info("core-image", "Source for Image #{$image->id} set to: {$image->source}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,7 @@ class PostListBuildingEvent extends Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class Index extends Extension {
|
class Index extends Extension {
|
||||||
|
/** @var int */
|
||||||
private $stpen = 0; // search term parse event number
|
private $stpen = 0; // search term parse event number
|
||||||
|
|
||||||
public function onInitExt(InitExtEvent $event) {
|
public function onInitExt(InitExtEvent $event) {
|
||||||
|
@ -129,6 +129,7 @@ class Upgrade extends Extension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @return int */
|
||||||
public function get_priority() {return 5;}
|
public function get_priority() {return 5;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ class WordFilter extends Extension {
|
|||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string[]
|
||||||
|
*/
|
||||||
private function get_map() {
|
private function get_map() {
|
||||||
global $config;
|
global $config;
|
||||||
$raw = $config->get_string("word_filter");
|
$raw = $config->get_string("word_filter");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user