function __construct(Notice $notice, Action $out=null, array $prefs=array())
{
parent::__construct($out);
+
+ $this->notice = $notice;
+
if (!empty($notice->repeat_of)) {
$original = Notice::getKV('id', $notice->repeat_of);
- if (!$original instanceof Notice) { // could have been deleted
- $this->notice = $notice;
- } else {
+ if ($original instanceof Notice) { // could have been deleted
$this->notice = $original;
$this->repeat = $notice;
}
- } else {
- $this->notice = $notice;
}
$this->profile = $this->notice->getProfile();
-
+
// integer preferences
foreach(array('maxchars') as $key) {
if (array_key_exists($key, $prefs)) {