Untabify
This commit is contained in:
parent
cbf296e804
commit
e81bdcb200
@ -44,9 +44,9 @@ class PhotoAction extends Action
|
|||||||
parent::prepare($args);
|
parent::prepare($args);
|
||||||
|
|
||||||
$args = $this->returnToArgs();
|
$args = $this->returnToArgs();
|
||||||
$this->photoid = $args[1]['photoid'];
|
$this->photoid = $args[1]['photoid'];
|
||||||
$this->photo = GNUsocialPhoto::staticGet('notice_id', $this->photoid);
|
$this->photo = GNUsocialPhoto::staticGet('notice_id', $this->photoid);
|
||||||
$this->notice = Notice::staticGet('id', $this->photoid);
|
$this->notice = Notice::staticGet('id', $this->photoid);
|
||||||
|
|
||||||
$this->user = Profile::staticGet('id', $this->notice->profile_id);
|
$this->user = Profile::staticGet('id', $this->notice->profile_id);
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ class PhotoAction extends Action
|
|||||||
if (empty($this->user)) {
|
if (empty($this->user)) {
|
||||||
return _m('No such user.');
|
return _m('No such user.');
|
||||||
} else if (empty($this->photo)) {
|
} else if (empty($this->photo)) {
|
||||||
return _m('No such photo.');
|
return _m('No such photo.');
|
||||||
} else if (!empty($this->photo->title)) {
|
} else if (!empty($this->photo->title)) {
|
||||||
return $this->photo->title;
|
return $this->photo->title;
|
||||||
} else {
|
} else {
|
||||||
return sprintf(_m("%s's Photo."), $this->user->nickname);
|
return sprintf(_m("%s's Photo."), $this->user->nickname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,9 +90,9 @@ class PhotoAction extends Action
|
|||||||
$this->elementStart('a', array('href' => $this->photo->uri));
|
$this->elementStart('a', array('href' => $this->photo->uri));
|
||||||
$this->element('img', array('src' => $this->photo->uri));
|
$this->element('img', array('src' => $this->photo->uri));
|
||||||
$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->photoid} div { display: none } #notice-{$this->photoid} ol li div { display: inline }");
|
$this->element('style', array(), "#notice-{$this->photoid} div { display: none } #notice-{$this->photoid} ol li div { display: inline }");
|
||||||
$this->conversation->show();
|
$this->conversation->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,20 +64,20 @@ class PhotouploadAction extends Action
|
|||||||
$this->elementStart('form', array('enctype' => 'multipart/form-data',
|
$this->elementStart('form', array('enctype' => 'multipart/form-data',
|
||||||
'method' => 'post',
|
'method' => 'post',
|
||||||
'action' => common_local_url('photoupload')));
|
'action' => common_local_url('photoupload')));
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->element('input', array('name' => 'photofile',
|
$this->element('input', array('name' => 'photofile',
|
||||||
'type' => 'file',
|
'type' => 'file',
|
||||||
'id' => 'photofile'));
|
'id' => 'photofile'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
//$this->element('br');
|
//$this->element('br');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->input('phototitle', "Title", $this->trimmed('phototitle'), "The title of the photo. (Optional)");
|
$this->input('phototitle', "Title", $this->trimmed('phototitle'), "The title of the photo. (Optional)");
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
$this->textarea('photo_description', "Description", $this->trimmed('photo_description'), "A description of the photo. (Optional)");
|
$this->textarea('photo_description', "Description", $this->trimmed('photo_description'), "A description of the photo. (Optional)");
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
$this->submit('upload', _('Upload'));
|
$this->submit('upload', _('Upload'));
|
||||||
$this->elementEnd('form');
|
$this->elementEnd('form');
|
||||||
}
|
}
|
||||||
@ -140,8 +140,8 @@ class PhotouploadAction extends Action
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $this->trimmed('phototitle');
|
$title = $this->trimmed('phototitle');
|
||||||
$photo_description = $this->trimmed('photo_description');
|
$photo_description = $this->trimmed('photo_description');
|
||||||
|
|
||||||
common_log(LOG_INFO, 'upload path : ' . $imagefile->filepath);
|
common_log(LOG_INFO, 'upload path : ' . $imagefile->filepath);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user