diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-23 17:30:35 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-23 17:30:35 -0700 |
commit | 833098e3460e0a2c7fbffaa59163af815f419e68 (patch) | |
tree | b13bc70bf34288659be12c64ab7a5ed0ce131dd2 /mod | |
parent | ae6612025dcd31349056364d0c701bfda58470db (diff) | |
parent | 7975bc828fc9ae1cf9b92cc2147297a46524d59f (diff) | |
download | volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.tar.gz volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.tar.bz2 volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
include/items.php
mod/item.php
Diffstat (limited to 'mod')
-rw-r--r-- | mod/directory.php | 37 | ||||
-rw-r--r-- | mod/help.php | 1 | ||||
-rw-r--r-- | mod/item.php | 9 |
3 files changed, 29 insertions, 18 deletions
diff --git a/mod/directory.php b/mod/directory.php index 7c7f63037..67074d8cd 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -13,6 +13,7 @@ function directory_init(&$a) { intval(local_channel()), dbesc($_GET['ignore']) ); + goaway(z_root() . '/directory?suggest=1'); } $observer = get_observer_hash(); @@ -200,22 +201,24 @@ function directory_content(&$a) { if(in_array($rr['hash'],$contacts)) $connect_link = ''; - $details = ''; + $location = ''; if(strlen($rr['locale'])) - $details .= $rr['locale']; + $location .= $rr['locale']; if(strlen($rr['region'])) { if(strlen($rr['locale'])) - $details .= ', '; - $details .= $rr['region']; + $location .= ', '; + $location .= $rr['region']; } if(strlen($rr['country'])) { if(strlen($details)) - $details .= ', '; - $details .= $rr['country']; + $location .= ', '; + $location .= $rr['country']; } + + $age = ''; if(strlen($rr['birthday'])) { if(($years = age($rr['birthday'],'UTC','')) != 0) - $details .= '<br />' . t('Age: ') . $years ; + $age = $years; } $page_type = ''; @@ -231,7 +234,6 @@ function directory_content(&$a) { || (x($profile,'region') == 1) || (x($profile,'postcode') == 1) || (x($profile,'country') == 1)) - $location = t('Location:'); $gender = ((x($profile,'gender') == 1) ? t('Gender: ') . $profile['gender']: False); @@ -240,9 +242,9 @@ function directory_content(&$a) { $homepage = ((x($profile,'homepage') == 1) ? t('Homepage: ') : False); $homepageurl = ((x($profile,'homepage') == 1) ? $profile['homepage'] : ''); - $hometown = ((x($profile,'hometown') == 1) ? t('Hometown: ') . $profile['hometown'] : False); + $hometown = ((x($profile,'hometown') == 1) ? $profile['hometown'] : False); - $about = ((x($profile,'about') == 1) ? t('About: ') . bbcode(strip_bbimage($profile['about'])) : False); + $about = ((x($profile,'about') == 1) ? bbcode(strip_bbimage($profile['about'])) : False); $keywords = ((x($profile,'keywords')) ? $profile['keywords'] : ''); @@ -284,21 +286,27 @@ function directory_content(&$a) { 'hash' => $rr['hash'], 'alttext' => $rr['name'] . ((local_channel() || remote_channel()) ? ' ' . $rr['address'] : ''), 'name' => $rr['name'], - 'details' => $pdesc . $details, + 'details' => $details, + 'age' => $age, + 'age_label' => t('Age:'), 'profile' => $profile, 'address' => $rr['address'], 'nickname' => substr($rr['address'],0,strpos($rr['address'],'@')), 'location' => $location, + 'location_label' => t('Location:'), 'gender' => $gender, 'total_ratings' => $total_ratings, 'viewrate' => true, 'canrate' => ((local_channel()) ? true : false), 'pdesc' => $pdesc, + 'pdesc_label' => t('Description:'), 'marital' => $marital, 'homepage' => $homepage, 'homepageurl' => linkify($homepageurl), 'hometown' => $hometown, + 'hometown_label' => t('Hometown:'), 'about' => $about, + 'about_label' => t('About:'), 'conn_label' => t('Connect'), 'forum_label' => t('Public Forum:'), 'connect' => $connect_link, @@ -306,9 +314,10 @@ function directory_content(&$a) { 'kw' => (($out) ? t('Keywords: ') : ''), 'keywords' => $out, 'ignlink' => $suggest ? $a->get_baseurl() . '/directory?ignore=' . $rr['hash'] : '', - 'ignore_label' => "Don't suggest", + 'ignore_label' => t('Don\'t suggest'), 'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''), - 'common_txt' => sprintf( t('Common connections: %s'), intval($common[$rr['address']]) ), + 'common_label' => t('Common connections:'), + 'common_count' => intval($common[$rr['address']]), 'safe' => $safe_mode ); @@ -354,7 +363,7 @@ function directory_content(&$a) { killme(); } else { - $maxheight = 175; + $maxheight = 94; $o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; divmore_height = " . intval($maxheight) . "; </script>"; $o .= replace_macros($tpl, array( diff --git a/mod/help.php b/mod/help.php index 3d7c0a628..694b356aa 100644 --- a/mod/help.php +++ b/mod/help.php @@ -97,6 +97,7 @@ function help_content(&$a) { $content = preg_replace_callback("/#include (.*?)\;/ism", 'preg_callback_help_include', $content); return replace_macros(get_markup_template("help.tpl"), array( + '$title' => t('$Projectname Documentation'), '$content' => translate_projectname($content) )); diff --git a/mod/item.php b/mod/item.php index 659afef68..1c0c6c53b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -343,8 +343,9 @@ function item_post(&$a) { $coord = $orig_post['coord']; $verb = $orig_post['verb']; $app = $orig_post['app']; - $title = $_REQUEST['title']; - $body = $_REQUEST['body']; + $title = escape_tags(trim($_REQUEST['title'])); + $body = trim($_REQUEST['body']); + $item_flags = $orig_post['item_flags']; $item_origin = $orig_post['item_origin']; $item_unseen = $orig_post['item_unseen']; @@ -832,7 +833,7 @@ function item_post(&$a) { if(array_key_exists('item_private',$datarray) && $datarray['item_private']) { - $datarray['body'] = z_input_filter($datarray['uid'],$datarray['body'],$datarray['mimetype']); + $datarray['body'] = trim(z_input_filter($datarray['uid'],$datarray['body'],$datarray['mimetype'])); if($uid) { if($channel['channel_hash'] === $datarray['author_xchan']) { @@ -1137,7 +1138,7 @@ function fix_attached_file_permissions($channel,$observer_hash,$body, } function item_check_service_class($channel_id,$iswebpage) { - $ret = array('success' => false, $message => ''); + $ret = array('success' => false, 'message' => ''); if ($iswebpage) { $r = q("select count(i.id) as total from item i |