X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=bf4e59293d66ceb3c089d06d01621c84806d0ed1;hb=d908c9dd7196276e1364f77abb053aba3dce77af;hp=2e83d371f6dfd50ba25ec78097ae4a3dad4548ab;hpb=0165d5dd2c8b12a71395cc881910974ddcbaf3fa;p=friendica.git diff --git a/boot.php b/boot.php index 2e83d371f6..bf4e59293d 100644 --- a/boot.php +++ b/boot.php @@ -4,14 +4,15 @@ require_once('include/config.php'); require_once('include/network.php'); require_once('include/plugin.php'); require_once('include/text.php'); +require_once('include/datetime.php'); require_once('include/pgettext.php'); require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.0.1361' ); +define ( 'FRIENDICA_VERSION', '3.0.1373' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1145 ); +define ( 'DB_UPDATE_VERSION', 1149 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -28,6 +29,11 @@ define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); */ define ( 'JPEG_QUALITY', 100 ); +/** + * $a->config['system']['png_quality'] from 0 (uncompressed) to 9 + */ +define ( 'PNG_QUALITY', 8 ); + /** * Not yet used @@ -328,6 +334,12 @@ if(! class_exists('App')) { function __construct() { + global $default_timezone; + + $this->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC'); + + date_default_timezone_set($this->timezone); + $this->config = array(); $this->page = array(); $this->pager= array(); @@ -402,9 +414,6 @@ if(! class_exists('App')) { $this->argc = count($this->argv); if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) { $this->module = str_replace(".", "_", $this->argv[0]); - if(array_key_exists('2',$this->argv)) { - $this->category = $this->argv[2]; - } } else { $this->argc = 1; @@ -427,7 +436,7 @@ if(! class_exists('App')) { * pagination */ - $this->pager['page'] = ((x($_GET,'page')) ? $_GET['page'] : 1); + $this->pager['page'] = ((x($_GET,'page') && intval($_GET['page']) > 0) ? intval($_GET['page']) : 1); $this->pager['itemspage'] = 50; $this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage']; $this->pager['total'] = 0; @@ -494,7 +503,7 @@ if(! class_exists('App')) { } function set_pager_itemspage($n) { - $this->pager['itemspage'] = intval($n); + $this->pager['itemspage'] = ((intval($n) > 0) ? intval($n) : 0); $this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage']; }