require_once("include/pgettext.php");
-define ( 'FRIENDIKA_VERSION', '2.2.1065' );
+define ( 'FRIENDIKA_VERSION', '2.3.1116' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
-define ( 'DB_UPDATE_VERSION', 1079 );
+define ( 'DB_UPDATE_VERSION', 1092 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
-define ( 'DOWN_ARROW', '⇩' );
+
/**
*
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' );
/**
* item weight for query ordering
function startup() {
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_time_limit(0);
- ini_set('pcre.backtrack_limit', 250000);
+
+ // This has to be quite large to deal with embedded private photos
+ ini_set('pcre.backtrack_limit', 350000);
if (get_magic_quotes_gpc()) {
'$lostlink' => $lostlink
));
+ call_hooks('login_hook',$o);
+
return $o;
}}
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;
}}
if(! function_exists('profile_sidebar')) {
-function profile_sidebar($profile) {
+function profile_sidebar($profile, $block = 0) {
$a = get_app();
$tabs = '';
- $photo = '<div id="profile-photo-wrapper"><img class="photo" src="' . $profile['photo'] . '" alt="' . $profile['name'] . '" /></div>';
+ $photo = '<div id="profile-photo-wrapper"><img class="photo" width="175" height="175" src="' . $profile['photo'] . '" alt="' . $profile['name'] . '" /></div>';
// don't show connect link to yourself
-
$connect = (($profile['uid'] != local_user()) ? '<li><a id="dfrn-request-link" href="dfrn_request/' . $profile['nickname'] . '">' . t('Connect') . '</a></li>' : '');
// don't show connect link to authenticated visitors either
}
+
$gender = ((x($profile,'gender') == 1) ? '<div class="mf"><span class="gender-label">' . t('Gender:') . '</span> <span class="x-gender">' . $profile['gender'] . '</span></div><div class="profile-clear"></div>' : '');
$pubkey = ((x($profile,'pubkey') == 1) ? '<div class="key" style="display:none;">' . $profile['pubkey'] . '</div>' : '');
$homepage = ((x($profile,'homepage') == 1) ? '<div class="homepage"><span class="homepage-label">' . t('Homepage:') . ' </span><span class="homepage-url">' . linkify($profile['homepage']) . '</span></div><div class="profile-clear"></div>' : '');
- 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';
<dl class='entity_nickname'>
<dt>Nickname</dt>
<dd>
-<a class="nickname url uid" href="$podloc" rel="me">$nickname</a>
+<a class="nickname url uid" href="$podloc/" rel="me">$nickname</a>
+</dd>
+</dl>
+<dl class='entity_fn'>
+<dt>Full name</dt>
+<dd>
+<span class='fn'>$fullname</span>
</dd>
</dl>
<dl class="entity_url">
<dt>URL</dt>
<dd>
-<a class="url" href="$podloc" id="pod_location" rel="me">$podloc</a>
+<a class="url" href="$podloc/" id="pod_location" rel="me">$podloc/</a>
</dd>
</dl>
<dl class="entity_photo">
<img class="photo avatar" height="50px" width="50px" src="$photo50">
</dd>
</dl>
-<dl class='entity_searchable'>
+<dl class="entity_searchable">
<dt>Searchable</dt>
<dd>
-<span class='searchable'>$searchable</span>
+<span class="searchable">$searchable</span>
</dd>
</dl>
</div>
$tpl = get_markup_template('profile_vcard.tpl');
$o .= replace_macros($tpl, array(
- '$fullname' => $fullname,
- '$pdesc' => $pdesc,
+ '$fullname' => template_escape($fullname),
+ '$pdesc' => template_escape($pdesc),
'$tabs' => $tabs,
'$photo' => $photo,
'$connect' => $connect,
- '$location' => $location,
+ '$location' => template_escape($location),
'$gender' => $gender,
'$pubkey' => $pubkey,
- '$marital' => $marital,
- '$homepage' => $homepage,
+ '$marital' => template_escape($marital),
+ '$homepage' => template_escape($homepage),
'$diaspora' => $diaspora_vcard
));
$now = strtotime('now');
$today = (((strtotime($rr['start'] . ' +00:00') < $now) && (strtotime($rr['finish'] . ' +00:00') > $now)) ? true : false);
- $o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="sparkle" href="'
+ $o .= '<div class="birthday-list" id="birthday-' . $rr['eid'] . '"><a class="sparkle" target="redir" href="'
. $a->get_baseurl() . '/redir/' . $rr['cid'] . '">' . $rr['name'] . '</a> '
. day_translate(datetime_convert('UTC', $a->timezone, $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '')
. '</div>' ;
$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);
}