Merge branch 'feature-6963/Messaging_system_hide_button_to_write'

This commit is contained in:
Andreas Österreicher
2020-04-21 15:16:38 +02:00
6 changed files with 60 additions and 4 deletions
+17
View File
@@ -91,6 +91,23 @@ class Messages_model extends CI_Model
}
}
/**
* Prepares data for the view system/messages/ajaxRead
*/
public function prepareAjaxRead()
{
$psResult = $this->PrestudentModel->loadWhere(array('person_id' => getAuthPersonId()));
if (isError($psResult)) show_error('An error occurred while loading this page, please contact the site administrator');
if (hasData($psResult))
{
return array('writeButton' => '<input id="writeMessage" type="button" value="'.$this->p->t('ui', 'nachrichtSenden').'">');
}
return array('writeButton' => '');
}
/**
* Prepares data for the view system/messages/ajaxWrite
*/