diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/admin.php | 8 | ||||
-rw-r--r-- | mod/follow.php | 18 | ||||
-rw-r--r-- | mod/home.php | 3 | ||||
-rw-r--r-- | mod/item.php | 10 | ||||
-rw-r--r-- | mod/match.php | 8 | ||||
-rw-r--r-- | mod/newmember.php | 6 | ||||
-rw-r--r-- | mod/poco.php | 5 | ||||
-rw-r--r-- | mod/suggest.php | 10 |
8 files changed, 51 insertions, 17 deletions
diff --git a/mod/admin.php b/mod/admin.php index 8ca89900c..e44404097 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -1,7 +1,7 @@ <?php /** - * Friendika admin + * Friendica admin */ require_once("include/remoteupdate.php"); @@ -277,7 +277,7 @@ function admin_page_site(&$a) { /* Banner */ $banner = get_config('system','banner'); if($banner == false) - $banner = '<a href="http://project.friendika.com"><img id="logo-img" src="images/friendika-32.png" alt="logo" /></a><span id="logo-text"><a href="http://project.friendika.com">Friendika</a></span>'; + $banner = '<a href="http://friendica.com"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="http://friendica.com">Friendica</a></span>'; $banner = htmlspecialchars($banner); //echo "<pre>"; var_dump($lang_choices); die("</pre>"); @@ -325,7 +325,7 @@ function admin_page_site(&$a) { '$no_community_page' => array('no_community_page', t("Show Community Page"), !get_config('system','no_community_page'), "Display a Community page showing all recent public postings on this site."), '$ostatus_disabled' => array('ostatus_disabled', t("Enable OStatus support"), !get_config('system','ostatus_disable'), "Provide built-in OStatus \x28identi.ca, status.net, etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed."), '$diaspora_enabled' => array('diaspora_enabled', t("Enable Diaspora support"), get_config('system','diaspora_enabled'), "Provide built-in Diaspora network compatibility."), - '$dfrn_only' => array('dfrn_only', t('Only allow Friendika contacts'), get_config('system','dfrn_only'), "All contacts must use Friendika protocols. All other built-in communication protocols disabled."), + '$dfrn_only' => array('dfrn_only', t('Only allow Friendica contacts'), get_config('system','dfrn_only'), "All contacts must use Friendica protocols. All other built-in communication protocols disabled."), '$verifyssl' => array('verifyssl', t("Verify SSL"), get_config('system','verifyssl'), "If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites."), '$proxyuser' => array('proxyuser', t("Proxy user"), get_config('system','proxyuser'), ""), '$proxy' => array('proxy', t("Proxy URL"), get_config('system','proxy'), ""), @@ -657,7 +657,7 @@ function admin_page_logs(&$a){ // name, label, value, help string, extra data... '$debugging' => array('debugging', t("Debugging"),get_config('system','debugging'), ""), - '$logfile' => array('logfile', t("Log file"), get_config('system','logfile'), t("Must be writable by web server. Relative to your Friendika index.php.")), + '$logfile' => array('logfile', t("Log file"), get_config('system','logfile'), t("Must be writable by web server. Relative to your Friendica top-level directory.")), '$loglevel' => array('loglevel', t("Log level"), get_config('system','loglevel'), "", $log_choices), )); } diff --git a/mod/follow.php b/mod/follow.php index 2d643400a..f8964885e 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -2,7 +2,7 @@ require_once('Scrape.php'); -function follow_post(&$a) { +function follow_init(&$a) { if(! local_user()) { notice( t('Permission denied.') . EOL); @@ -10,7 +10,7 @@ function follow_post(&$a) { // NOTREACHED } - $url = $orig_url = notags(trim($_POST['url'])); + $url = $orig_url = notags(trim($_REQUEST['url'])); // remove ajax junk, e.g. Twitter @@ -22,6 +22,14 @@ function follow_post(&$a) { // NOTREACHED } + + if(! $url) { + notice( t('Connect URL missing.') . EOL); + goaway($_SESSION['return_url']); + // NOTREACHED + } + + $ret = probe_url($url); if($ret['network'] === NETWORK_DFRN) { @@ -202,7 +210,9 @@ function follow_post(&$a) { } } - goaway($a->get_baseurl() . '/contacts/' . $contact_id); -// goaway($_SESSION['return_url']); + if(strstr($_SESSION['return_url'],'contacts')) + goaway($a->get_baseurl() . '/contacts/' . $contact_id); + + goaway($_SESSION['return_url']); // NOTREACHED } diff --git a/mod/home.php b/mod/home.php index 225bd294d..0320c1b39 100644 --- a/mod/home.php +++ b/mod/home.php @@ -3,6 +3,9 @@ if(! function_exists('home_init')) { function home_init(&$a) { + $ret = array(); + call_hooks('home_init',$ret); + if(local_user() && ($a->user['nickname'])) goaway( $a->get_baseurl() . "/profile/" . $a->user['nickname'] ); diff --git a/mod/item.php b/mod/item.php index 95a27eb8e..f72b17fc1 100644 --- a/mod/item.php +++ b/mod/item.php @@ -398,9 +398,13 @@ function item_post(&$a) { continue; $basetag = str_replace('_',' ',substr($tag,1)); $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]',$body); - if(strlen($str_tags)) - $str_tags .= ','; - $str_tags .= '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; + + $newtag = '#[url=' . $a->get_baseurl() . '/search?search=' . rawurlencode($basetag) . ']' . $basetag . '[/url]'; + if(! stristr($str_tags,$newtag)) { + if(strlen($str_tags)) + $str_tags .= ','; + $str_tags .= $newtag; + } continue; } if(strpos($tag,'@') === 0) { diff --git a/mod/match.php b/mod/match.php index c33bbd5c2..3645a419d 100644 --- a/mod/match.php +++ b/mod/match.php @@ -7,6 +7,8 @@ function match_content(&$a) { if(! local_user()) return; + $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; + $o .= '<h2>' . t('Profile Match') . '</h2>'; $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1", @@ -41,14 +43,20 @@ function match_content(&$a) { } if(count($j->results)) { + + $tpl = get_markup_template('match.tpl'); foreach($j->results as $jj) { + $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url; $o .= replace_macros($tpl,array( '$url' => $jj->url, '$name' => $jj->name, '$photo' => $jj->photo, + '$inttxt' => ' ' . t('is interested in:'), + '$conntxt' => t('Connect'), + '$connlnk' => $connlnk, '$tags' => $jj->tags )); } diff --git a/mod/newmember.php b/mod/newmember.php index fc53e7112..60ca49757 100644 --- a/mod/newmember.php +++ b/mod/newmember.php @@ -3,7 +3,7 @@ function newmember_content(&$a) { - $o = '<h3>' . t('Welcome to Friendika') . '</h3>'; + $o = '<h3>' . t('Welcome to Friendica') . '</h3>'; $o .= '<h3>' . t('New Member Checklist') . '</h3>'; @@ -25,13 +25,13 @@ function newmember_content(&$a) { $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); if(! $mail_disabled) - $o .= '<li>' . '<a href="settings">' . t('Enter your email access information on your Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '</a></li>' . EOL; + $o .= '<li>' . '<a href="settings/connectors">' . t('Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX') . '</a></li>' . EOL; $o .= '<li>' . '<a href="profiles">' . t('Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors.') . '</a></li>' . EOL; $o .= '<li>' . '<a href="profiles">' . t('Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships.') . '</a></li>' . EOL; - $o .= '<li>' . '<a href="contacts">' . t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Connect</em> dialog.') . '</a></li>' . EOL; + $o .= '<li>' . '<a href="contacts">' . t('Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog.') . '</a></li>' . EOL; $o .= '<li>' . '<a href="directory">' . t('The Directory page lets you find other people in this network or other federated sites. Look for a <em>Connect</em> or <em>Follow</em> link on their profile page. Provide your own Identity Address if requested.') . '</a></li>' . EOL; diff --git a/mod/poco.php b/mod/poco.php index dd8df6008..79cf820bc 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -125,8 +125,11 @@ function poco_init(&$a) { $entry['id'] = $rr['id']; if($fields_ret['displayName']) $entry['displayName'] = $rr['name']; - if($fields_ret['urls']) + if($fields_ret['urls']) { $entry['urls'] = array(array('value' => $rr['url'], 'type' => 'profile')); + if($rr['addr'] && ($rr['network'] !== NETWORK_MAIL)) + $entry['urls'][] = array('value' => 'acct:' . $rr['addr'], 'type' => 'webfinger'); + } if($fields_ret['preferredUsername']) $entry['preferredUsername'] = $rr['nick']; if($fields_ret['photos']) diff --git a/mod/suggest.php b/mod/suggest.php index aedf3fd46..b8ca423c5 100644 --- a/mod/suggest.php +++ b/mod/suggest.php @@ -29,6 +29,8 @@ function suggest_content(&$a) { return; } + $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd; + $a->page['aside'] .= follow_widget(); $a->page['aside'] .= findpeople_widget(); @@ -39,19 +41,23 @@ function suggest_content(&$a) { $r = suggestion_query(local_user()); if(! count($r)) { - $o .= t('No suggestions. This works best when you have more than one contact/friend.'); + $o .= t('No suggestions available. If this is a new site, please try again in 24 hours.'); return $o; } $tpl = get_markup_template('suggest_friends.tpl'); foreach($r as $rr) { - + + $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']); + $o .= replace_macros($tpl,array( '$url' => $rr['url'], '$name' => $rr['name'], '$photo' => $rr['photo'], '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'], + '$conntxt' => t('Connect'), + '$connlnk' => $connlnk, '$ignore' => t('Ignore/Hide') )); } |