X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=8b25dff4624b48e63128b9d895441b201fb15d40;hb=37bc00094ec4ebbf771e0041cf285c066fad7bfe;hp=abc7494931bda27e9fecf4bff6fbed8c5e33f499;hpb=35b978bb1e5a935d99015098029f2ed29ff07498;p=friendica.git diff --git a/boot.php b/boot.php index abc7494931..8b25dff462 100644 --- a/boot.php +++ b/boot.php @@ -9,9 +9,9 @@ require_once('include/nav.php'); require_once('include/cache.php'); define ( 'FRIENDICA_PLATFORM', 'Friendica'); -define ( 'FRIENDICA_VERSION', '2.3.1308' ); +define ( 'FRIENDICA_VERSION', '2.3.1322' ); define ( 'DFRN_PROTOCOL_VERSION', '2.23' ); -define ( 'DB_UPDATE_VERSION', 1137 ); +define ( 'DB_UPDATE_VERSION', 1138 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); @@ -206,6 +206,7 @@ define ( 'ACTIVITY_OBJ_P_PHOTO', NAMESPACE_ACTIVITY_SCHEMA . 'profile-photo' ); define ( 'ACTIVITY_OBJ_ALBUM', NAMESPACE_ACTIVITY_SCHEMA . 'photo-album' ); define ( 'ACTIVITY_OBJ_EVENT', NAMESPACE_ACTIVITY_SCHEMA . 'event' ); define ( 'ACTIVITY_OBJ_TAGTERM', NAMESPACE_DFRN . '/tagterm' ); +define ( 'ACTIVITY_OBJ_PROFILE', NAMESPACE_DFRN . '/profile' ); /** * item weight for query ordering @@ -657,32 +658,32 @@ if(! function_exists('check_config')) { // call the specific update - global $db; - $db->excep(TRUE); - try { - $db->beginTransaction(); +// global $db; +// $db->excep(TRUE); +// try { +// $db->beginTransaction(); $func = 'update_' . $x; $func($a); - $db->commit(); - } catch(Exception $ex) { - $db->rollback(); - //send the administrator an e-mail - $email_tpl = get_intltext_template("update_fail_eml.tpl"); - $email_tpl = replace_macros($email_tpl, array( - '$sitename' => $a->config['sitename'], - '$siteurl' => $a->get_baseurl(), - '$update' => $x, - '$error' => $ex->getMessage())); - $subject=sprintf(t('Update Error at %s'), $a->get_baseurl()); +// $db->commit(); +// } catch(Exception $ex) { +// $db->rollback(); +// //send the administrator an e-mail +// $email_tpl = get_intltext_template("update_fail_eml.tpl"); +// $email_tpl = replace_macros($email_tpl, array( +// '$sitename' => $a->config['sitename'], +// '$siteurl' => $a->get_baseurl(), +// '$update' => $x, +// '$error' => $ex->getMessage())); +// $subject=sprintf(t('Update Error at %s'), $a->get_baseurl()); - mail($a->config['admin_email'], $subject, $text, - 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" - . 'Content-type: text/plain; charset=UTF-8' . "\n" - . 'Content-transfer-encoding: 8bit' ); - //try the logger - logger('update failed: '.$ex->getMessage().EOL); - } - $db->excep(FALSE); +// mail($a->config['admin_email'], $subject, $text, +// 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" +// . 'Content-type: text/plain; charset=UTF-8' . "\n" +// . 'Content-transfer-encoding: 8bit' ); +// //try the logger +// logger('update failed: '.$ex->getMessage().EOL); +// } +// $db->excep(FALSE); } } set_config('system','build', DB_UPDATE_VERSION); @@ -935,6 +936,7 @@ if(! function_exists('profile_load')) { } if(($r === false) || (! count($r))) { + logger('profile error: ' . $a->query_string, LOGGER_DEBUG); notice( t('Requested profile is not available.') . EOL ); $a->error = 404; return; @@ -1172,11 +1174,7 @@ if(! function_exists('get_birthdays')) { } $classtoday = $istoday ? ' birthday-today ' : ''; if($total) { - $o .= '
' . t('Birthday Reminders') . ' ' . '(' . $total . ')' . '
'; - $o .= ''; } } - return $o; + $tpl = get_markup_template("birthdays_reminder.tpl"); + return replace_macros($tpl, array( + '$baseurl' => $a->get_baseurl(), + '$classtoday' => $classtoday, + '$count' => $total, + '$event_reminders' => t('Birthday Reminders'), + '$event_title' => t('Birthdays this week:'), + '$events' => $r, + )); } } @@ -1213,7 +1220,6 @@ if(! function_exists('get_events')) { require_once('include/bbcode.php'); $a = get_app(); - $o = ''; if(! local_user()) return $o; @@ -1240,18 +1246,15 @@ if(! function_exists('get_events')) { if($strt === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) $istoday = true; } - $classtoday = (($istoday) ? ' event-today ' : ''); + $classtoday = (($istoday) ? 'event-today' : ''); - $o .= '
' . t('Event Reminders') . ' ' . '(' . count($r) . ')' . '
'; - $o .= ''; } - return $o; + $tpl = get_markup_template("events_reminder.tpl"); + return replace_macros($tpl, array( + '$baseurl' => $a->get_baseurl(), + '$classtoday' => $classtoday, + '$count' => count($r), + '$event_reminders' => t('Event Reminders'), + '$event_title' => t('Events this week:'), + '$events' => $r, + )); } } @@ -1493,11 +1505,13 @@ function get_my_url() { return false; } -function zrl($s) { +function zrl($s,$force = false) { if(! strlen($s)) return $s; - if(! strpos($s,'/profile/')) + if((! strpos($s,'/profile/')) && (! $force)) return $s; + if($force && substr($s,-1,1) !== '/') + $s = $s . '/'; $achar = strpos($s,'?') ? '&' : '?'; $mine = get_my_url(); if($mine and ! link_compare($mine,$s))