X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=boot.php;h=a9cfb7cac0dfbdf953ebab4818bee3a14ac7a477;hb=cdf2fe859f439a9d3689ea946e23d9aef1fb6cac;hp=0a8a2fd8422d9ea1e2848c6dda8b429e4f2e4250;hpb=cef64d4498c022d70e158320aff1d3c1a869eed0;p=friendica.git diff --git a/boot.php b/boot.php index 0a8a2fd842..a9cfb7cac0 100644 --- a/boot.php +++ b/boot.php @@ -7,13 +7,13 @@ require_once('include/text.php'); require_once("include/pgettext.php"); -define ( 'FRIENDIKA_VERSION', '2.2.1069' ); +define ( 'FRIENDIKA_VERSION', '2.2.1103' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); -define ( 'DB_UPDATE_VERSION', 1079 ); +define ( 'DB_UPDATE_VERSION', 1087 ); define ( 'EOL', "
\r\n" ); define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' ); -define ( 'DOWN_ARROW', '⇩' ); + /** * @@ -674,6 +674,8 @@ function login($register = false) { '$lostlink' => $lostlink )); + call_hooks('login_hook',$o); + return $o; }} @@ -803,8 +805,12 @@ function profile_load(&$a, $nickname, $profile = 0) { if(! (x($a->page,'aside'))) $a->page['aside'] = ''; - $a->page['aside'] .= profile_sidebar($a->profile); - $a->page['aside'] .= contact_block(); + $block = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); + + $a->page['aside'] .= profile_sidebar($a->profile, $block); + + if(! $block) + $a->page['aside'] .= contact_block(); return; }} @@ -827,7 +833,7 @@ function profile_load(&$a, $nickname, $profile = 0) { if(! function_exists('profile_sidebar')) { -function profile_sidebar($profile) { +function profile_sidebar($profile, $block = 0) { $a = get_app(); @@ -846,10 +852,9 @@ function profile_sidebar($profile) { $tabs = ''; - $photo = '
' . $profile['name'] . '
'; + $photo = '
' . $profile['name'] . '
'; // don't show connect link to yourself - $connect = (($profile['uid'] != local_user()) ? '
  • ' . t('Connect') . '
  • ' : ''); // don't show connect link to authenticated visitors either @@ -877,6 +882,7 @@ function profile_sidebar($profile) { } + $gender = ((x($profile,'gender') == 1) ? '
    ' . t('Gender:') . ' ' . $profile['gender'] . '
    ' : ''); $pubkey = ((x($profile,'pubkey') == 1) ? '' : ''); @@ -885,13 +891,13 @@ function profile_sidebar($profile) { $homepage = ((x($profile,'homepage') == 1) ? '
    ' . t('Homepage:') . ' ' . linkify($profile['homepage']) . '
    ' : ''); - if($profile['hidewall'] && (! local_user()) && (! remote_user())) { - $location = $gender = $marital = $homepage = ''; + if(($profile['hidewall'] || $block) && (! local_user()) && (! remote_user())) { + $location = $pdesc = $connect = $gender = $marital = $homepage = ''; } $podloc = $a->get_baseurl(); $searchable = (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ); - $nickname = $profile['nick']; + $nickname = $profile['nickname']; $photo300 = $a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg'; $photo100 = $a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg'; $photo50 = $a->get_baseurl() . '/photo/custom/50/' . $profile['uid'] . '.jpg'; @@ -902,13 +908,19 @@ function profile_sidebar($profile) {
    Nickname
    -$nickname +$nickname +
    +
    +
    +
    Full name
    +
    +$fullname
    URL
    -$podloc +$podloc/
    @@ -929,10 +941,10 @@ function profile_sidebar($profile) {
    -
    +
    Searchable
    -$searchable +$searchable
    @@ -1001,7 +1013,7 @@ function get_birthdays() { $now = strtotime('now'); $today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false); - $o .= '
    ' . $rr['name'] . ' ' . day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '') . '
    ' ; @@ -1033,11 +1045,14 @@ function proc_run($cmd){ $a = get_app(); $args = func_get_args(); - call_hooks("proc_run", $args); + $arr = array('args' => $args, 'run_cmd' => true); + + call_hooks("proc_run", $arr); + if(! $arr['run_cmd']) + return; if(count($args) && $args[0] === 'php') $args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - foreach ($args as $arg){ $arg = escapeshellarg($arg); }