Only show photo uploads for logged in users
This commit is contained in:
parent
18f46958f2
commit
d61f88b979
@ -92,7 +92,7 @@ class PhotoAction extends Action
|
|||||||
$this->elementEnd('a');
|
$this->elementEnd('a');
|
||||||
$this->element('p', array(), $this->photo->photo_description);
|
$this->element('p', array(), $this->photo->photo_description);
|
||||||
//This is a hack to hide the top-level comment
|
//This is a hack to hide the top-level comment
|
||||||
$this->element('style', array(), "#notice-{$this->photo->notice_id} div { display: none } #notice-{$this->photoid} ol li div { display: inline }");
|
$this->element('style', array(), "#notice-{$this->photo->notice_id} div { display: none } #notice-{$this->photo->notice_id} ol li div { display: inline }");
|
||||||
$this->conversation->show();
|
$this->conversation->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
*
|
*
|
||||||
* @package GNU Social
|
* @package GNU Social
|
||||||
* @author Ian Denhardt <ian@zenhack.net>
|
* @author Ian Denhardt <ian@zenhack.net>
|
||||||
|
* @author Max Shinn <trombonechamp@gmail.com>
|
||||||
* @copyright 2010 Free Software Foundation, Inc.
|
* @copyright 2010 Free Software Foundation, Inc.
|
||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
|
||||||
*/
|
*/
|
||||||
@ -50,9 +51,12 @@ class GNUsocialPhotoNav extends Widget {
|
|||||||
|
|
||||||
$this->out->menuItem(common_local_url('photos', array('nickname' => $this->nickname)),
|
$this->out->menuItem(common_local_url('photos', array('nickname' => $this->nickname)),
|
||||||
_('Photos'));
|
_('Photos'));
|
||||||
|
|
||||||
$this->out->menuItem(common_local_url('photoupload', array()),
|
$user = common_current_user();
|
||||||
_('Upload Photos'));
|
if (!empty($user)) {
|
||||||
|
$this->out->menuItem(common_local_url('photoupload', array()),
|
||||||
|
_('Upload Photos'));
|
||||||
|
}
|
||||||
|
|
||||||
$this->out->elementEnd('ul');
|
$this->out->elementEnd('ul');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user