X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=af5c2db0b429cea3f52fafb5a9aae29ba1cc5e60;hb=2825c4957315fab90445bfec5a47bdb64f712355;hp=86b219dc2b038c346384ae0b0bcf17ecbbde21c6;hpb=6eea312c213d34b21681b90a51bd83e6cfe936f4;p=friendica.git
diff --git a/boot.php b/boot.php
index 86b219dc2b..af5c2db0b4 100644
--- a/boot.php
+++ b/boot.php
@@ -6,11 +6,12 @@ require_once('include/plugin.php');
require_once('include/text.php');
require_once("include/pgettext.php");
require_once('include/nav.php');
+require_once('include/cache.php');
-define ( 'FRIENDIKA_PLATFORM', 'Free Friendika');
-define ( 'FRIENDIKA_VERSION', '2.3.1143' );
-define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1098 );
+define ( 'FRIENDIKA_PLATFORM', 'Friendica');
+define ( 'FRIENDIKA_VERSION', '2.3.1159' );
+define ( 'DFRN_PROTOCOL_VERSION', '2.22' );
+define ( 'DB_UPDATE_VERSION', 1103 );
define ( 'EOL', "
\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -93,7 +94,7 @@ define ( 'PAGE_FREELOVE', 3 );
*/
define ( 'NETWORK_ZOT', 'zot!'); // Zot!
-define ( 'NETWORK_DFRN', 'dfrn'); // Friendika, Mistpark, other DFRN implementations
+define ( 'NETWORK_DFRN', 'dfrn'); // Friendica, Mistpark, other DFRN implementations
define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
@@ -190,7 +191,7 @@ function startup() {
set_time_limit(0);
// This has to be quite large to deal with embedded private photos
- ini_set('pcre.backtrack_limit', 350000);
+ ini_set('pcre.backtrack_limit', 500000);
if (get_magic_quotes_gpc()) {
@@ -253,6 +254,8 @@ class App {
public $plugins;
public $apps = array();
public $identities;
+
+ public $nav_sel;
private $scheme;
private $hostname;
@@ -651,7 +654,7 @@ function get_guid($size=16) {
// returns the complete html for inserting into the page
if(! function_exists('login')) {
-function login($register = false) {
+function login($register = false, $hiddens=false) {
$o = "";
$reg = false;
if ($register) {
@@ -682,6 +685,7 @@ function login($register = false) {
'$openid' => !$noid,
'$lopenid' => array('openid_url', t('OpenID: '),'',''),
+ '$hiddens' => $hiddens,
'$register' => $reg,
@@ -822,6 +826,13 @@ function profile_load(&$a, $nickname, $profile = 0) {
if(! (x($a->page,'aside')))
$a->page['aside'] = '';
+ if(local_user() && local_user() == $a->profile['uid']) {
+ $a->page['aside'] .= replace_macros(get_markup_template('profile_edlink.tpl'),array(
+ '$editprofile' => t('Edit profile'),
+ '$profid' => $a->profile['id']
+ ));
+ }
+
$block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false);
$a->page['aside'] .= profile_sidebar($a->profile, $block);
@@ -988,7 +999,7 @@ function get_birthdays() {
$r = q("SELECT `event`.*, `event`.`id` AS `eid`, `contact`.* FROM `event`
LEFT JOIN `contact` ON `contact`.`id` = `event`.`cid`
WHERE `event`.`uid` = %d AND `type` = 'birthday' AND `start` < '%s' AND `finish` > '%s'
- ORDER BY `start` DESC ",
+ ORDER BY `start` ASC ",
intval(local_user()),
dbesc(datetime_convert('UTC','UTC','now + 6 days')),
dbesc(datetime_convert('UTC','UTC','now'))
@@ -996,20 +1007,23 @@ function get_birthdays() {
if($r && count($r)) {
$total = 0;
- foreach($r as $rr)
+ $now = strtotime('now');
+ $istoday = false;
+ foreach($r as $rr) {
if(strlen($rr['name']))
$total ++;
-
+ if((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now))
+ $istoday = true;
+ }
+ $classtoday = $istoday ? ' birthday-today ' : '';
if($total) {
- $o .= '