aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-20 03:20:37 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-20 03:20:37 -0400
commit5642e9fa388bb84027a7b71a3baeef39c3aafcab (patch)
tree4a2b3979200fa9966e44bf4974e9276a20d22419 /mod/photos.php
parent236eaf6ed09df34e62cf487712d909cb8a3b35d1 (diff)
parent5a5aadb743e055530aa071dd3e47705a3bf5d728 (diff)
downloadvolse-hubzilla-5642e9fa388bb84027a7b71a3baeef39c3aafcab.tar.gz
volse-hubzilla-5642e9fa388bb84027a7b71a3baeef39c3aafcab.tar.bz2
volse-hubzilla-5642e9fa388bb84027a7b71a3baeef39c3aafcab.zip
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master: add IP address to failed login log message modified: include/text.php Stupid bug fixed cleanup after openid refactoring refactor openid logins/registrations modified: include/text.php deleted: images/diaspora.png deleted: images/smiley-bangheaddesk.gif deleted: images/smiley-beard.png deleted: images/smiley-shaka.gif deleted: images/smiley-whitebeard.png some openid fixes, use identity url from openid server and normalise it. support "no_smilies" ctrl + left|right cursor keys to prev/next photos add 'loggin_out' hook * master:
Diffstat (limited to 'mod/photos.php')
-rwxr-xr-xmod/photos.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 4406780d3..b294f0a66 100755
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -1069,7 +1069,7 @@ function photos_content(&$a) {
if($can_post && ($ph[0]['uid'] == $owner_uid)) {
$tools = array(
'edit' => array($a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '/image/' . $datum . (($cmd === 'edit') ? '' : '/edit'), (($cmd === 'edit') ? t('View photo') : t('Edit photo'))),
- 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'] . '?form_security_token=' . get_form_security_token('profile_photo'), t('Use as profile photo')),
+ 'profile'=>array($a->get_baseurl() . '/profile_photo/use/'.$ph[0]['resource-id'], t('Use as profile photo')),
);
// lock
@@ -1081,6 +1081,17 @@ function photos_content(&$a) {
}
+ if(! $cmd !== 'edit') {
+ $a->page['htmlhead'] .= '<script>
+ $(document).keydown(function(event) {' . "\n";
+
+ if($prevlink)
+ $a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = \'' . $prevlink . '\'; }' . "\n";
+ if($nextlink)
+ $a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = \'' . $nextlink . '\'; }' . "\n";
+ $a->page['htmlhead'] .= '});</script>';
+ }
+
if($prevlink)
$prevlink = array($prevlink, '<div class="icon prev"></div>') ;