bug #127, add Diaspora notes to Connect (dfrn_request) page, get rid of security warnings
This commit is contained in:
parent
7e8100d2cd
commit
e921b97a7f
2
boot.php
2
boot.php
|
@ -7,7 +7,7 @@ require_once('include/text.php');
|
||||||
require_once("include/pgettext.php");
|
require_once("include/pgettext.php");
|
||||||
|
|
||||||
|
|
||||||
define ( 'FRIENDIKA_VERSION', '2.2.1093' );
|
define ( 'FRIENDIKA_VERSION', '2.2.1094' );
|
||||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||||
define ( 'DB_UPDATE_VERSION', 1087 );
|
define ( 'DB_UPDATE_VERSION', 1087 );
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@ require_once('include/event.php');
|
||||||
|
|
||||||
function diaspora2bb($s) {
|
function diaspora2bb($s) {
|
||||||
|
|
||||||
|
// bug #127
|
||||||
|
$s = preg_replace('/\[(.+?)\]\((.+?)[^\\\]_(.+?)\)/','[$1]($2\\_$3)',$s);
|
||||||
|
|
||||||
|
|
||||||
$s = str_replace(array('\\**','\\__','\\*','\\_'), array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'),$s);
|
$s = str_replace(array('\\**','\\__','\\*','\\_'), array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'),$s);
|
||||||
$s = preg_replace("/\*\*\*(.+?)\*\*\*/", '[b][i]$1[/i][/b]', $s);
|
$s = preg_replace("/\*\*\*(.+?)\*\*\*/", '[b][i]$1[/i][/b]', $s);
|
||||||
$s = preg_replace("/\_\_\_(.+?)\_\_\_/", '[b][i]$1[/i][/b]', $s);
|
$s = preg_replace("/\_\_\_(.+?)\_\_\_/", '[b][i]$1[/i][/b]', $s);
|
||||||
|
@ -15,6 +19,7 @@ function diaspora2bb($s) {
|
||||||
$s = preg_replace("/\_\_(.+?)\_\_/", '[b]$1[/b]', $s);
|
$s = preg_replace("/\_\_(.+?)\_\_/", '[b]$1[/b]', $s);
|
||||||
$s = preg_replace("/\*(.+?)\*/", '[i]$1[/i]', $s);
|
$s = preg_replace("/\*(.+?)\*/", '[i]$1[/i]', $s);
|
||||||
$s = preg_replace("/\_(.+?)\_/", '[i]$1[/i]', $s);
|
$s = preg_replace("/\_(.+?)\_/", '[i]$1[/i]', $s);
|
||||||
|
|
||||||
$s = str_replace(array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'), array('**','__','*','_'), $s);
|
$s = str_replace(array('-^doublestar^-','-^doublescore-^','-^star^-','-^score^-'), array('**','__','*','_'), $s);
|
||||||
$s = preg_replace('/\!\[(.+?)\]\((.+?)\)/','[img]$2[/img]',$s);
|
$s = preg_replace('/\!\[(.+?)\]\((.+?)\)/','[img]$2[/img]',$s);
|
||||||
$s = preg_replace('/\[(.+?)\]\((.+?)\)/','[url=$2]$1[/url]',$s);
|
$s = preg_replace('/\[(.+?)\]\((.+?)\)/','[url=$2]$1[/url]',$s);
|
||||||
|
|
|
@ -611,6 +611,9 @@ function dfrn_request_content(&$a) {
|
||||||
$myaddr = ((x($_GET,'address')) ? $_GET['address'] : '');
|
$myaddr = ((x($_GET,'address')) ? $_GET['address'] : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$target_addr = $a->profile['nickname'] . '@' . substr(z_root(), strpos(z_root(),'://') + 3 );
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* The auto_request form only has the profile address
|
* The auto_request form only has the profile address
|
||||||
|
@ -624,6 +627,11 @@ function dfrn_request_content(&$a) {
|
||||||
else
|
else
|
||||||
$tpl = get_markup_template('auto_request.tpl');
|
$tpl = get_markup_template('auto_request.tpl');
|
||||||
|
|
||||||
|
$page_desc = sprintf( t('Diaspora members: Please do not use this form. Instead, enter "%s" into your Diaspora search bar.'),
|
||||||
|
$target_addr) . EOL . EOL;
|
||||||
|
|
||||||
|
$page_desc .= t("Please enter your 'Identity Address' from one of the following supported social networks:");
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$o .= replace_macros($tpl,array(
|
||||||
'$header' => t('Friend/Connection Request'),
|
'$header' => t('Friend/Connection Request'),
|
||||||
'$desc' => t('Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca'),
|
'$desc' => t('Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca'),
|
||||||
|
@ -632,11 +640,11 @@ function dfrn_request_content(&$a) {
|
||||||
'$yes' => t('Yes'),
|
'$yes' => t('Yes'),
|
||||||
'$no' => t('No'),
|
'$no' => t('No'),
|
||||||
'$add_note' => t('Add a personal note:'),
|
'$add_note' => t('Add a personal note:'),
|
||||||
'$page_desc' => t("Please enter your 'Identity Address' from one of the following supported social networks:"),
|
'$page_desc' => $page_desc,
|
||||||
'$friendika' => t('Friendika'),
|
'$friendika' => t('Friendika'),
|
||||||
'$statusnet' => t('StatusNet/Federated Social Web'),
|
'$statusnet' => t('StatusNet/Federated Social Web'),
|
||||||
'$private_net' => t("Private \x28secure\x29 network"),
|
'$diaspora' => t('Diaspora'),
|
||||||
'$public_net' => t("Public \x28insecure\x29 network"),
|
'$diasnote' => t('- please share from your own site as noted above'),
|
||||||
'$your_address' => t('Your Identity Address:'),
|
'$your_address' => t('Your Identity Address:'),
|
||||||
'$submit' => t('Submit Request'),
|
'$submit' => t('Submit Request'),
|
||||||
'$cancel' => t('Cancel'),
|
'$cancel' => t('Cancel'),
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
<p id="dfrn-request-intro">
|
<p id="dfrn-request-intro">
|
||||||
$page_desc<br />
|
$page_desc<br />
|
||||||
<ul id="dfrn-request-networks">
|
<ul id="dfrn-request-networks">
|
||||||
<li><a href="http://friendika.com" title="$private_net">$friendika</a> <img src="images/lock_icon.gif" alt="$private_net" title="$private_net" /></li>
|
<li><a href="http://friendika.com" title="$friendika">$friendika</a></li>
|
||||||
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a> <img src="images/unlock_icon.gif" alt="$public_net" title="$public_net"/></li>
|
<li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
|
||||||
|
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,9 @@
|
||||||
<p id="dfrn-request-intro">
|
<p id="dfrn-request-intro">
|
||||||
$page_desc<br />
|
$page_desc<br />
|
||||||
<ul id="dfrn-request-networks">
|
<ul id="dfrn-request-networks">
|
||||||
<li><a href="http://friendika.com" title="$private_net">$friendika</a> <img src="images/lock_icon.gif" alt="$private_net" title="$private_net" /></li>
|
<li><a href="http://friendika.com" title="$friendika">$friendika</a></li>
|
||||||
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a> <img src="images/unlock_icon.gif" alt="$public_net" title="$public_net"/></li>
|
<li><a href="http://joindiaspora.com" title="$diaspora">$diaspora</a> $diasnote</li>
|
||||||
|
<li><a href="http://ostatus.org" title="$public_net" >$statusnet</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
$desc
|
$desc
|
||||||
</p>
|
</p>
|
||||||
|
|
Loading…
Reference in a new issue