Not sure how much time to spend on GNUsocialPhotos plugin
This commit is contained in:
parent
e0014b6736
commit
d59b39275b
|
@ -28,18 +28,14 @@
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('STATUSNET')) {
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
include_once INSTALLDIR . '/actions/conversation.php';
|
class PhotoAction extends ManagedAction
|
||||||
include_once INSTALLDIR . '/classes/Notice.php';
|
|
||||||
|
|
||||||
class PhotoAction extends Action
|
|
||||||
{
|
{
|
||||||
var $user = null;
|
var $user = null;
|
||||||
|
var $conv = null; // Conversation dataobject
|
||||||
|
|
||||||
function prepare($args)
|
protected function prepare(array $args=array())
|
||||||
{
|
{
|
||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
|
@ -49,17 +45,9 @@ class PhotoAction extends Action
|
||||||
$this->notice = Notice::getKV('id', $this->photo->notice_id);
|
$this->notice = Notice::getKV('id', $this->photo->notice_id);
|
||||||
|
|
||||||
$this->user = Profile::getKV('id', $this->notice->profile_id);
|
$this->user = Profile::getKV('id', $this->notice->profile_id);
|
||||||
|
$this->conv = $this->notice->getConversation();
|
||||||
|
|
||||||
$notices = Notice::conversationStream((int)$this->notice->conversation, null, null);
|
|
||||||
$this->conversation = new ConversationTree($notices, $this);
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function handle($args)
|
|
||||||
{
|
|
||||||
parent::handle($args);
|
|
||||||
$this->showPage();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function title()
|
function title()
|
||||||
|
@ -102,6 +90,12 @@ class PhotoAction extends Action
|
||||||
$this->element('p', array('class' => 'photodescription'), $this->photo->photo_description);
|
$this->element('p', array('class' => 'photodescription'), $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->photo->notice_id} 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();
|
|
||||||
|
if (Event::handle('StartShowConversation', array($this, $this->conv, $this->scoped))) {
|
||||||
|
$notices = $this->conv->getNotices();
|
||||||
|
$nl = new FullThreadedNoticeList($notices, $this, $this->scoped);
|
||||||
|
$cnt = $nl->show();
|
||||||
|
}
|
||||||
|
Event::handle('EndShowConversation', array($this, $this->conv, $this->scoped));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user