aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php6
-rw-r--r--include/items.php10
-rwxr-xr-x[-rw-r--r--]include/security.php4
-rw-r--r--index.php8
-rw-r--r--mod/directory.php2
-rw-r--r--mod/randprof.php2
-rw-r--r--util/messages.po2
-rw-r--r--view/auto_request.tpl2
-rw-r--r--view/de/messages.po2
-rw-r--r--view/de/strings.php2
-rw-r--r--view/dfrn_request.tpl2
-rw-r--r--view/theme/dispy-dark/theme.php2
-rw-r--r--view/theme/dispy/theme.php2
13 files changed, 31 insertions, 15 deletions
diff --git a/boot.php b/boot.php
index 5ba3b1b4a..0bd201a25 100644
--- a/boot.php
+++ b/boot.php
@@ -1494,11 +1494,13 @@ function get_my_url() {
return false;
}
-function zrl($s) {
+function zrl($s,$force = false) {
if(! strlen($s))
return $s;
- if(! strpos($s,'/profile/'))
+ if((! strpos($s,'/profile/')) && (! $force))
return $s;
+ if($force && substr($s,-1,1) !== '/')
+ $s = $s . '/';
$achar = strpos($s,'?') ? '&' : '?';
$mine = get_my_url();
if($mine and ! link_compare($mine,$s))
diff --git a/include/items.php b/include/items.php
index 05c0d5016..85df340d3 100644
--- a/include/items.php
+++ b/include/items.php
@@ -19,9 +19,15 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
$converse = true;
if($a->argv[$x] == 'starred')
$starred = true;
+ if($a->argv[$x] === 'category' && $a->argc > ($x + 1) && strlen($a->argv[$x+1]))
+ $category = $a->argv[$x+1];
}
+
+
}
+
+
// default permissions - anonymous user
$sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' ";
@@ -101,6 +107,10 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0)
if(! strlen($last_update))
$last_update = 'now -30 days';
+ if(x($category)) {
+ $sql_extra .= file_tag_file_query('item',$category,'category');
+ }
+
if($public_feed) {
if(! $converse)
$sql_extra .= " AND `contact`.`self` = 1 ";
diff --git a/include/security.php b/include/security.php
index 66622fd33..fc816e5d7 100644..100755
--- a/include/security.php
+++ b/include/security.php
@@ -326,7 +326,7 @@ function check_form_security_token($typename = '', $formname = 'form_security_to
}
function check_form_security_std_err_msg() {
- return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it.') . EOL;
+ return t('The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it.') . EOL;
}
function check_form_security_token_redirectOnErr($err_redirect, $typename = '', $formname = 'form_security_token') {
if (!check_form_security_token($typename, $formname)) {
@@ -344,4 +344,4 @@ function check_form_security_token_ForbiddenOnErr($typename = '', $formname = 'f
header('HTTP/1.1 403 Forbidden');
killme();
}
-} \ No newline at end of file
+}
diff --git a/index.php b/index.php
index 5dd93523e..442173eeb 100644
--- a/index.php
+++ b/index.php
@@ -40,8 +40,8 @@ load_translation_table($lang);
require_once("dba.php");
if(! $install) {
-$db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
- unset($db_host, $db_user, $db_pass, $db_data);
+ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
+ unset($db_host, $db_user, $db_pass, $db_data);
/**
* Load configs from db. Overwrite configs from .htconfig.php
@@ -95,6 +95,10 @@ if((x($_SESSION,'language')) && ($_SESSION['language'] !== $lang)) {
if(x($_GET,'zrl')) {
$_SESSION['my_url'] = $_GET['zrl'];
$a->query_string = preg_replace('/[\?&]zrl=(.*?)([\?&]|$)/is','',$a->query_string);
+ if(! $install) {
+ $arr = array('zrl' => $_SESSION['my_url'], 'url' => $a->cmd);
+ call_hooks('zrl_init',$arr);
+ }
}
/**
diff --git a/mod/directory.php b/mod/directory.php
index 7f18bd026..367438845 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -44,7 +44,7 @@ function directory_content(&$a) {
$gdirpath = dirname(get_config('system','directory_submit_url'));
if(strlen($gdirpath)) {
$globaldir = '<ul><li><div id="global-directory-link"><a href="'
- . $gdirpath . '">' . t('Global Directory') . '</a></div></li></ul>';
+ . zrl($gdirpath,true) . '">' . t('Global Directory') . '</a></div></li></ul>';
}
$admin = '';
diff --git a/mod/randprof.php b/mod/randprof.php
index 53d7425e9..6713a81d9 100644
--- a/mod/randprof.php
+++ b/mod/randprof.php
@@ -5,6 +5,6 @@ function randprof_init(&$a) {
require_once('include/Contact.php');
$x = random_profile();
if($x)
- goaway($x);
+ goaway(zrl($x));
goaway($a->get_baseurl() . '/profile');
}
diff --git a/util/messages.po b/util/messages.po
index d09b1cfc0..b61581587 100644
--- a/util/messages.po
+++ b/util/messages.po
@@ -6596,7 +6596,7 @@ msgstr ""
#: ../../include/security.php:329
msgid ""
"The form security token was not correct. This probably happened because the "
-"form has been opened for too long (>3 hours) before subitting it."
+"form has been opened for too long (>3 hours) before submitting it."
msgstr ""
#: ../../include/Contact.php:145 ../../include/conversation.php:813
diff --git a/view/auto_request.tpl b/view/auto_request.tpl
index 2958397c9..961de9bb3 100644
--- a/view/auto_request.tpl
+++ b/view/auto_request.tpl
@@ -7,7 +7,7 @@ $page_desc<br />
<li><a href="http://friendica.com" title="$friendica">$friendica</a></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>
-<li>$emailnet</li>
+{{ if $emailnet }}<li>$emailnet</li>{{ endif }}
</ul>
</p>
<p>
diff --git a/view/de/messages.po b/view/de/messages.po
index 87994b980..c834ec328 100644
--- a/view/de/messages.po
+++ b/view/de/messages.po
@@ -6405,7 +6405,7 @@ msgstr "Willkommen zurück "
#: ../../include/security.php:329
msgid ""
"The form security token was not correct. This probably happened because the "
-"form has been opened for too long (>3 hours) before subitting it."
+"form has been opened for too long (>3 hours) before submitting it."
msgstr "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde."
#: ../../include/Contact.php:137 ../../include/conversation.php:813
diff --git a/view/de/strings.php b/view/de/strings.php
index a68a77a75..6a43f049e 100644
--- a/view/de/strings.php
+++ b/view/de/strings.php
@@ -1441,7 +1441,7 @@ $a->strings["image/photo"] = "Bild/Foto";
$a->strings["Welcome "] = "Willkommen ";
$a->strings["Please upload a profile photo."] = "Bitte lade ein Profilbild hoch.";
$a->strings["Welcome back "] = "Willkommen zurück ";
-$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before subitting it."] = "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde.";
+$a->strings["The form security token was not correct. This probably happened because the form has been opened for too long (>3 hours) before submitting it."] = "Der Formular-Sicherheits-Token war nicht korrekt. Der Grund ist wahrscheinlich, dass das Formular zu lange (>3 Stunden) offen war, bevor es abgeschickt wurde.";
$a->strings["View status"] = "Status anzeigen";
$a->strings["View profile"] = "Profil anzeigen";
$a->strings["View photos"] = "Fotos ansehen";
diff --git a/view/dfrn_request.tpl b/view/dfrn_request.tpl
index d8aa8b181..bd3bcbc42 100644
--- a/view/dfrn_request.tpl
+++ b/view/dfrn_request.tpl
@@ -7,7 +7,7 @@ $page_desc<br />
<li><a href="http://friendica.com" title="$friendica">$friendica</a></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>
-<li>$emailnet</li>
+{{ if $emailnet }}<li>$emailnet</li>{{ endif }}
</ul>
$invite_desc
</p>
diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php
index affffc9cb..d5d489be2 100644
--- a/view/theme/dispy-dark/theme.php
+++ b/view/theme/dispy-dark/theme.php
@@ -120,7 +120,7 @@ function dispy_dark_init(&$a) {
});
$('a[href=#top]').click(function() {
- $('html, body').animate({scrollTop:0}, '500');
+ $('html, body').animate({scrollTop:0}, 'slow');
return false;
});
diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php
index 8af61d78b..edc9b9548 100644
--- a/view/theme/dispy/theme.php
+++ b/view/theme/dispy/theme.php
@@ -120,7 +120,7 @@ function dispy_init(&$a) {
});
$('a[href=#top]').click(function() {
- $('html, body').animate({scrollTop:0}, '500');
+ $('html, body').animate({scrollTop:0}, 'slow');
return false;
});