X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=139564ec551b81f3df4279379c1657a30344777e;hb=b1338548b05243c8c73902999d135b8ba980d4ce;hp=a4e2cfe4e5cf2f8f71643eb258049d06b438efe8;hpb=d6f3de09e8f6e4858239fc6d23c6fb75bc4cd5b1;p=friendica.git diff --git a/boot.php b/boot.php index a4e2cfe4e5..139564ec55 100644 --- a/boot.php +++ b/boot.php @@ -12,9 +12,9 @@ require_once('library/Mobile_Detect/Mobile_Detect.php'); require_once('include/features.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '3.2.1744' ); +define ( 'FRIENDICA_VERSION', '3.2.1748' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1163 ); +define ( 'DB_UPDATE_VERSION', 1170 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -141,6 +141,8 @@ define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace define ( 'NETWORK_GPLUS', 'goog'); // Google+ define ( 'NETWORK_PUMPIO', 'pump'); // pump.io define ( 'NETWORK_TWITTER', 'twit'); // Twitter +define ( 'NETWORK_DIASPORA2', 'dspc'); // Diaspora connector +define ( 'NETWORK_STATUSNET', 'stac'); // Statusnet connector define ( 'NETWORK_PHANTOM', 'unkn'); // Place holder @@ -165,6 +167,8 @@ $netgroup_ids = array( NETWORK_GPLUS => (-12), NETWORK_PUMPIO => (-13), NETWORK_TWITTER => (-14), + NETWORK_DIASPORA2 => (-15), + NETWORK_STATUSNET => (-16), NETWORK_PHANTOM => (-127), ); @@ -197,6 +201,7 @@ define ( 'NOTIFY_PROFILE', 0x0040 ); define ( 'NOTIFY_TAGSELF', 0x0080 ); define ( 'NOTIFY_TAGSHARE', 0x0100 ); define ( 'NOTIFY_POKE', 0x0200 ); +define ( 'NOTIFY_SHARE', 0x0400 ); define ( 'NOTIFY_SYSTEM', 0x8000 ); @@ -395,6 +400,9 @@ if(! class_exists('App')) { // array of instanced template engines ('name'=>'instance') public $template_engine_instance = array(); + // Used for reducing load to the ostatus completion + public $last_ostatus_conversation_url; + private $ldelim = array( 'internal' => '', 'smarty3' => '{{' @@ -733,7 +741,7 @@ if(! class_exists('App')) { if($this->cached_profile_picdate[$common_filename]){ $this->cached_profile_image[$avatar_image] = $avatar_image . $this->cached_profile_picdate[$common_filename]; } else { - $r = q("SELECT `contact`.`avatar-date` AS picdate FROM `contact` WHERE `contact`.`thumb` like \"%%/%s\"", + $r = q("SELECT `contact`.`avatar-date` AS picdate FROM `contact` WHERE `contact`.`thumb` like '%%/%s'", $common_filename); if(! count($r)){ $this->cached_profile_image[$avatar_image] = $avatar_image; @@ -1322,7 +1330,7 @@ if(! function_exists('profile_load')) { if($profile) { $profile_int = intval($profile); $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` - left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` + INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`nickname` = '%s' AND `profile`.`id` = %d and `contact`.`self` = 1 LIMIT 1", dbesc($nickname), intval($profile_int) @@ -1330,7 +1338,7 @@ if(! function_exists('profile_load')) { } if((! $r) && (! count($r))) { $r = q("SELECT `profile`.`uid` AS `profile_uid`, `profile`.* , `contact`.`avatar-date` AS picdate, `user`.* FROM `profile` - left join `contact` on `contact`.`uid` = `profile`.`uid` LEFT JOIN `user` ON `profile`.`uid` = `user`.`uid` + INNER JOIN `contact` on `contact`.`uid` = `profile`.`uid` INNER JOIN `user` ON `profile`.`uid` = `user`.`uid` WHERE `user`.`nickname` = '%s' AND `profile`.`is-default` = 1 and `contact`.`self` = 1 LIMIT 1", dbesc($nickname) ); @@ -1585,7 +1593,7 @@ if(! function_exists('get_birthdays')) { $bd_short = t('F d'); $r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event` - LEFT JOIN `contact` ON `contact`.`id` = `event`.`cid` + INNER JOIN `contact` ON `contact`.`id` = `event`.`cid` WHERE `event`.`uid` = %d AND `type` = 'birthday' AND `start` < '%s' AND `finish` > '%s' ORDER BY `start` ASC ", intval(local_user()), @@ -1624,7 +1632,7 @@ if(! function_exists('get_birthdays')) { $sparkle = " sparkle"; $url = $a->get_baseurl() . '/redir/' . $rr['cid']; } - + $rr['link'] = $url; $rr['title'] = $rr['name']; $rr['date'] = day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $rr['adjust'] ? $bd_format : $bd_short)) . (($today) ? ' ' . t('[today]') : ''); @@ -1906,7 +1914,11 @@ if(! function_exists('feed_birthday')) { if(! function_exists('is_site_admin')) { function is_site_admin() { $a = get_app(); - if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email'])) + + $adminlist = explode(",", str_replace(" ", "", $a->config['admin_email'])); + + //if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && ($a->user['email'] === $a->config['admin_email'])) + if(local_user() && x($a->user,'email') && x($a->config,'admin_email') && in_array($a->user['email'], $adminlist)) return true; return false; } @@ -2156,6 +2168,7 @@ function clear_cache($basepath = "", $path = "") { if ($cachetime == 0) $cachetime = 86400; + if (is_writable($path)){ if ($dh = opendir($path)) { while (($file = readdir($dh)) !== false) { $fullpath = $path."/".$file; @@ -2166,6 +2179,7 @@ function clear_cache($basepath = "", $path = "") { } closedir($dh); } + } } function set_template_engine(&$a, $engine = 'internal') { @@ -2176,26 +2190,8 @@ function set_template_engine(&$a, $engine = 'internal') { } if(!function_exists('exif_imagetype')) { - function exif_imagetype($file) { - $size = getimagesize($file); - - switch ($size["mime"]) { - case "image/jpeg": - $imagetype = IMAGETYPE_JPEG; - break; - case "image/gif": - $imagetype = IMAGETYPE_GIF; - break; - case "image/png": - $imagetype = IMAGETYPE_PNG; - break; - case "": - $imagetype = ""; - break; - default: - $imagetype = 99; - } - - return($imagetype); - } + function exif_imagetype($file) { + $size = getimagesize($file); + return($size[2]); + } }