mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'ci' of https://github.com/FH-Complete/FHC-Core into ci
Conflicts: application/core/DB_Model.php
This commit is contained in:
@@ -16,7 +16,7 @@ class DBTools extends FHC_Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $seed_path = APPPATH.'seeds/';
|
||||
protected $seed_path;
|
||||
|
||||
/**
|
||||
* Seed basename regex
|
||||
@@ -34,6 +34,8 @@ class DBTools extends FHC_Controller
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$seed_path = APPPATH.'seeds/';
|
||||
|
||||
if ($this->input->is_cli_request())
|
||||
{
|
||||
$cli = true;
|
||||
|
||||
@@ -30,7 +30,7 @@ class Bundesland extends APIv1_Controller
|
||||
|
||||
public function getAll()
|
||||
{
|
||||
$result = $this->BundeslandModel->loadWhole();
|
||||
$result = $this->BundeslandModel->load();
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class Nation extends APIv1_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->NationModel->loadWhole();
|
||||
$result = $this->NationModel->load();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class Orgform extends APIv1_Controller
|
||||
*/
|
||||
public function getAll()
|
||||
{
|
||||
$result = $this->OrgformModel->loadWhole();
|
||||
$result = $this->OrgformModel->load();
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class Statistik extends APIv1_Controller
|
||||
{
|
||||
$this->StatistikModel->addOrder($this->get('order'));
|
||||
|
||||
$result = $this->StatistikModel->loadWhole();
|
||||
$result = $this->StatistikModel->load();
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ class Statistik extends APIv1_Controller
|
||||
$this->StatistikModel->addOrder('bezeichnung');
|
||||
$this->StatistikModel->addOrder('statistik_kurzbz');
|
||||
|
||||
$result = $this->StatistikModel->loadWhole();
|
||||
$result = $this->StatistikModel->load();
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ class Studiensemester extends APIv1_Controller
|
||||
$this->StudiensemesterModel->addOrder('ende', 'ASC');
|
||||
}
|
||||
|
||||
$result = $this->StudiensemesterModel->loadWhole();
|
||||
$result = $this->StudiensemesterModel->load();
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class Ort extends APIv1_Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->OrtModel->loadWhole();
|
||||
$result = $this->OrtModel->load();
|
||||
}
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
|
||||
@@ -22,7 +22,7 @@ class Message extends APIv1_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// Load model MessageModel
|
||||
// Load library MessageLib
|
||||
$this->load->library('MessageLib', array('uid' => $this->_getUID()));
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ class Message extends APIv1_Controller
|
||||
*/
|
||||
public function postMessage()
|
||||
{
|
||||
$validation = $this->_validate($this->post());
|
||||
$validation = $this->_validatePostMessage($this->post());
|
||||
|
||||
if (is_object($validation) && $validation->error == EXIT_SUCCESS)
|
||||
{
|
||||
@@ -93,7 +93,33 @@ class Message extends APIv1_Controller
|
||||
}
|
||||
}
|
||||
|
||||
private function _validate($message = null)
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function postMessageVorlage()
|
||||
{
|
||||
$validation = $this->_validatePostMessageVorlage($this->post());
|
||||
|
||||
if (is_object($validation) && $validation->error == EXIT_SUCCESS)
|
||||
{
|
||||
$result = $this->messagelib->sendMessageVorlage(
|
||||
$this->post()['sender_id'],
|
||||
$this->post()['receiver_id'],
|
||||
$this->post()['vorlage_kurzbz'],
|
||||
$this->post()['oe_kurzbz'],
|
||||
$this->post()['data'],
|
||||
$this->post()['orgform_kurzbz']
|
||||
);
|
||||
|
||||
$this->response($result, REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->response($validation, REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
|
||||
private function _validatePostMessage($message = null)
|
||||
{
|
||||
if (!isset($message))
|
||||
{
|
||||
@@ -118,4 +144,34 @@ class Message extends APIv1_Controller
|
||||
|
||||
return $this->_success('Input data are valid');
|
||||
}
|
||||
|
||||
private function _validatePostMessageVorlage($message = null)
|
||||
{
|
||||
if (!isset($message))
|
||||
{
|
||||
return $this->_error('Parameter is null');
|
||||
}
|
||||
if (!isset($message['sender_id']))
|
||||
{
|
||||
return $this->_error('person_id of sender is not set');
|
||||
}
|
||||
if (!isset($message['receiver_id']))
|
||||
{
|
||||
return $this->_error('person_id of receiver is not set');
|
||||
}
|
||||
if (!isset($message['vorlage_kurzbz']))
|
||||
{
|
||||
return $this->_error('vorlage_kurzbz is not set');
|
||||
}
|
||||
if( !isset($message['oe_kurzbz']))
|
||||
{
|
||||
return $this->_error('oe_kurzbz is not set');
|
||||
}
|
||||
if (!isset($message['data']))
|
||||
{
|
||||
return $this->_error('data is not set');
|
||||
}
|
||||
|
||||
return $this->_success('Input data are valid');
|
||||
}
|
||||
}
|
||||
@@ -191,38 +191,6 @@ class DB_Model extends FHC_Model
|
||||
else
|
||||
return $this->_error($this->db->error(), FHC_DB_ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Load single data from DB-Table
|
||||
*
|
||||
* @param string $id ID (Primary Key) for SELECT ... WHERE
|
||||
* @return array
|
||||
*/
|
||||
public function loadWhole()
|
||||
{
|
||||
// Check Class-Attributes
|
||||
if (is_null($this->dbTable))
|
||||
return $this->_error(lang('fhc_'.FHC_NODBTABLE), FHC_MODEL_ERROR);
|
||||
if (is_null($this->pk))
|
||||
return $this->_error(lang('fhc_'.FHC_NOPK), FHC_MODEL_ERROR);
|
||||
|
||||
|
||||
// Check rights only if this method is called from a model
|
||||
//var_dump(get_called_class());
|
||||
if (substr(get_called_class(), -6) == '_model')
|
||||
if (! $this->fhc_db_acl->isBerechtigt($this->acl[$this->dbTable], 's'))
|
||||
return $this->_error(lang('fhc_'.FHC_NORIGHT).' -> '.$this->acl[$this->dbTable], FHC_MODEL_ERROR);
|
||||
|
||||
// DB-SELECT
|
||||
$result = $this->db->get($this->dbTable);
|
||||
|
||||
if ($result)
|
||||
return $this->_success($result->result());
|
||||
else
|
||||
return $this->_error($this->db->error(), FHC_DB_ERROR);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Add a table to join with
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function success($retval, $message = FHC_SUCCESS)
|
||||
function success($retval, $message = EXIT_SUCCESS)
|
||||
{
|
||||
$return = new stdClass();
|
||||
$return->error = EXIT_SUCCESS;
|
||||
@@ -20,10 +20,10 @@ function success($retval, $message = FHC_SUCCESS)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function error($retval = '', $message = FHC_MODEL_ERROR)
|
||||
function error($retval = '', $message = EXIT_ERROR)
|
||||
{
|
||||
$return = new stdClass();
|
||||
$return->error = EXIT_MODEL;
|
||||
$return->error = EXIT_ERROR;
|
||||
$return->fhcCode = $message;
|
||||
$return->msg = lang('fhc_' . $message);
|
||||
$return->retval = $retval;
|
||||
|
||||
@@ -17,16 +17,26 @@ class MessageLib
|
||||
$this->ci->config->load('message');
|
||||
|
||||
$this->ci->load->model('system/Message_model', 'MessageModel');
|
||||
if (is_array($params) && isset($params['uid']))
|
||||
{
|
||||
$this->ci->MessageModel->setUID($params['uid']);
|
||||
}
|
||||
|
||||
$this->ci->load->model('system/MsgStatus_model', 'MsgStatusModel');
|
||||
$this->ci->load->model('system/Recipient_model', 'RecipientModel');
|
||||
$this->ci->load->model('system/Attachment_model', 'AttachmentModel');
|
||||
|
||||
if (is_array($params) && isset($params['uid']))
|
||||
{
|
||||
$this->ci->load->library('VorlageLib', array('uid' => $params['uid']));
|
||||
$this->ci->MessageModel->setUID($params['uid']);
|
||||
$this->ci->MsgStatusModel->setUID($params['uid']);
|
||||
$this->ci->RecipientModel->setUID($params['uid']);
|
||||
$this->ci->AttachmentModel->setUID($params['uid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ci->load->library('VorlageLib');
|
||||
}
|
||||
|
||||
//$this->ci->load->helper('language');
|
||||
$this->ci->lang->load('message');
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -212,6 +222,85 @@ class MessageLib
|
||||
else
|
||||
return $this->_success($msg_id);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* sendMessage() - sends new internal message. This function will create a new thread
|
||||
*
|
||||
* @param integer $sender_id REQUIRED
|
||||
* @param mixed $recipients REQUIRED - a single integer or an array of integers, representing user_ids
|
||||
* @param string $subject
|
||||
* @param string $body
|
||||
* @param integer $priority
|
||||
* @return array
|
||||
*/
|
||||
function sendMessageVorlage($sender_id, $receiver_id, $vorlage_kurzbz, $oe_kurzbz, $data, $orgform_kurzbz = null)
|
||||
{
|
||||
if (!is_numeric($sender_id) || !is_numeric($receiver_id))
|
||||
return $this->_invalid_id(MSG_ERR_INVALID_MSG_ID);
|
||||
|
||||
$result = $this->ci->vorlagelib->loadVorlagetext($vorlage_kurzbz, $oe_kurzbz, $orgform_kurzbz);
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS)
|
||||
{
|
||||
if (is_array($result->retval) && count($result->retval) > 0)
|
||||
{
|
||||
$parsedText = $this->ci->vorlagelib->parseVorlagetext($result->retval[0]->text, $data);
|
||||
|
||||
$this->ci->db->trans_start(false);
|
||||
//save Message
|
||||
$msgData = array(
|
||||
'person_id' => $sender_id,
|
||||
'subject' => $result->retval[0]->subject,
|
||||
'body' => $parsedText,
|
||||
'priority' => PRIORITY_NORMAL,
|
||||
//'relationmessage_id' => $relationmessage_id,
|
||||
'oe_kurzbz' => $oe_kurzbz
|
||||
);
|
||||
|
||||
$result = $this->ci->MessageModel->insert($msgData);
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS)
|
||||
{
|
||||
$msg_id = $result->retval;
|
||||
$recipientData = array(
|
||||
'person_id' => $receiver_id,
|
||||
'message_id' => $msg_id
|
||||
);
|
||||
$result = $this->ci->RecipientModel->insert($recipientData);
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS)
|
||||
{
|
||||
$statusData = array(
|
||||
'message_id' => $msg_id,
|
||||
'person_id' => $receiver_id,
|
||||
'status' => MSG_STATUS_UNREAD
|
||||
);
|
||||
$result = $this->ci->MsgStatusModel->insert($statusData);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ci->db->trans_complete();
|
||||
|
||||
if ($this->ci->db->trans_status() === FALSE || (is_object($result) && $result->error != EXIT_SUCCESS))
|
||||
{
|
||||
$this->ci->db->trans_rollback();
|
||||
return $this->_error($result->msg, EXIT_ERROR);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ci->db->trans_commit();
|
||||
return $this->_success($msg_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_error('Vorlage not found', EXIT_ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = $this->_error($result->msg, EXIT_ERROR);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
@@ -345,4 +434,4 @@ class MessageLib
|
||||
'msg' => lang('message_'.$error)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ class VorlageLib
|
||||
{
|
||||
private $recipients = array();
|
||||
|
||||
public function __construct()
|
||||
public function __construct($params = null)
|
||||
{
|
||||
require_once APPPATH.'config/message.php';
|
||||
|
||||
@@ -19,6 +19,13 @@ class VorlageLib
|
||||
$this->ci->load->library('parser');
|
||||
$this->ci->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
$this->ci->load->model('system/Vorlagestudiengang_model', 'VorlageStudiengangModel');
|
||||
|
||||
if (is_array($params) && isset($params['uid']))
|
||||
{
|
||||
$this->ci->VorlageModel->setUID($params['uid']);
|
||||
$this->ci->VorlageStudiengangModel->setUID($params['uid']);
|
||||
}
|
||||
|
||||
$this->ci->load->helper('language');
|
||||
//$this->ci->lang->load('fhcomplete');
|
||||
}
|
||||
@@ -95,7 +102,11 @@ class VorlageLib
|
||||
if (empty($vorlage_kurzbz))
|
||||
return $this->_error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false));
|
||||
|
||||
$vorlage = $this->ci->VorlageStudiengangModel->getVorlageStudiengang($vorlage_kurzbz, $oe_kurzbz, $orgform_kurzbz);
|
||||
$vorlage = $this->ci->VorlageStudiengangModel->loadWhere(array(
|
||||
'vorlage_kurzbz' => $vorlage_kurzbz,
|
||||
'oe_kurzbz' => $oe_kurzbz,
|
||||
'orgform_kurzbz' => $orgform_kurzbz)
|
||||
);
|
||||
return $vorlage;
|
||||
}
|
||||
|
||||
@@ -149,4 +160,35 @@ class VorlageLib
|
||||
$text = $this->ci->parser->parse_string($text, $data, TRUE);
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Success
|
||||
*
|
||||
* @param mixed $retval
|
||||
* @return array
|
||||
*/
|
||||
protected function _success($retval, $message = EXIT_SUCCESS)
|
||||
{
|
||||
$return = new stdClass();
|
||||
$return->error = EXIT_SUCCESS;
|
||||
$return->Code = $message;
|
||||
$return->msg = lang('message_' . $message);
|
||||
$return->retval = $retval;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* General Error
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _error($retval = '', $message = EXIT_ERROR)
|
||||
{
|
||||
$return = new stdClass();
|
||||
$return->error = EXIT_ERROR;
|
||||
$return->Code = $message;
|
||||
$return->msg = lang('message_' . $message);
|
||||
$return->retval = $retval;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,8 @@ class Migration_Vorlage extends CI_Migration {
|
||||
{
|
||||
echo 'Column public.tbl_vorlagestudiengang.orgform_kurzbz added!';
|
||||
// Insert Demo Data
|
||||
$query= "INSERT INTO public.tbl_vorlagestudiengang VALUES ('MailRegistration', 0, 1, '<p>Sehr geehrte/r {anrede} <strong>{vorname} {nachname}</strong>,</p>
|
||||
$query = "SELECT setval('seq_vorlagestudiengang_vorlagestudiengang_id', (SELECT MAX(vorlagestudiengang_id) FROM public.tbl_vorlagestudiengang));";
|
||||
$query .= "INSERT INTO public.tbl_vorlagestudiengang VALUES ('MailRegistration', 0, 1, '<p>Sehr geehrte/r {anrede} <strong>{vorname} {nachname}</strong>,</p>
|
||||
<p>vielen Dank für Ihre Registrierung an unserer Hochschule. Im Anhang senden wir ihnen den Zugangscode.</p>
|
||||
<p>Code: <code>{code}</code></p>
|
||||
<p>Unter folgenden Link können sie sich direkt für unser Service einloggen: <a title=\"LoginLink\" href=\"{link}{code}\">{link}{code}</a></p>
|
||||
|
||||
@@ -82,7 +82,7 @@ public function getMessagesByPerson($person_id, $all)
|
||||
// prepare parameters
|
||||
$person_id = (int)$person_id;
|
||||
// get Data
|
||||
$sql = 'SELECT person_id,
|
||||
/*$sql = 'SELECT person_id,
|
||||
message_id,
|
||||
subject,
|
||||
body,
|
||||
@@ -109,10 +109,23 @@ public function getMessagesByPerson($person_id, $all)
|
||||
) status USING (message_id, person_id)
|
||||
WHERE tbl_msg_status.insertamum=status.insertamum
|
||||
) s USING (message_id, person_id)
|
||||
WHERE person_id = ?';
|
||||
WHERE person_id = ?';*/
|
||||
|
||||
if (! $all)
|
||||
$sql .= ' AND (status < 3 OR status IS NULL)';
|
||||
$sql = 'SELECT r.message_id,
|
||||
m.subject,
|
||||
m.body,
|
||||
m.insertamum,
|
||||
m.oe_kurzbz,
|
||||
s.status,
|
||||
s.statusinfo,
|
||||
s.updateamum
|
||||
FROM public.tbl_msg_recipient r JOIN public.tbl_msg_message m USING (message_id)
|
||||
JOIN public.tbl_person p ON (p.person_id = m.person_id)
|
||||
JOIN public.tbl_msg_status s USING (message_id)
|
||||
WHERE r.person_id = ?';
|
||||
|
||||
/*if (! $all)
|
||||
$sql .= ' AND (status < 3 OR status IS NULL)';*/
|
||||
$result = $this->db->query($sql, array($person_id));
|
||||
//var_dump($result);
|
||||
if (is_object($result))
|
||||
|
||||
@@ -8,7 +8,7 @@ class sprache_widget extends Widget
|
||||
public function display($data)
|
||||
{
|
||||
$this->load->model('system/Sprache_model');
|
||||
$res = $this->Sprache_model->loadWhole();
|
||||
$res = $this->Sprache_model->load();
|
||||
//var_dump($res);
|
||||
foreach ($res->retval as $obj)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class dms extends Dms_model
|
||||
* @param dms_id
|
||||
* @param version optional
|
||||
*/
|
||||
public function load($dms_id, $version=null)
|
||||
public function load($dms_id = null, $version=null)
|
||||
{
|
||||
$qry = "SELECT tbl_dms.dms_id, * FROM campus.tbl_dms JOIN campus.tbl_dms_version USING(dms_id) WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER);
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class kontakt extends Kontakt_model
|
||||
* @param $kontakt_id ID des zu ladenden Kontaktes
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($kontakt_id)
|
||||
public function load($kontakt_id = null)
|
||||
{
|
||||
if(!is_numeric($kontakt_id))
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ class mitarbeiter extends benutzer
|
||||
* @param $uid
|
||||
* @return true wenn ok, sonst false
|
||||
*/
|
||||
public function load($uid)
|
||||
public function load($uid = null)
|
||||
{
|
||||
if(!benutzer::load($uid))
|
||||
return false;
|
||||
|
||||
@@ -67,7 +67,7 @@ class nation extends Nation_model
|
||||
* @param $code code der zu ladenden Nation
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($code)
|
||||
public function load($code = null)
|
||||
{
|
||||
//Lesen der Daten aus der Datenbank
|
||||
$result = parent::loadWhere(array('nation_code' => $code));
|
||||
@@ -126,7 +126,7 @@ class nation extends Nation_model
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = parent::loadWhole();
|
||||
$result = parent::load();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class organisationsform extends Orgform_model
|
||||
* Laedt eine Organisationsform
|
||||
* @param $orgform_kurzbz
|
||||
*/
|
||||
public function load($orgform_kurzbz)
|
||||
public function load($orgform_kurzbz = null)
|
||||
{
|
||||
$qry = "SELECT * FROM bis.tbl_orgform WHERE orgform_kurzbz=".$this->db_add_param($orgform_kurzbz).';';
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class ort extends Ort_model
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = parent::loadWhole();
|
||||
$result = parent::load();
|
||||
}
|
||||
|
||||
if (!is_object($result) || (is_object($result) && ($result->error != EXIT_SUCCESS || !is_array($result->retval))))
|
||||
@@ -136,7 +136,7 @@ class ort extends Ort_model
|
||||
* @param $fachb_id ID des zu ladenden Ortes
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($ort_kurzbz)
|
||||
public function load($ort_kurzbz = null)
|
||||
{
|
||||
if ($ort_kurzbz == '')
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@ class preinteressent extends Preinteressent_model
|
||||
* Laedt einen Datensatz
|
||||
* @param preinteressent_id ID des zu ladenden Datensatzes
|
||||
*/
|
||||
public function load($preinteressent_id)
|
||||
public function load($preinteressent_id = null)
|
||||
{
|
||||
//id auf Gueltigkeit pruefen
|
||||
if(!is_numeric($preinteressent_id) || $preinteressent_id == '')
|
||||
|
||||
@@ -104,7 +104,7 @@ class prestudent extends Prestudent_model
|
||||
* Laedt Prestudent mit der uebergebenen ID
|
||||
* @param $prestudent_id ID des Prestudenten der geladen werden soll
|
||||
*/
|
||||
public function load($prestudent_id)
|
||||
public function load($prestudent_id = null)
|
||||
{
|
||||
if (!is_numeric($prestudent_id))
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ class statistik extends Statistik_model
|
||||
parent::addOrder($order);
|
||||
}
|
||||
|
||||
$result = parent::loadWhole();
|
||||
$result = parent::load();
|
||||
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
|
||||
{
|
||||
@@ -339,7 +339,7 @@ class statistik extends Statistik_model
|
||||
parent::addOrder('bezeichnung');
|
||||
parent::addOrder('statistik_kurzbz');
|
||||
|
||||
$result = parent::loadWhole();
|
||||
$result = parent::load();
|
||||
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ class student extends benutzer
|
||||
* studiensemester_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($uid, $studiensemester_kurzbz=null)
|
||||
public function load($uid = null, $studiensemester_kurzbz=null)
|
||||
{
|
||||
if(!benutzer::load($uid))
|
||||
return false;
|
||||
|
||||
@@ -324,7 +324,7 @@ class studiensemester extends Studiensemester_model
|
||||
parent::addOrder('ende', 'ASC');
|
||||
}
|
||||
|
||||
$result = parent::loadWhole();
|
||||
$result = parent::load();
|
||||
|
||||
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user