From 1da4cdb9aa4ef62351a0f967e0b73117e3fcac8a Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 24 Apr 2019 19:46:19 +0200 Subject: [PATCH 01/14] - Removed languages files for CI file system based phrase system - Renamed application/language/de-AT/ to application/language/english/ - Kept language file rest_controller_lang.php to be used with the REST_Controller --- application/language/bg-BG/index.html | 11 --- .../language/bg-BG/rest_controller_lang.php | 17 ---- application/language/de-AT/calendar_lang.php | 84 ----------------- application/language/de-AT/date_lang.php | 94 ------------------- application/language/de-AT/db_lang.php | 63 ------------- application/language/de-AT/email_lang.php | 58 ------------ application/language/de-AT/fhc_model_lang.php | 16 ---- .../language/de-AT/fhcomplete_lang.php | 10 -- .../language/de-AT/form_validation_lang.php | 68 -------------- application/language/de-AT/ftp_lang.php | 51 ---------- application/language/de-AT/imglib_lang.php | 56 ----------- application/language/de-AT/index.html | 11 --- application/language/de-AT/message_lang.php | 28 ------ application/language/de-AT/migration_lang.php | 17 ---- application/language/de-AT/number_lang.php | 44 --------- .../language/de-AT/pagination_lang.php | 43 --------- application/language/de-AT/profiler_lang.php | 60 ------------ application/language/de-AT/seed_lang.php | 15 --- application/language/de-AT/unit_test_lang.php | 58 ------------ application/language/de-AT/upload_lang.php | 55 ----------- application/language/en-US/calendar_lang.php | 84 ----------------- application/language/en-US/date_lang.php | 94 ------------------- application/language/en-US/db_lang.php | 63 ------------- application/language/en-US/email_lang.php | 58 ------------ application/language/en-US/fhc_model_lang.php | 16 ---- .../language/en-US/fhcomplete_lang.php | 10 -- .../language/en-US/form_validation_lang.php | 68 -------------- application/language/en-US/ftp_lang.php | 51 ---------- application/language/en-US/imglib_lang.php | 56 ----------- application/language/en-US/index.html | 11 --- application/language/en-US/message_lang.php | 28 ------ application/language/en-US/migration_lang.php | 47 ---------- application/language/en-US/number_lang.php | 44 --------- .../language/en-US/pagination_lang.php | 43 --------- application/language/en-US/profiler_lang.php | 60 ------------ .../language/en-US/rest_controller_lang.php | 17 ---- application/language/en-US/seed_lang.php | 15 --- application/language/en-US/unit_test_lang.php | 58 ------------ application/language/en-US/upload_lang.php | 55 ----------- .../rest_controller_lang.php | 0 application/language/pt-BR/index.html | 11 --- .../language/pt-BR/rest_controller_lang.php | 17 ---- application/language/system/calendar_lang.php | 84 ----------------- application/language/system/date_lang.php | 94 ------------------- application/language/system/db_lang.php | 63 ------------- application/language/system/email_lang.php | 58 ------------ .../language/system/fhc_model_lang.php | 9 -- .../language/system/fhcomplete_lang.php | 10 -- .../language/system/form_validation_lang.php | 68 -------------- application/language/system/ftp_lang.php | 51 ---------- application/language/system/imglib_lang.php | 56 ----------- application/language/system/index.html | 11 --- application/language/system/message_lang.php | 27 ------ .../language/system/migration_lang.php | 17 ---- application/language/system/number_lang.php | 44 --------- .../language/system/pagination_lang.php | 43 --------- application/language/system/profiler_lang.php | 60 ------------ .../language/system/rest_controller_lang.php | 17 ---- application/language/system/seed_lang.php | 15 --- .../language/system/unit_test_lang.php | 58 ------------ application/language/system/upload_lang.php | 55 ----------- 61 files changed, 2605 deletions(-) delete mode 100644 application/language/bg-BG/index.html delete mode 100644 application/language/bg-BG/rest_controller_lang.php delete mode 100644 application/language/de-AT/calendar_lang.php delete mode 100644 application/language/de-AT/date_lang.php delete mode 100644 application/language/de-AT/db_lang.php delete mode 100644 application/language/de-AT/email_lang.php delete mode 100644 application/language/de-AT/fhc_model_lang.php delete mode 100644 application/language/de-AT/fhcomplete_lang.php delete mode 100644 application/language/de-AT/form_validation_lang.php delete mode 100644 application/language/de-AT/ftp_lang.php delete mode 100644 application/language/de-AT/imglib_lang.php delete mode 100644 application/language/de-AT/index.html delete mode 100644 application/language/de-AT/message_lang.php delete mode 100644 application/language/de-AT/migration_lang.php delete mode 100644 application/language/de-AT/number_lang.php delete mode 100644 application/language/de-AT/pagination_lang.php delete mode 100644 application/language/de-AT/profiler_lang.php delete mode 100644 application/language/de-AT/seed_lang.php delete mode 100644 application/language/de-AT/unit_test_lang.php delete mode 100644 application/language/de-AT/upload_lang.php delete mode 100644 application/language/en-US/calendar_lang.php delete mode 100644 application/language/en-US/date_lang.php delete mode 100644 application/language/en-US/db_lang.php delete mode 100644 application/language/en-US/email_lang.php delete mode 100644 application/language/en-US/fhc_model_lang.php delete mode 100644 application/language/en-US/fhcomplete_lang.php delete mode 100644 application/language/en-US/form_validation_lang.php delete mode 100644 application/language/en-US/ftp_lang.php delete mode 100644 application/language/en-US/imglib_lang.php delete mode 100644 application/language/en-US/index.html delete mode 100644 application/language/en-US/message_lang.php delete mode 100644 application/language/en-US/migration_lang.php delete mode 100644 application/language/en-US/number_lang.php delete mode 100644 application/language/en-US/pagination_lang.php delete mode 100644 application/language/en-US/profiler_lang.php delete mode 100644 application/language/en-US/rest_controller_lang.php delete mode 100644 application/language/en-US/seed_lang.php delete mode 100644 application/language/en-US/unit_test_lang.php delete mode 100644 application/language/en-US/upload_lang.php rename application/language/{de-AT => english}/rest_controller_lang.php (100%) delete mode 100644 application/language/pt-BR/index.html delete mode 100644 application/language/pt-BR/rest_controller_lang.php delete mode 100644 application/language/system/calendar_lang.php delete mode 100644 application/language/system/date_lang.php delete mode 100644 application/language/system/db_lang.php delete mode 100644 application/language/system/email_lang.php delete mode 100644 application/language/system/fhc_model_lang.php delete mode 100644 application/language/system/fhcomplete_lang.php delete mode 100644 application/language/system/form_validation_lang.php delete mode 100644 application/language/system/ftp_lang.php delete mode 100644 application/language/system/imglib_lang.php delete mode 100644 application/language/system/index.html delete mode 100644 application/language/system/message_lang.php delete mode 100644 application/language/system/migration_lang.php delete mode 100644 application/language/system/number_lang.php delete mode 100644 application/language/system/pagination_lang.php delete mode 100644 application/language/system/profiler_lang.php delete mode 100644 application/language/system/rest_controller_lang.php delete mode 100644 application/language/system/seed_lang.php delete mode 100644 application/language/system/unit_test_lang.php delete mode 100644 application/language/system/upload_lang.php diff --git a/application/language/bg-BG/index.html b/application/language/bg-BG/index.html deleted file mode 100644 index b702fbc39..000000000 --- a/application/language/bg-BG/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/bg-BG/rest_controller_lang.php b/application/language/bg-BG/rest_controller_lang.php deleted file mode 100644 index 6145307d4..000000000 --- a/application/language/bg-BG/rest_controller_lang.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/de-AT/message_lang.php b/application/language/de-AT/message_lang.php deleted file mode 100644 index 02f98c1b7..000000000 --- a/application/language/de-AT/message_lang.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/en-US/message_lang.php b/application/language/en-US/message_lang.php deleted file mode 100644 index 02f98c1b7..000000000 --- a/application/language/en-US/message_lang.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/pt-BR/rest_controller_lang.php b/application/language/pt-BR/rest_controller_lang.php deleted file mode 100644 index 04bbf6e3c..000000000 --- a/application/language/pt-BR/rest_controller_lang.php +++ /dev/null @@ -1,17 +0,0 @@ - - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/system/message_lang.php b/application/language/system/message_lang.php deleted file mode 100644 index dd5cb55cf..000000000 --- a/application/language/system/message_lang.php +++ /dev/null @@ -1,27 +0,0 @@ - Date: Wed, 24 Apr 2019 19:48:21 +0200 Subject: [PATCH 02/14] - Renamed application/helpers/hlp_message_helper.php to application/helpers/hlp_return_object_helper.php - Added function _createReturnObject to hlp_return_object_helper.php --- ...elper.php => hlp_return_object_helper.php} | 41 ++++++++++--------- 1 file changed, 21 insertions(+), 20 deletions(-) rename application/helpers/{hlp_message_helper.php => hlp_return_object_helper.php} (69%) diff --git a/application/helpers/hlp_message_helper.php b/application/helpers/hlp_return_object_helper.php similarity index 69% rename from application/helpers/hlp_message_helper.php rename to application/helpers/hlp_return_object_helper.php index 4470929df..03b56bbbc 100644 --- a/application/helpers/hlp_message_helper.php +++ b/application/helpers/hlp_return_object_helper.php @@ -20,23 +20,30 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // ------------------------------------------------------------------------------------------------------- -// Collection of functions to handle successful and error messages that methods and functions can return +// Collection of functions to handle success and error objects that methods and functions can return // ------------------------------------------------------------------------------------------------------- +/** + * Used to create a return object, should not be used directly + */ +function _createReturnObject($code, $error, $retval) +{ + $returnObject = new stdClass(); + $returnObject->code = $code; + $returnObject->error = $error; + $returnObject->retval = $retval; + + return $returnObject; +} + /** * Success * * @return array */ -function success($retval, $code = null, $msg_indx_prefix = 'fhc_') +function success($retval = null, $code = null) { - $success = new stdClass(); - $success->error = EXIT_SUCCESS; - $success->fhcCode = $code; - if (!is_null($code)) $success->msg = lang($msg_indx_prefix . $code); - $success->retval = $retval; - - return $success; + return _createReturnObject($code, EXIT_SUCCESS, $retval); } /** @@ -44,15 +51,9 @@ function success($retval, $code = null, $msg_indx_prefix = 'fhc_') * * @return array */ -function error($retval = '', $code = null, $msg_indx_prefix = 'fhc_') +function error($retval = null, $code = null) { - $error = new stdClass(); - $error->error = EXIT_ERROR; - $error->fhcCode = $code; - if (!is_null($code)) $error->msg = lang($msg_indx_prefix . $code); - $error->retval = $retval; - - return $error; + return _createReturnObject($code, EXIT_ERROR, $retval); } /** @@ -111,15 +112,15 @@ function getData($result) } /** - * Returns the property fhcCode if present, otherwise null + * Returns the property code if present, otherwise null */ function getCode($result) { $code = null; - if (isset($result->fhcCode)) + if (isset($result->code)) { - $code = $result->fhcCode; + $code = $result->code; } return $code; From 1fe9a95236eb0b4264a698084a253d3b8e87446f Mon Sep 17 00:00:00 2001 From: Paolo Date: Wed, 24 Apr 2019 19:49:34 +0200 Subject: [PATCH 03/14] Removed controllers/DBTools.php and core/FHC_Model.php --- application/controllers/DBTools.php | 591 ---------------------------- application/core/FHC_Model.php | 18 - 2 files changed, 609 deletions(-) delete mode 100644 application/controllers/DBTools.php delete mode 100644 application/core/FHC_Model.php diff --git a/application/controllers/DBTools.php b/application/controllers/DBTools.php deleted file mode 100644 index 1330c7ac8..000000000 --- a/application/controllers/DBTools.php +++ /dev/null @@ -1,591 +0,0 @@ -seed_path = APPPATH.'seeds/'; - - if ($this->input->is_cli_request()) - { - $cli = true; - - $this->load->database('system'); //Use the system-Connection for DB-Manipulation - $this->config->load('migration'); - $this->load->library('migration'); - - // If not set, set it - $this->seed_path !== '' OR $this->seed_path = APPPATH.'seeds/'; - // Add trailing slash if not set - $this->seed_path = rtrim($this->seed_path, '/').'/'; - - // Load seed language - $this->lang->load('seed'); - - // initiate faker - $this->faker = \Faker\Factory::create(); - - } - else - { - $this->output->set_status_header(403, 'Migrations must be run from the CLI'); - echo "Migrations must be run from the CLI"; - exit; - } - } - - /** - * Main function index as help - * - * @return void - */ - public function index() - { - $result = "The following are the available command line interface commands\n\n"; - $result .= "php index.ci.php DBTools migrate [\"version_number\"] Run migrations. (latest/current) "; - $result .= "The version number is optional.\n"; - $result .= "php index.ci.php DBTools seed [\"file_name\"] Run the specified seed (Name of Seed. expl: 'Organisation').\n"; - - echo $result.PHP_EOL; - } - - /** - * Migrate to latest or current version - * - * @param string $version [optional] One of either "latest" or "current" - * @return void - */ - public function migrate($version = 'latest') - { - echo 'DB-Migration'; - if ($version != 'latest' && $version != 'current') - { - $this->__failed('Migration version must be either latest or current'); - } - elseif ($this->cli && !$this->migration->$version()) - { - show_error($this->migration->error_string()); - } - elseif (!$this->migration->$version()) - { - $this->__failed(); - } - - $this->__succeeded(); - } - - - /** - * Migrate to a specific version - * - * @return void - */ - public function version() - { - if ($version == 'latest' || $version == 'current') - { - $this->index($version); - exit; - } - - if (!$this->migrate->version($version)) - { - $this->__failed(); - } - - $this->__succeeded(); - } - - /** - * Roll-back to the last version before current - * - * @param int $version The migration to rollback to, defaults to previous - * @return void - */ - public function rollback($version = null) - { - if (is_null($version)) - { - $version = $this->__getVersion() ?: 1; - $version--; - } - - // Check it's definitely false, we could be rolling back to v0 - if (false === $this->migration->version($version)) - { - $this->__failed(); - } - - $this->__succeeded('rolled back'); - } - - /** - * ROLLBACK ALL THE THINGS! - * - * @return void - */ - public function uninstall() - { - $this->rollback(0); - } - - /** - * Seeds DB with Testdata - * - * @param string $name Name of the seed file. - * @return bool - */ - public function seed($name = null) - { - $seeds = $this->findSeeds(); - - if (empty($seeds)) - { - $this->_error_string = $this->lang->line('seed_none_found'); - return false; - } - - $method = 'seed'; - $pending = array(); - - - foreach ($seeds as $number => $file) - { - include_once($file); - $class = 'Seed_'.ucfirst(strtolower($this->_getSeedName(basename($file, '.php')))); - - // Validate the seed file structure - if (! class_exists($class, false)) - { - $this->_error_string = sprintf($this->lang->line('seed_class_doesnt_exist'), $class); - return false; - } - // method_exists() returns true for non-public methods, - // while is_callable() can't be used without instantiating. - // Only get_class_methods() satisfies both conditions. - elseif (! in_array($method, array_map('strtolower', get_class_methods($class)))) - { - $this->_error_string = sprintf($this->lang->line('seed_missing_'.$method.'_method'), $class); - return false; - } - - $pending[$number] = array($class, $method); - } - - // Now just run the necessary seeds - foreach ($pending as $number => $seed) - { - if (is_null($name)) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - elseif ($seed[0] == 'Seed_'.$name) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - } - } - - /** - * Retrieves list of available seed files - * - * @return array list of seed file paths sorted by version - */ - public function findSeeds() - { - $seeds = array(); - - // Load all *_*.php files in the seeds path - foreach (glob($this->seed_path.'*_*.php') as $file) - { - $name = basename($file, '.php'); - - // Filter out non-seed files - if (preg_match($this->seed_regex, $name)) - { - $number = $this->_getSeedNumber($name); - - // There cannot be duplicate seed numbers - if (isset($seeds[$number])) - { - $this->_error_string = sprintf($this->lang->line('seed_multiple_version'), $number); - show_error($this->_error_string); - } - - $seeds[$number] = $file; - } - } - - ksort($seeds); - return $seeds; - } - -/** - * Truncate DB from Testdata - * - * @param string $name Name of the seed file. - * @return bool - */ - public function truncate($name) - { - $seeds = $this->findSeeds(); - - if (empty($name)) - { - $this->_error_string = $this->lang->line('seed_none_found'); - return false; - } - - $method = 'truncate'; - $pending = array(); - - - foreach ($seeds as $number => $file) - { - include_once($file); - $class = 'Seed_'.ucfirst(strtolower($this->_getSeedName(basename($file, '.php')))); - - // Validate the seed file structure - if (! class_exists($class, false)) - { - $this->_error_string = sprintf($this->lang->line('seed_class_doesnt_exist'), $class); - return false; - } - // method_exists() returns true for non-public methods, - // while is_callable() can't be used without instantiating. - // Only get_class_methods() satisfies both conditions. - elseif (! in_array($method, array_map('strtolower', get_class_methods($class)))) - { - $this->_error_string = sprintf($this->lang->line('seed_missing_'.$method.'_method'), $class); - return false; - } - - $pending[$number] = array($class, $method); - } - - // Now just run the necessary seeds - foreach ($pending as $number => $seed) - { - if (is_null($name)) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - elseif ($seed[0] == 'Seed_'.$name) - { - log_message('debug', 'Seeding '.$method); - - $seed[0] = new $seed[0]; - call_user_func($seed); - } - } - } - /** - * Extracts the seed number from a filename - * - * @param string $seed Filename of the seed. - * @return string Numeric portion of a seed filename - */ - protected function _getSeedNumber($seed) - { - return sscanf($seed, '%[0-9]+', $number) - ? $number : '0'; - } - /** - * Extracts the seed class name from a filename - * - * @param string $seed Filename of the seed. - * @return string text portion of a migration filename - */ - protected function _getSeedName($seed) - { - $parts = explode('_', $seed); - array_shift($parts); - return implode('_', $parts); - } - - /** - * Yay, it worked! Tell the user. - * - * @param string $task What did we just do? We... - * @return void - */ - private function __succeeded($task = 'migrated') - { - $version = $this->__getVersion(); - exit('Successfully '.$task.' to version '.$version); - } - - /** - * Output an error message when it all goes tits up - * - * @param string $message Error to output (default to CI's migration error) - * @return void - */ - private function __failed($message = null) - { - $message = $message ?: $this->migration->error_string(); - show_error($message); - } - - /** - * Carbon copy of parent::__getVersion, but that's protected. - * - * @return int Currently installed migration number - */ - private function __getVersion() - { - $row = $this->db->get($this->config->item('migration_table'))->row(); - return $row ? $row->version : 0; - } - - /** - * Check DB for different things like permissions or roles - * - * @param string $action What to check. - * @return void - */ - public function check($action = 'schema') - { - echo 'DB-Check'; - switch ($action) - { - // **** Permission **** - // ToDo: Check Persmissions in the bottom of this file - case 'permissions': - echo ' Permissions!'; - //$this->config->load('roles'); - foreach ($this->config->item('fhc_acl') as $b) - { - $qry = "SELECT * FROM system.tbl_berechtigung - WHERE berechtigung_kurzbz='".$b."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_berechtigung (berechtigung_kurzbz) VALUES('".$b."');"; - - if($this->db->query($qry_insert)) - { - echo '
Recht '.$b.' hinzugefügt'; - $neue=true; - } - else - echo '
Fehler: Recht '.$b.' hinzufügen nicht möglich'; - } - else - echo "- $b -"; - } - } - break; - // **** Roles **** - case 'roles': - echo ' Roles!'; - $this->config->load('roles'); - foreach ($this->config->item('roles') as $role) - { - echo "\n\n".'Check role '.$role['rolle_kurzbz']; - $qry = "SELECT * FROM system.tbl_rolle - WHERE rolle_kurzbz='".$role['rolle_kurzbz']."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_rolle(rolle_kurzbz, beschreibung) VALUES ('".$role['rolle_kurzbz']."','".$role['rolle_kurzbz']."');"; - - if($this->db->query($qry_insert)) - { - echo "\nRolle ".$role['rolle_kurzbz'].' hinzugefügt'; - $neue=true; - } - else - { - echo "\nFehler: ".$role['rolle_kurzbz'].' Rolle hinzufügen nicht möglich'; - continue; - } - } - } - - foreach ($role['berechtigung'] as $b) - { - $qry = "SELECT * FROM system.tbl_rolleberechtigung - WHERE rolle_kurzbz='".$role['rolle_kurzbz']."' - AND berechtigung_kurzbz='".$b."';"; - - if($result = $this->db->query($qry)) - { - if($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO system.tbl_rolleberechtigung (rolle_kurzbz, berechtigung_kurzbz, art) VALUES ('".$role['rolle_kurzbz']."','".$b."', 'suid');"; - - if($this->db->query($qry_insert)) - { - echo "\n".$role['rolle_kurzbz'].' -> '.$b.' hinzugefügt'; - $neue=true; - } - else - echo "\nFehler: ".$role['rolle_kurzbz'].' -> '.$b.' hinzufügen nicht möglich'; - } - else - echo "\n- $b -"; - } - } - } - break; - // **** Default **** - default: echo ' what? roles or permisssions?'; - exit(); - } - - exit('Succesfully checked!'); - } - - /** - * Create User in DB - * - * @param string $action What to check. - * @return void - */ - public function createadminuser($uid, $person_id = 1) - { - echo 'Create User!'; - $qry = "SELECT * FROM public.tbl_benutzer - WHERE uid='".$uid."';"; - if ($result = $this->db->query($qry)) - { - if ($result->num_rows($result)==0) - { - // Nicht vorhanden -> anlegen - $qry_insert="INSERT INTO public.tbl_benutzer (uid, person_id) VALUES('".$uid."', ".$person_id.");"; - if($this->db->query($qry_insert)) - echo '
User '.$uid.' angelegt'; - else - echo '
Fehler: User '.$uid.' anlegen nicht möglich!'; - // Join Role Admin - $qry_insert="INSERT INTO system.tbl_benutzerrolle (rolle_kurzbz, uid) VALUES('admin','".$uid."');"; - if($this->db->query($qry_insert)) - echo '
Rolle Admin für User '.$uid.' hinzugefügt'; - else - echo '
Rolle Admin hinzufügen für User '.$b.' hinzufügen nicht möglich'; - } - } - - exit('Succesfully created User!'); - } -} - -/* Check also this permissions: -basis/fhausweis -> Verwaltungstools für FH Ausweis – Kartentausch, Bildpruefung, Druck hinzugefügt -buchung/typen -> Verwaltung von Buchungstypen hinzugefügt -buchung/mitarbeiter -> Verwaltung von Buchungen fuer Mitarbeiter hinzugefügt -inout/incoming -> Incomingverwaltung hinzugefügt -inout/outgoing -> Outgoingverwaltung hinzugefügt -inout/uebersicht -> Verbandsanzeige fuer Incoming/Outgoing im FAS hinzugefügt -lehre/lehrfach:begrenzt -> Lehrfachverwaltung - nur aktiv aenderbar, nur aktive LF werden angezeigt hinzugefügt -lehre/pruefungsanmeldungAdmin -> Erlaubt die Verwaltung der Prüfungsanmeldungen. hinzugefügt -lehre/pruefungsbeurteilung -> Erlaubt dem Benutzer Beurteilungen zu Prüfungen einzutragen. hinzugefügt -lehre/pruefungsbeurteilungAdmin -> Erlaubt dem Benutzer für alle Prüfungen Beurteilungen einzutragen. hinzugefügt -lehre/pruefungsterminAdmin -> Recht für jeden Lektor eine Prüfung anzulegen hinzugefügt -lehre/pruefungsfenster -> Erlaubt dem Benutzer Prüfungsfenster anzulegen. hinzugefügt -lv-plan/gruppenentfernen -> Erlaut das Entfernen von Gruppen aus LVPlan vom FAS aus hinzugefügt -lv-plan/lektorentfernen -> Erlaut das Entfernen von Lektoren aus LVPlan vom FAS aus hinzugefügt -mitarbeiter/bankdaten -> Bankdaten für Mitarbeiter und Studierende anzeigen hinzugefügt -mitarbeiter/personalnummer -> Editieren der Personalnummer im FAS hinzugefügt -mitarbeiter/urlaube -> Mit diesem Recht werden im CIS die Urlaube von allen Mitarbeiter sichtbar hinzugefügt -planner -> Planner Verwaltung hinzugefügt -reihungstest -> Recht für Anzeige des Reihungstests im Vilesci hinzugefügt -sdTools -> Recht für Anzeige der SD-Tools im Vilesci hinzugefügt -soap/lv -> Recht für LV Webservice hinzugefügt -soap/lvplan -> Recht für LV-Plan Webservice hinzugefügt -soap/mitarbeiter -> Recht für Mitarbeiter-Webservice hinzugefügt -soap/ort -> Recht für Ort Webservice hinzugefügt -soap/pruefungsfenster -> Recht für Pruefungsfenster Webservice hinzugefügt -soap/student -> Recht für Student Webservice hinzugefügt -soap/studienordnung -> Recht für Studienordnung Webservice hinzugefügt -soap/benutzer -> Berechtigung für Bentutzerabfrage Addon Kontoimport hinzugefügt -soap/buchungen -> Berechtigung für Buchungsabfrage Addon Kontoimport hinzugefügt -student/bankdaten -> Bankdaten des Studenten hinzugefügt -student/anrechnung -> Anrechnungen des Studenten hinzugefügt -student/anwesenheit -> Anwesenheiten im FAS hinzugefügt -system/developer -> Anzeige zusätzlicher Developerinfos hinzugefügt -system/loginasuser -> Berechtigung zum Einloggen als anderer User hinzugefügt -vertrag/mitarbeiter -> Verwalten von Vertraegen hinzugefügt -vertrag/typen -> Verwalten von Vertragstypen hinzugefügt -wawi/berichte -> Alle Berichte anzeigen hinzugefügt -wawi/delete_advanced -> Loeschen von freigegebenen Bestellungen hinzugefügt -Webservice Berechtigungen pruefen - -soap/studienordnung/load_lva_oe->lehrveranstaltung hinzugefügt -soap/studienordnung/load->lehrveranstaltung hinzugefügt -soap/studienordnung/deleteStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/containsLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/loadStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/saveStudienplanLehrveranstaltung->studienplan hinzugefügt -soap/studienordnung/loadStudienordnung->studienordnung hinzugefügt -soap/studienordnung/delete->lvregel hinzugefügt -soap/studienordnung/save->lvregel hinzugefügt -soap/studienordnung/load->lvregel hinzugefügt -soap/studienordnung/loadLVRegelTypen->lvregel hinzugefügt -soap/studienordnung/load_lva->lehrveranstaltung hinzugefügt -soap/studienordnung/getAll->lehrtyp hinzugefügt -soap/studienordnung/getAll->organisationseinheit hinzugefügt -soap/studienordnung/getLVRegelTree->lvregel hinzugefügt -soap/studienordnung/save->studienplan hinzugefügt -soap/studienordnung/save->studienordnung hinzugefügt -soap/studienordnung/loadStudienplanSTO->studienplan hinzugefügt -soap/studienordnung/loadStudienordnungSTG->studienordnung hinzugefügt -soap/studienordnung/loadStudienordnungSTGInaktiv->studienordnung hinzugefügt -soap/studienordnung/loadStudienplan->studienplan hinzugefügt -soap/studienordnung/saveSemesterZuordnung->studienordnung hinzugefügt -soap/studienordnung/deleteSemesterZuordnung->studienordnung hinzugefügt -soap/studienordnung/getLVkompatibel->lehrveranstaltung hinzugefügt -soap/studienordnung/getLvTree->lehrveranstaltung hinzugefügt -soap/pruefungsfenster/getByStudiensemester->pruefungsfenster hinzugefügt -soap/studienordnung/exists->lvregel hinzugefügt -soap/studienordnung/saveSortierung->studienplan hinzugefügt -soap/benutzer/search->benutzer hinzugefügt -soap/buchungen/getBuchungen-> */ diff --git a/application/core/FHC_Model.php b/application/core/FHC_Model.php deleted file mode 100644 index e31ff332d..000000000 --- a/application/core/FHC_Model.php +++ /dev/null @@ -1,18 +0,0 @@ -lang->load('fhc_model'); - $this->lang->load('fhcomplete'); - } -} From 699aca74d18b59eaed7cf83deca758551bc1a5e5 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 12:09:31 +0200 Subject: [PATCH 04/14] - Changed helper and language autoload - Changed language config - Removed never used constants - Changed rest_language in rest config file - Adapted models that where extending FHC_Model - Adapted code to load hlp_return_object - Adapted code to use exit status codes constants --- application/config/autoload.php | 5 +- application/config/config.php | 2 +- application/config/constants.php | 58 ++++--------------- application/config/rest.php | 2 +- .../controllers/api/v1/CheckUserAuth.php | 2 +- application/controllers/api/v1/Test.php | 4 +- application/core/DB_Model.php | 42 +++++++------- application/core/FHC_Controller.php | 2 +- application/core/FS_Model.php | 46 +++++++-------- application/core/REST_Controller.php | 2 +- application/libraries/DmsLib.php | 2 +- application/libraries/MessageLib.php | 13 ++--- application/libraries/PhrasesLib.php | 6 +- application/libraries/VorlageLib.php | 13 ++--- application/models/CL/Messages_model.php | 4 +- application/models/person/Notiz_model.php | 32 +++++----- application/models/system/Message_model.php | 4 +- application/views/system/udf.php | 2 +- 18 files changed, 97 insertions(+), 144 deletions(-) diff --git a/application/config/autoload.php b/application/config/autoload.php index aa6a8b40a..b30845f67 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -83,8 +83,7 @@ $autoload['drivers'] = array(); | | $autoload['helper'] = array('url', 'file'); */ -//$autoload['helper'] = array(); -$autoload['helper'] = array('url', 'language', 'hlp_session'); +$autoload['helper'] = array('url'); /* | ------------------------------------------------------------------- @@ -112,7 +111,7 @@ $autoload['config'] = array(); | "codeigniter_lang.php" would be referenced as array('codeigniter'); | */ -$autoload['language'] = array('fhcomplete'); +$autoload['language'] = array(); /* | ------------------------------------------------------------------- diff --git a/application/config/config.php b/application/config/config.php index d0bca14b9..1c0993c92 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -70,7 +70,7 @@ $config['url_suffix'] = ''; | than english. | */ -$config['language'] = 'de-AT'; +$config['language'] = ''; /* |-------------------------------------------------------------------------- diff --git a/application/config/constants.php b/application/config/constants.php index 26f2d655e..77f28b830 100644 --- a/application/config/constants.php +++ b/application/config/constants.php @@ -2,47 +2,23 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); -/* -|-------------------------------------------------------------------------- -| FH-Complete constants -|-------------------------------------------------------------------------- -| -| These constants are used for internal messages. It are also be used -| and translated in the language files. -| -*/ -define('FHC_SUCCESS', 0); // General Success Message -define('FHC_ERROR', 1); // General Error Message -define('FHC_MODEL_ERROR', 2); // Model Error -define('FHC_DB_ERROR', 3); // Database Error -define('FHC_NODBTABLE', 4); // No DB-Table is set -define('FHC_NORIGHT', 5); // No rights -define('FHC_INVALIDID', 6); // Invalid or no ID (key) -define('FHC_NOPK', 7); // No primary key - /* |-------------------------------------------------------------------------- | Exit status codes |-------------------------------------------------------------------------- | | Used to indicate the conditions under which the script is exit()ing. -| While there is no universal standard for error codes, there are some -| broad conventions. Three such conventions are mentioned below, for -| those who wish to make use of them. The CodeIgniter defaults were -| chosen for the least overlap with these conventions, while still -| leaving room for others to be defined in future versions and user -| applications. | */ -define('EXIT_SUCCESS', 0); // no errors -define('EXIT_ERROR', 1); // generic error -define('EXIT_MODEL', 2); // model error -define('EXIT_CONFIG', 3); // configuration error -define('EXIT_UNKNOWN_FILE', 4); // file not found -define('EXIT_UNKNOWN_CLASS', 5); // unknown class -define('EXIT_UNKNOWN_METHOD', 6); // unknown class member -define('EXIT_USER_INPUT', 7); // invalid user input -define('EXIT_DATABASE', 8); // database error +define('EXIT_SUCCESS', 0); // no errors +define('EXIT_ERROR', 1); // generic error +define('EXIT_MODEL', 2); // model error +define('EXIT_CONFIG', 3); // configuration error +define('EXIT_UNKNOWN_FILE', 4); // file not found +define('EXIT_UNKNOWN_CLASS', 5); // unknown class +define('EXIT_UNKNOWN_METHOD', 6); // unknown class method +define('EXIT_USER_INPUT', 7); // invalid user input +define('EXIT_DATABASE', 8); // database error define('EXIT_VALIDATION_UDF', 10); // UDF validation has been failed define('EXIT_VALIDATION_UDF_MIN_VALUE', 11); // UDF validation has been failed -> MIN VALUE define('EXIT_VALIDATION_UDF_MAX_VALUE', 12); // UDF validation has been failed -> MAX VALUE @@ -52,8 +28,8 @@ define('EXIT_VALIDATION_UDF_REGEX', 15); // UDF validation has been failed -> define('EXIT_VALIDATION_UDF_REQUIRED', 16); // UDF validation has been failed -> REQUIRED define('EXIT_VALIDATION_UDF_NOT_VALID_VAL', 17); // UDF validation has been failed -> Not valid value, object or array -define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code -define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code +define('EXIT_AUTO_MIN', 1000); // lowest automatically-assigned error code +define('EXIT_AUTO_MAX', 2000); // highest automatically-assigned error code /* |-------------------------------------------------------------------------- @@ -158,18 +134,6 @@ define('PRIORITY_NORMAL', 2); define('PRIORITY_HIGH', 3); define('PRIORITY_URGENT', 4); -// Status return message codes -define('MSG_SUCCESS', 0); -define('MSG_ERROR', 1); - -define('MSG_MESSAGE_SENT', 10); -define('MSG_STATUS_UPDATE', 11); - -define('MSG_PARTICIPANT_ADDED', 30); -define('MSG_ERR_PARTICIPANT_EXISTS', 31); -define('MSG_ERR_PARTICIPANT_NONSYSTEM', 32); -define('MSG_PARTICIPANT_REMOVED', 33); - define('MSG_ERR_SUBJECT_EMPTY', 40); define('MSG_ERR_BODY_EMPTY', 41); define('MSG_ERR_TEMPLATE_NOT_FOUND', 42); diff --git a/application/config/rest.php b/application/config/rest.php index 4f3a78972..9bbbf40ef 100644 --- a/application/config/rest.php +++ b/application/config/rest.php @@ -516,4 +516,4 @@ $config['rest_ajax_only'] = FALSE; | Language file to load from the language directory | */ -$config['rest_language'] = 'en-US'; +$config['rest_language'] = 'english'; diff --git a/application/controllers/api/v1/CheckUserAuth.php b/application/controllers/api/v1/CheckUserAuth.php index 69dc9cda6..4d6522fe2 100644 --- a/application/controllers/api/v1/CheckUserAuth.php +++ b/application/controllers/api/v1/CheckUserAuth.php @@ -13,7 +13,7 @@ class CheckUserAuth extends REST_Controller // Loads helper message to manage returning messages // NOTE: loaded here because it does not extend the APIv1_Controller - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); } /** diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php index 010314013..41feb1a16 100644 --- a/application/controllers/api/v1/Test.php +++ b/application/controllers/api/v1/Test.php @@ -2,8 +2,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); -require_once APPPATH.'/libraries/REST_Controller.php'; - /** * Testing class for REST calls and authentication */ @@ -14,7 +12,7 @@ class Test extends REST_Controller parent::__construct(); // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); } /** diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 16b9f2da9..199f81162 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -1,6 +1,6 @@ dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate; @@ -100,7 +100,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -114,8 +114,8 @@ class DB_Model extends FHC_Model public function update($id, $data) { // Check class properties - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable, $id))) return $validate; @@ -148,7 +148,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -161,8 +161,8 @@ class DB_Model extends FHC_Model public function delete($id) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); $tmpId = $id; @@ -190,7 +190,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -203,8 +203,8 @@ class DB_Model extends FHC_Model public function load($id = null) { // Check class properties - if (is_null($this->pk)) return error(FHC_MODEL_ERROR, FHC_NOPK); - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); $tmpId = $id; @@ -232,7 +232,7 @@ class DB_Model extends FHC_Model public function loadWhere($where = null) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // Execute query $result = $this->db->get_where($this->dbTable, $where); @@ -245,7 +245,7 @@ class DB_Model extends FHC_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -264,7 +264,7 @@ class DB_Model extends FHC_Model public function loadTree($mainTable, $sideTables, $where = null, $sideTablesAliases = null) { // Check class properties - if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); // List of tables on which it will work $tables = array_merge(array($mainTable), $sideTables); @@ -405,7 +405,7 @@ class DB_Model extends FHC_Model || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) { - return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + return error(EXIT_MODEL, EXIT_MODEL); } $this->db->join($joinTable, $cond, $type); @@ -421,7 +421,7 @@ class DB_Model extends FHC_Model public function addOrder($field = null, $type = 'ASC') { // Check class properties and parameters - if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(EXIT_MODEL, EXIT_MODEL); $this->db->order_by($field, $type); @@ -436,7 +436,7 @@ class DB_Model extends FHC_Model public function addSelect($select, $escape = true) { // Check class properties and parameters - if (is_null($select) || $select == '') return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (is_null($select) || $select == '') return error(EXIT_MODEL, EXIT_MODEL); $this->db->select($select, $escape); @@ -461,7 +461,7 @@ class DB_Model extends FHC_Model public function addLimit($start = null, $end = null) { // Check class properties and parameters - if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(EXIT_MODEL, EXIT_MODEL); if (is_numeric($end) && $end > $start) { @@ -485,7 +485,7 @@ class DB_Model extends FHC_Model $tmpTable = trim($table); // Check parameters - if (isEmptyString($tmpTable)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + if (isEmptyString($tmpTable)) return error(EXIT_MODEL, EXIT_MODEL); if (!isEmptyString($alias)) { @@ -509,7 +509,7 @@ class DB_Model extends FHC_Model || (is_array($fields) && count($fields) == 0) || (is_string($fields) && $fields == '')) { - return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR); + return error(EXIT_MODEL, EXIT_MODEL); } $this->db->group_by($fields); @@ -772,7 +772,7 @@ class DB_Model extends FHC_Model } else { - $result = error($this->db->error(), FHC_DB_ERROR); + $result = error($this->db->error(), EXIT_DATABASE); } } diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php index 7b29b43e7..db02be3c4 100644 --- a/application/core/FHC_Controller.php +++ b/application/core/FHC_Controller.php @@ -21,7 +21,7 @@ class FHC_Controller extends CI_Controller $this->_controllerId = null; // set _controllerId as null by default // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); // Loads helper with generic utility function $this->load->helper('hlp_common'); diff --git a/application/core/FS_Model.php b/application/core/FS_Model.php index 7e2b2d7e2..bd3275110 100644 --- a/application/core/FS_Model.php +++ b/application/core/FS_Model.php @@ -1,6 +1,6 @@ filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename))) { @@ -36,7 +36,7 @@ class FS_Model extends FHC_Model } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -49,19 +49,19 @@ class FS_Model extends FHC_Model public function write($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($content)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -74,19 +74,19 @@ class FS_Model extends FHC_Model public function append($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($content)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -99,18 +99,18 @@ class FS_Model extends FHC_Model public function remove($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->remove($this->filepath, $filename) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } @@ -123,19 +123,19 @@ class FS_Model extends FHC_Model public function rename($filename, $newFilename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR); - if (is_null($newFilename)) return error(FHC_MODEL_ERROR, FHC_ERROR); + if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($newFilename)) return error(EXIT_MODEL, EXIT_ERROR); if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true) { - return success(FHC_SUCCESS); + return success(); } else { - return error(FHC_MODEL_ERROR, FHC_ERROR); + return error(EXIT_MODEL, EXIT_ERROR); } } } diff --git a/application/core/REST_Controller.php b/application/core/REST_Controller.php index 488892b60..0bcfe8276 100644 --- a/application/core/REST_Controller.php +++ b/application/core/REST_Controller.php @@ -361,7 +361,7 @@ abstract class REST_Controller extends CI_Controller { protected function early_checks() { // Loads helper message to manage returning messages - $this->load->helper('hlp_message'); + $this->load->helper('hlp_return_object'); // Loads helper with generic utility function $this->load->helper('hlp_common'); diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php index 317b02157..6b86ce7f8 100644 --- a/application/libraries/DmsLib.php +++ b/application/libraries/DmsLib.php @@ -199,7 +199,7 @@ class DmsLib if ($this->ci->db->trans_status() === false || isError($result)) { $this->ci->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while performing a delete operation', EXIT_ERROR); } else { diff --git a/application/libraries/MessageLib.php b/application/libraries/MessageLib.php index cb691ec93..0ccbfbefb 100644 --- a/application/libraries/MessageLib.php +++ b/application/libraries/MessageLib.php @@ -36,9 +36,6 @@ class MessageLib $this->_ci->load->model('system/MsgStatus_model', 'MsgStatusModel'); $this->_ci->load->model('system/Recipient_model', 'RecipientModel'); $this->_ci->load->model('system/Attachment_model', 'AttachmentModel'); - - // Loads phrases - $this->_ci->lang->load('message'); } //------------------------------------------------------------------------------------------------------------------ @@ -970,7 +967,7 @@ class MessageLib if ($this->_ci->db->trans_status() === false || isError($result)) { $this->_ci->db->trans_rollback(); - $result = $this->_error($result->msg, EXIT_ERROR); + $result = $this->_error('An error occurred while saving a message', EXIT_ERROR); } else { @@ -984,16 +981,16 @@ class MessageLib /** * Wrapper for function error */ - private function _error($retval = '', $code = null) + private function _error($retval, $code) { - return error($retval, $code, MessageLib::MSG_INDX_PREFIX); + return error($retval, $code); } /** * Wrapper for function success */ - private function _success($retval = '', $code = null) + private function _success($retval, $code = null) { - return success($retval, $code, MessageLib::MSG_INDX_PREFIX); + return success($retval, $code); } } diff --git a/application/libraries/PhrasesLib.php b/application/libraries/PhrasesLib.php index 6793f38e0..110e5b0c8 100644 --- a/application/libraries/PhrasesLib.php +++ b/application/libraries/PhrasesLib.php @@ -82,8 +82,7 @@ class PhrasesLib */ public function getPhrasentextById($phrasentext_id) { - if (isEmptyString($phrasentext_id)) - return error($this->_ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($phrasentext_id)) return error('Not a valid phrasentext_id'); return $this->_ci->PhrasentextModel->load($phrasentext_id); } @@ -170,8 +169,7 @@ class PhrasesLib */ public function parseVorlagetext($text, $data = array()) { - if (isEmptyString($text)) - return error($this->_ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($text)) return error('Not a valid text'); return $this->_ci->parser->parse_string($text, $data, true); } diff --git a/application/libraries/VorlageLib.php b/application/libraries/VorlageLib.php index 97ba591c9..d6c9d6a98 100644 --- a/application/libraries/VorlageLib.php +++ b/application/libraries/VorlageLib.php @@ -72,8 +72,7 @@ class VorlageLib */ public function getVorlagetextByVorlage($vorlage_kurzbz) { - if (isEmptyString($vorlage_kurzbz)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($vorlage_kurzbz)) return error('Not a valid vorlage_kurzbz'); $vorlage = $this->ci->VorlageStudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz)); return $vorlage; @@ -90,8 +89,7 @@ class VorlageLib */ public function loadVorlagetext($vorlage_kurzbz, $oe_kurzbz = null, $orgform_kurzbz = null, $sprache = null) { - if (isEmptyString($vorlage_kurzbz)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); + if (isEmptyString($vorlage_kurzbz)) return error('Not a valid vorlage_kurzbz'); // Try to search the template with the given vorlage_kurzbz and other parameters if present $queryParameters = array("vorlage_kurzbz" => $vorlage_kurzbz, "aktiv" => true); @@ -200,9 +198,8 @@ class VorlageLib */ public function parseVorlagetext($text, $data = array()) { - if (isEmptyString($text)) - return error($this->ci->lang->line('fhc_'.FHC_INVALIDID, false)); - $text = $this->ci->parser->parse_string($text, $data, true); - return $text; + if (isEmptyString($text)) return error('Not a valid text'); + + return $this->ci->parser->parse_string($text, $data, true); } } diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5a0a77a31..5f3f40e6d 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@ dbTable = 'public.tbl_notiz'; $this->pk = 'notiz_id'; } - + // ------------------------------------------------------------------------------------------------------ /** * Get a specialization for a prestudent @@ -20,10 +20,10 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - + return $this->NotizModel->loadWhere(array('prestudent_id' => $prestudent_id, 'titel' => $titel)); } - + /** * Remove a specialization */ @@ -31,31 +31,31 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->delete(array('notiz_id' => $notiz_id)); if (isSuccess($result)) { $result = $this->NotizzuordnungModel->delete(array('notiz_id' => $notiz_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while removing a specialization', EXIT_ERROR); } else { $this->db->trans_commit(); $result = success('Specialization successfully removed'); } - + return $result; } @@ -66,32 +66,32 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => true)); $notiz_id = $result->retval; if (isSuccess($result)) { $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'prestudent_id' => $prestudent_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while adding a specialization', EXIT_ERROR); } else { $this->db->trans_commit(); $result = success($notiz_id); } - + return $result; } @@ -122,7 +122,7 @@ class Notiz_model extends DB_Model if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error($result->msg, EXIT_ERROR); + $result = error('An error occurred while adding a note for a person', EXIT_ERROR); } else { diff --git a/application/models/system/Message_model.php b/application/models/system/Message_model.php index 764c3ae14..6f2ad01e2 100644 --- a/application/models/system/Message_model.php +++ b/application/models/system/Message_model.php @@ -151,7 +151,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } @@ -168,7 +168,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), FHC_DB_ERROR); + return error($this->db->error(), EXIT_DATABASE); } } diff --git a/application/views/system/udf.php b/application/views/system/udf.php index b2facc38c..10ba15698 100644 --- a/application/views/system/udf.php +++ b/application/views/system/udf.php @@ -31,7 +31,7 @@ { foreach ($error as $fieldError) { - echo $fieldError->msg . ' -> ' . $fieldError->retval . '
'; + echo $fieldError->code . ': ' . $fieldError->retval . '
'; } } } From 286114255e2a0fc629c51da37b7793279eaaf3c2 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 12:59:07 +0200 Subject: [PATCH 05/14] Better error messages in FS_Model --- application/core/FS_Model.php | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/application/core/FS_Model.php b/application/core/FS_Model.php index bd3275110..4081bf8f4 100644 --- a/application/core/FS_Model.php +++ b/application/core/FS_Model.php @@ -17,7 +17,7 @@ class FS_Model extends CI_Model $this->filepath = $filepath; } - /** --------------------------------------------------------------- + /** * Read data from file system * * @return array @@ -25,10 +25,10 @@ class FS_Model extends CI_Model public function read($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if (!is_null($data = $this->filesystemlib->read($this->filepath, $filename))) { @@ -36,11 +36,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while reading a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Writing data to file system * * @param string $fileContent File content @@ -49,11 +49,11 @@ class FS_Model extends CI_Model public function write($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->write($this->filepath, $filename, base64_decode($content)) === true) { @@ -61,11 +61,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while writing a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Append data to a file * * @param array $data File content @@ -74,11 +74,11 @@ class FS_Model extends CI_Model public function append($filename, $content) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($content)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($content)) return error('The given file content is not valid', EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->append($this->filepath, $filename, base64_decode($content)) === true) { @@ -86,11 +86,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while appending to a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Delete data from file system * * @param string $id Primary Key for DELETE @@ -99,10 +99,10 @@ class FS_Model extends CI_Model public function remove($filename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); if ($this->filesystemlib->remove($this->filepath, $filename) === true) { @@ -110,11 +110,11 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while removing a file', EXIT_ERROR); } } - /** --------------------------------------------------------------- + /** * Rename a file * * @param string $id Primary Key for DELETE @@ -123,11 +123,11 @@ class FS_Model extends CI_Model public function rename($filename, $newFilename) { // Check Class-Attributes - if (is_null($this->filepath)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($this->filepath)) return error('The given filepath in not valid', EXIT_ERROR); // Check method parameters - if (is_null($filename)) return error(EXIT_MODEL, EXIT_ERROR); - if (is_null($newFilename)) return error(EXIT_MODEL, EXIT_ERROR); + if (is_null($filename)) return error('The given filename is not valid', EXIT_ERROR); + if (is_null($newFilename)) return error('The given new filename is not valid', EXIT_ERROR); if ($this->filesystemlib->rename($this->filepath, $filename, $this->filepath, $newFilename) === true) { @@ -135,7 +135,7 @@ class FS_Model extends CI_Model } else { - return error(EXIT_MODEL, EXIT_ERROR); + return error('An error occurred while renaming a file', EXIT_ERROR); } } } From a0967588fbb83666f485e2ae549a9a9961f28fca Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 13:38:46 +0200 Subject: [PATCH 06/14] Better error messages in DB_Model --- application/core/DB_Model.php | 50 ++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 199f81162..36474f9d3 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -64,7 +64,7 @@ class DB_Model extends CI_Model public function insert($data) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate; @@ -114,8 +114,8 @@ class DB_Model extends CI_Model public function update($id, $data) { // Check class properties - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // If this table has UDF and the validation of them is ok if (isError($validate = $this->_manageUDFs($data, $this->dbTable, $id))) return $validate; @@ -161,8 +161,8 @@ class DB_Model extends CI_Model public function delete($id) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); $tmpId = $id; @@ -203,8 +203,8 @@ class DB_Model extends CI_Model public function load($id = null) { // Check class properties - if (is_null($this->pk)) return error(EXIT_MODEL, FHC_NOPK); - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->pk)) return error('The given primary key is not valid', EXIT_MODEL); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); $tmpId = $id; @@ -232,7 +232,7 @@ class DB_Model extends CI_Model public function loadWhere($where = null) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // Execute query $result = $this->db->get_where($this->dbTable, $where); @@ -264,7 +264,7 @@ class DB_Model extends CI_Model public function loadTree($mainTable, $sideTables, $where = null, $sideTablesAliases = null) { // Check class properties - if (is_null($this->dbTable)) return error(EXIT_MODEL, FHC_NODBTABLE); + if (is_null($this->dbTable)) return error('The given database table name is not valid', EXIT_MODEL); // List of tables on which it will work $tables = array_merge(array($mainTable), $sideTables); @@ -405,12 +405,12 @@ class DB_Model extends CI_Model || is_null($cond) || !in_array($type, array('', 'LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'))) { - return error(EXIT_MODEL, EXIT_MODEL); + return error('The joining operation type is not valid', EXIT_MODEL); } $this->db->join($joinTable, $cond, $type); - return success(true); + return success(); } /** @@ -420,12 +420,13 @@ class DB_Model extends CI_Model */ public function addOrder($field = null, $type = 'ASC') { - // Check class properties and parameters - if (is_null($field) || !in_array($type, array('ASC', 'DESC'))) return error(EXIT_MODEL, EXIT_MODEL); + // Check parameters + if (is_null($field)) return error('The field parameter is not valid', EXIT_MODEL); + if (!in_array($type, array('ASC', 'DESC'))) return error('The order type is not valid', EXIT_MODEL); $this->db->order_by($field, $type); - return success(true); + return success(); } /** @@ -435,12 +436,12 @@ class DB_Model extends CI_Model */ public function addSelect($select, $escape = true) { - // Check class properties and parameters - if (is_null($select) || $select == '') return error(EXIT_MODEL, EXIT_MODEL); + // Check parameters + if (is_null($select) || $select == '') return error('The select parameter is not valid', EXIT_MODEL); $this->db->select($select, $escape); - return success(true); + return success(); } /** @@ -461,7 +462,8 @@ class DB_Model extends CI_Model public function addLimit($start = null, $end = null) { // Check class properties and parameters - if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) return error(EXIT_MODEL, EXIT_MODEL); + if (!is_numeric($start) || (is_numeric($start) && $start <= 0)) + return error('The start parameter is not valid', EXIT_MODEL); if (is_numeric($end) && $end > $start) { @@ -472,7 +474,7 @@ class DB_Model extends CI_Model $this->db->limit($start); } - return success(true); + return success(); } /** @@ -485,7 +487,7 @@ class DB_Model extends CI_Model $tmpTable = trim($table); // Check parameters - if (isEmptyString($tmpTable)) return error(EXIT_MODEL, EXIT_MODEL); + if (isEmptyString($tmpTable)) return error('The table parameter is not valid', EXIT_MODEL); if (!isEmptyString($alias)) { @@ -494,7 +496,7 @@ class DB_Model extends CI_Model $this->db->from($tmpTable); - return success(true); + return success(); } /** @@ -509,12 +511,12 @@ class DB_Model extends CI_Model || (is_array($fields) && count($fields) == 0) || (is_string($fields) && $fields == '')) { - return error(EXIT_MODEL, EXIT_MODEL); + return error('The fields parameter is not valid', EXIT_MODEL); } $this->db->group_by($fields); - return success(true); + return success(); } /** @@ -827,7 +829,7 @@ class DB_Model extends CI_Model */ private function _manageUDFs(&$data, $schemaAndTable, $id = null) { - $manageUDFs = success(true); + $manageUDFs = success(); if ($this->hasUDF()) { From b0919a8740eca34f68ed01789ea6595017925342 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 13:52:06 +0200 Subject: [PATCH 07/14] Removed never used rdf/Basic controller --- application/controllers/rdf/Basic.php | 74 --------------------------- 1 file changed, 74 deletions(-) delete mode 100644 application/controllers/rdf/Basic.php diff --git a/application/controllers/rdf/Basic.php b/application/controllers/rdf/Basic.php deleted file mode 100644 index 0ff53a77d..000000000 --- a/application/controllers/rdf/Basic.php +++ /dev/null @@ -1,74 +0,0 @@ -load->library(array('rdf')); - $this->load->helper('form'); - } - - /** - * Load Basic View - * @return void - */ - public function index() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/basic', $d, true); - $this->load->view('home', $d); - } - - /** - * Load Sparql-View - * @return void - */ - public function sparql() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/basic_sparql', $d, true); - $this->load->view('home', $d); - } - - /** - * Load foaf-View - * @return void - */ - public function foafinfo() - { - $this->load->library('Rdf'); - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/foafinfo', $d, true); - $this->load->view('home', $d); - } - - /** - * Load foafmaker View - * @return void - */ - public function foafmaker() - { - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/foafmaker', $d, true); - $this->load->view('home', $d); - } - - /** - * Load converter View - * @return void - */ - public function converter() - { - $d['title'] = ''; - $d['content'] = $this->load->view('rdf/converter', $d, true); - $this->load->view('home', $d); - } -} From 2cf15bcd74fff17b2879c70de4e22fc8ba87000b Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 14:53:35 +0200 Subject: [PATCH 08/14] REST_Controller now loads helper hlp_session --- application/core/REST_Controller.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/core/REST_Controller.php b/application/core/REST_Controller.php index 0bcfe8276..38eda47f7 100644 --- a/application/core/REST_Controller.php +++ b/application/core/REST_Controller.php @@ -363,6 +363,9 @@ abstract class REST_Controller extends CI_Controller { // Loads helper message to manage returning messages $this->load->helper('hlp_return_object'); + // Loads helper session to manage the php session + $this->load->helper('hlp_session'); + // Loads helper with generic utility function $this->load->helper('hlp_common'); } From 97af0bdc00c314ff38ba99f965fee8790d4d4480 Mon Sep 17 00:00:00 2001 From: Paolo Date: Thu, 25 Apr 2019 17:23:39 +0200 Subject: [PATCH 09/14] Removed migrations and seeds directory --- application/migrations/001_init.php | 36 ---- application/migrations/002_pk_migrations.php | 36 ---- application/migrations/003_add_apikey.php | 60 ------- application/migrations/004_create_basedb.php | 34 ---- application/migrations/005_fhc30.php | 24 --- application/migrations/006_fhc31.php | 29 ---- application/migrations/007_fhc32.php | 29 ---- application/migrations/008_fhc33.php | 29 ---- application/seeds/001_organisation.php | 170 ------------------- application/seeds/002_studienordnung.php | 142 ---------------- application/seeds/003_person.php | 50 ------ application/seeds/004_prestudent.php | 58 ------- application/seeds/005_message.php | 55 ------ application/seeds/006_vorlage.php | 170 ------------------- 14 files changed, 922 deletions(-) delete mode 100644 application/migrations/001_init.php delete mode 100644 application/migrations/002_pk_migrations.php delete mode 100644 application/migrations/003_add_apikey.php delete mode 100644 application/migrations/004_create_basedb.php delete mode 100644 application/migrations/005_fhc30.php delete mode 100644 application/migrations/006_fhc31.php delete mode 100644 application/migrations/007_fhc32.php delete mode 100644 application/migrations/008_fhc33.php delete mode 100644 application/seeds/001_organisation.php delete mode 100644 application/seeds/002_studienordnung.php delete mode 100644 application/seeds/003_person.php delete mode 100644 application/seeds/004_prestudent.php delete mode 100644 application/seeds/005_message.php delete mode 100644 application/seeds/006_vorlage.php diff --git a/application/migrations/001_init.php b/application/migrations/001_init.php deleted file mode 100644 index 7cc9e6dad..000000000 --- a/application/migrations/001_init.php +++ /dev/null @@ -1,36 +0,0 @@ -load->database('system'); - // Schemas - echo '
'; - $this->db->query('CREATE SCHEMA IF NOT EXISTS public;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS addon;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS fue;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS lehre;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS system;'); - $this->db->query('CREATE SCHEMA IF NOT EXISTS bis;'); - } - - public function down() - { - /* $this->db->query(' - DROP SCHEMA IF EXISTS addon; - DROP SCHEMA IF EXISTS bis; - DROP SCHEMA IF EXISTS campus; - DROP SCHEMA IF EXISTS fue; - DROP SCHEMA IF EXISTS kommune; - DROP SCHEMA IF EXISTS lehre; - DROP SCHEMA IF EXISTS public; - DROP SCHEMA IF EXISTS sync; - DROP SCHEMA IF EXISTS system; - DROP SCHEMA IF EXISTS testtool; - DROP SCHEMA IF EXISTS wawi; - ');*/ - } -} \ No newline at end of file diff --git a/application/migrations/002_pk_migrations.php b/application/migrations/002_pk_migrations.php deleted file mode 100644 index d378b2a01..000000000 --- a/application/migrations/002_pk_migrations.php +++ /dev/null @@ -1,36 +0,0 @@ -startUP(); - - $this->addPrimaryKey( - "public", - "ci_migrations", - "pk_migrations", - array("version") - ); - - $this->endUP(); - } - - public function down() - { - $this->startDown(); - - $this->execQuery('ALTER TABLE ci_migrations DROP CONSTRAINT pk_migrations'); - - $this->endDown(); - } -} \ No newline at end of file diff --git a/application/migrations/003_add_apikey.php b/application/migrations/003_add_apikey.php deleted file mode 100644 index c44d43b4f..000000000 --- a/application/migrations/003_add_apikey.php +++ /dev/null @@ -1,60 +0,0 @@ -startUP(); - - // Create table public.ci_apikey - $fields = array( - "apikey_id" => array( - "type" => "serial" - ), - "key" => array( - "type" => "varchar(100)", - "null" => false - ), - "level" => array( - "type" => "integer", - "null" => true - ), - "ignore_limits" => array( - "type" => "integer", - "null" => true - ), - "date_created" => array( - "type" => "date DEFAULT NOW()", - "null" => true - ) - ); - $this->createTable("public", "ci_apikey", $fields); - $this->addPrimaryKey( - "public", - "ci_apikey", - "pk_ci_apikey", - array("apikey_id") - ); - $this->grantTable(array("SELECT"), "public", "ci_apikey", "vilesci"); - - $this->endUP(); - } - - public function down() - { - $this->startDown(); - - $this->dropTable("public", "ci_apikey"); - - $this->endDown(); - } -} \ No newline at end of file diff --git a/application/migrations/004_create_basedb.php b/application/migrations/004_create_basedb.php deleted file mode 100644 index 5170bfec1..000000000 --- a/application/migrations/004_create_basedb.php +++ /dev/null @@ -1,34 +0,0 @@ -load->database('system'); - if (!$this->db->table_exists('tbl_person')) - { - $this->load->helper('file'); - - $sqlfile = read_file('./system/fhcomplete3.0.sql'); - if (!$this->db->simple_query($sqlfile)) - { - echo "Error creating Basis DB-Schema!"; - } - } - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/005_fhc30.php b/application/migrations/005_fhc30.php deleted file mode 100644 index 96d366920..000000000 --- a/application/migrations/005_fhc30.php +++ /dev/null @@ -1,24 +0,0 @@ -

Update to FHC 3.0


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.0.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP TABLE fue.tbl_scrumteam;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienordnung;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienordnung_semester;'); - $this->db->simple_query('DROP TABLE lehre.tbl_studienplan;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/006_fhc31.php b/application/migrations/006_fhc31.php deleted file mode 100644 index 5264bada1..000000000 --- a/application/migrations/006_fhc31.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.1


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.1.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/007_fhc32.php b/application/migrations/007_fhc32.php deleted file mode 100644 index 2da5d429c..000000000 --- a/application/migrations/007_fhc32.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.2


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.2.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/migrations/008_fhc33.php b/application/migrations/008_fhc33.php deleted file mode 100644 index bd4d7a040..000000000 --- a/application/migrations/008_fhc33.php +++ /dev/null @@ -1,29 +0,0 @@ -

Update to FHC 3.3


'; - $this->db=$this->load->database('system', true); - $db = new basis_db($this); - require_once('./system/dbupdate_3.3.php'); - } - - public function down() - { - /*$this->db->simple_query('DROP SCHEMA bis;'); - $this->db->simple_query('DROP SCHEMA campus;'); - $this->db->simple_query('DROP SCHEMA fue;'); - $this->db->simple_query('DROP SCHEMA kommune;'); - $this->db->simple_query('DROP SCHEMA lehre;'); - $this->db->simple_query('DROP SCHEMA sync;'); - $this->db->simple_query('DROP SCHEMA system;'); - $this->db->simple_query('DROP SCHEMA testtool;'); - $this->db->simple_query('DROP SCHEMA wawi;');*/ - } -} \ No newline at end of file diff --git a/application/seeds/001_organisation.php b/application/seeds/001_organisation.php deleted file mode 100644 index f19599b80..000000000 --- a/application/seeds/001_organisation.php +++ /dev/null @@ -1,170 +0,0 @@ -fhc =& get_instance(); - $this->fhc->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel'); - - $pre = 'INSERT INTO public.tbl_organisationseinheit VALUES ('; - $post = '; '; - - //$sql .= "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Seminar'); "; - $sql = "INSERT INTO public.tbl_organisationseinheittyp VALUES ('Lehrgang'); "; - $sql .= "INSERT INTO public.tbl_studiengangstyp VALUES ('d', 'Diplom'); "; - - $sql .= "$pre 'fhstp', NULL, 'Fachhochschule St. Pölten', 'Erhalter', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'depcon', 'fhstp', 'Studienzentrum', 'Studienzentrum', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'depwi', 'depcon', 'Medien und Wirtschaft', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL)$post"; - $sql .= "$pre 'lmsc', 'depwi', 'LMSC', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depgus', 'depcon', 'Gesundheit', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ldem', 'depgus', 'LDEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depsoz', 'depcon', 'Soziales', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbz', 'depsoz', 'LSBZ', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bum', 'depwi', 'BUM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmom', 'depwi', 'LMOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmmo', 'depwi', 'LMMO', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmem', 'depwi', 'LMEM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bdi', 'depgus', 'BDI', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsom', 'depsoz', 'LSOM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'laet', 'depgus', 'LAET', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bpt', 'depgus', 'BPT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depet', 'depcon', 'Bahntechnologie und Mobilität', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mbm', 'depet', 'MBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmk', 'depwi', 'BMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'deptech', 'depcon', 'Medien und Digitale Technologien', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levd', 'deptech', 'LEVD', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmt', 'deptech', 'BMT', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsma', 'depsoz', 'LSMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levm', 'depwi', 'LEVM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dso', 'depsoz', 'DSO', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmev', 'depwi', 'LMEV', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'levt', 'deptech', 'LEVT', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lcma', 'depwi', 'LCMA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpmf', 'deptech', 'LPMF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mdh', 'deptech', 'MDH', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lafg', 'deptech', 'LAFG', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpwk', 'deptech', 'LPWK', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lwkf', 'deptech', 'LWKF', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bdb', 'depwi', 'BDB', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dtm', 'deptech', 'DTM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dmm', 'depwi', 'DMM', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'dcs', 'deptech', 'DCS', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bid', 'deptech', 'BID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lvjg', 'depwi', 'LVJG', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lrdm', 'depwi', 'LRDM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lptm', 'deptech', 'LPTM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mid', 'deptech', 'MID', 'Studiengang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lebs', 'depet', 'LEBS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'depit', 'depcon', 'Informatik und Security', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mis', 'depit', 'MIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bmm', 'depwi', 'BMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bso', 'depsoz', 'BSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mmm', 'depwi', 'MMM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'msa', 'depsoz', 'MSA', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lfmr', 'depsoz', 'LFMR', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lspm', 'depsoz', 'LSPM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mso', 'depsoz', 'MSO', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbl', 'depsoz', 'LSBL', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbm', 'depsoz', 'LSBM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bbm', 'depet', 'BBM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mdm', 'deptech', 'MDM', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mmk', 'depwi', 'MMK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bse', 'deptech', 'BSE', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lspa', 'depsoz', 'LSPA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ltti', 'depet', 'LTTI', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lcmm', 'depwi', 'LCMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lmcm', 'depwi', 'LMCM', 'Lehrgang', false, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lits', 'depit', 'LITS', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bis', 'depit', 'BIS', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bgk', 'depgus', 'BGK', 'Studiengang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lfea', 'depet', 'LFEA', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsak', 'depsoz', 'LSAK', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lksp', 'depsoz', 'LKSP', 'Seminar', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lpvp', 'depgus', 'LPVP', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'latm', 'deptech', 'LATM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lftm', 'deptech', 'LFTM', 'Lehrgang', true, false, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsmm', 'depsoz', 'LSMM', 'Lehrgang', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lsbt', 'depet', 'LSBT', 'Seminar', true, true, NULL, NULL, true, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'gw', 'depgus', 'Institut für Gesundheitswissenschaften', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsc', 'fhstp', 'Services', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhshsm', 'fhsc', 'Services für Hochschulmanagement und -Organisation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'peui', 'fhshsm', 'Programmentwicklung und Innovation', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'pers_recht', 'fhshsm', 'Personal und Recht', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsl', 'fhsc', 'Services für Lehre', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'skill', 'fhsl', 'SKILL (Service- und Kompetenzzentrum für Innovatives Lehren und Lernen)', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mkt', 'fhshsm', 'Marketing und Unternehmenskommunikation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'nsc', 'fhshsm', 'IT und Infrastruktur', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'qm', 'fhshsm', 'Qualitätsmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'frw', 'fhshsm', 'Finanzwesen und Controlling', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'bibl', 'fhshsm', 'Bibliothek', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fhsfwt', 'fhsc', 'Services für Forschung und Wissenstransfer', 'Abteilung', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'csc', 'fhshsm', 'Campus Service Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'acc', 'fhshsm', 'Alumni und Career Center', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'luso', 'fhsl', 'Lehr- und Studienorganisation', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'fh_kollegium', 'fhstp', 'FH-Kollegium', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ro', 'fhsfwt', 'Forschung und Wissenstransfer', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'io', 'fhsfwt', 'International Office', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'recht', 'pers_recht', 'Recht', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'lppm', 'deptech', 'LPPM', 'Lehrgang', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mi', 'deptech', 'Medieninformatik', 'Institut', false, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'ia', 'depsoz', 'Ilse Arlt Institut für Soziale Inklusionsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'icmt', 'deptech', 'Institut für CreativeMediaTechnologies', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'gf', 'fhstp', 'Geschäftsführung', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'sf', 'depit', 'Institut für IT Sicherheitsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'mw', 'depwi', 'Institut für Medienwirtschaft', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'crvg', 'depet', 'Carl Ritter von Ghega Institut für integrierte Mobilitätsforschung', 'Institut', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'hsm', 'fhstp', 'Hochschulmanagement', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'cr', 'fhstp', 'Campus Radio', 'Abteilung', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'abfctv', 'deptech', 'Ausbildungsfernsehen c-tv', 'Abteilung', true, false, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - $sql .= "$pre 'jrz', 'depit', 'Josef Ressel-Zentrum für konsolidierte Erkennung gezielter Angriffe', 'Studienzentrum', true, true, NULL, NULL, false, NULL, NULL, NULL, NULL) $post"; - - // Studiengaenge - $pre = 'INSERT INTO public.tbl_studiengang VALUES '; - $post = '; '; - - $sql .= "$pre (3, 'bum', 'BUM', 'b', 'BUM', 'BUM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (4, 'bdi', 'BDI', 'b', 'BDI', 'BDI', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (5, 'bpt', 'BPT', 'b', 'BPT', 'BPT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (6, 'mbm', 'MBM', 'm', 'MBM', 'MBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (7, 'bmk', 'BMK', 'b', 'BMK', 'BMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (8, 'bmt', 'BMT', 'b', 'BMT', 'BMT', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (9, 'dso', 'DSO', 'd', 'DSO', 'DSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (10, 'mdh', 'MDH', 'm', 'MDH', 'MDH', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (11, 'bdb', 'BDB', 'b', 'BDB', 'BDB', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (12, 'dtm', 'DTM', 'd', 'DTM', 'DTM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (13, 'dmm', 'DMM', 'd', 'DMM', 'DMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (14, 'dcs', 'DCS', 'd', 'DCS', 'DCS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (15, 'bid', 'BID', 'b', 'BID', 'BID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (16, 'mid', 'MID', 'm', 'MID', 'MID', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (17, 'mis', 'MIS', 'm', 'MIS', 'MIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (18, 'bmm', 'BMM', 'b', 'BMM', 'BMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (19, 'bso', 'BSO', 'b', 'BSO', 'BSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (20, 'mmm', 'MMM', 'm', 'MMM', 'MMM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (21, 'msa', 'MSA', 'm', 'MSA', 'MSA', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (22, 'mso', 'MSO', 'm', 'MSO', 'MSO', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (23, 'bbm', 'BBM', 'b', 'BBM', 'BBM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (24, 'mdm', 'MDM', 'm', 'MDM', 'MDM', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (25, 'mmk', 'MMK', 'm', 'MMK', 'MMK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (26, 'bse', 'BSE', 'b', 'BSE', 'BSE', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (27, 'bis', 'BIS', 'b', 'BIS', 'BIS', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - $sql .= "$pre (28, 'bgk', 'BGK', 'b', 'BGK', 'BGK', NULL, NULL, NULL, NULL, NULL, NULL, 5, NULL, NULL, NULL, NULL, NULL, NULL, true, NULL, 'VZ')$post"; - - - $this->fhc->db->query($sql); - echo PHP_EOL; - - } - - public function truncate() - { - //$this->db->query('EMPTY TABLE public.person;'); - } -} - diff --git a/application/seeds/002_studienordnung.php b/application/seeds/002_studienordnung.php deleted file mode 100644 index fbe66f6a1..000000000 --- a/application/seeds/002_studienordnung.php +++ /dev/null @@ -1,142 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 25) - { - // Studienordnung - echo "Seeding about $limit Studienordnungen
"; - $data = array('studiengang_kz' =>3, 'bezeichnung' => 'BUM-WS2016-VZ'); - $res = $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - if (! $res) - die($res); - else - $studienordnung_id = $this->fhc->db->insert_id(); - $data = array('studiengang_kz' =>4, 'bezeichnung' => 'BDI-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>5, 'bezeichnung' => 'BPT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>6, 'bezeichnung' => 'MBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>7, 'bezeichnung' => 'BMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>8, 'bezeichnung' => 'BMT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>9, 'bezeichnung' => 'DSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>10, 'bezeichnung' => 'MDH-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>11, 'bezeichnung' => 'BDB-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>12, 'bezeichnung' => 'DTM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>13, 'bezeichnung' => 'DMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>14, 'bezeichnung' => 'DCS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>15, 'bezeichnung' => 'BID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>16, 'bezeichnung' => 'MID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>17, 'bezeichnung' => 'MIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>18, 'bezeichnung' => 'BMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>19, 'bezeichnung' => 'BSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>20, 'bezeichnung' => 'MMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>21, 'bezeichnung' => 'MSA-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>22, 'bezeichnung' => 'MSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>23, 'bezeichnung' => 'BBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>24, 'bezeichnung' => 'MDM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>25, 'bezeichnung' => 'MMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>26, 'bezeichnung' => 'BSE-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>27, 'bezeichnung' => 'BIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - $data = array('studiengang_kz' =>28, 'bezeichnung' => 'BGK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienordnung', $data); - - //Studienplan - echo "Seeding about $limit Studienplaene
"; - $data = array('studienordnung_id' => $studienordnung_id, 'bezeichnung' => 'BUM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+1, 'bezeichnung' => 'BDI-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+2, 'bezeichnung' => 'BPT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+3, 'bezeichnung' => 'MBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+4, 'bezeichnung' => 'BMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+5, 'bezeichnung' => 'BMT-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+6, 'bezeichnung' => 'DSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+7, 'bezeichnung' => 'MDH-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+8, 'bezeichnung' => 'BDB-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+9, 'bezeichnung' => 'DTM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' => $studienordnung_id+10, 'bezeichnung' => 'DMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+11, 'bezeichnung' => 'DCS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+12, 'bezeichnung' => 'BID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+13, 'bezeichnung' => 'MID-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+14, 'bezeichnung' => 'MIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+15, 'bezeichnung' => 'BMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+16, 'bezeichnung' => 'BSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+17, 'bezeichnung' => 'MMM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+18, 'bezeichnung' => 'MSA-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+19, 'bezeichnung' => 'MSO-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+20, 'bezeichnung' => 'BBM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+21, 'bezeichnung' => 'MDM-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+22, 'bezeichnung' => 'MMK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+23, 'bezeichnung' => 'BSE-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+24, 'bezeichnung' => 'BIS-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - $data = array('studienordnung_id' =>$studienordnung_id+25, 'bezeichnung' => 'BGK-WS2016-VZ'); - $this->fhc->db->insert('lehre.tbl_studienplan', $data); - - // Studienplaene - - - echo PHP_EOL; - - } - - public function truncate() - { - echo "Truncating Studienordnungen and Studienplaene!"; - $this->fhc->db->query('DELETE FROM lehre.tbl_studienplan WHERE studienordnung_id>1;'); - $this->fhc->db->query('DELETE FROM lehre.tbl_studienordnung WHERE studienordnung_id>1;'); - } -} - diff --git a/application/seeds/003_person.php b/application/seeds/003_person.php deleted file mode 100644 index 511bffb02..000000000 --- a/application/seeds/003_person.php +++ /dev/null @@ -1,50 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 200) - { - echo "Seeding $limit persons "; - - for ($i = 0; $i < $limit; $i++) - { - echo "."; - $data = array( - // 'username' => $this->faker->unique()->userName, // get a unique nickname - 'vorname' => $this->fhc->faker->firstName, - 'vornamen' => $this->fhc->faker->firstName, - 'nachname' => $this->fhc->faker->lastName, - //'address' => $this->faker->streetAddress, - 'gebort' => $this->fhc->faker->city, - //'state' => $this->faker->state, - //'country' => $this->faker->country, - //'postcode' => $this->faker->postcode, - //'email' => $this->faker->email, - //'email_verified' => mt_rand(0, 1) ? '0' : '1', - //'phone' => $this->faker->phoneNumber, - 'gebdatum' => $this->fhc->faker->dateTimeThisCentury->format('Y-m-d H:i:s'), - //'registration_date' => $this->faker->dateTimeThisYear->format('Y-m-d H:i:s'), - //'ip_address' => mt_rand(0, 1) ? $this->faker->ipv4 : $this->faker->ipv6, - ); - - $this->fhc->db->insert('public.tbl_person', $data); - } - - echo PHP_EOL; - - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.tbl_person WHERE person_id>2;'); - } -} - diff --git a/application/seeds/004_prestudent.php b/application/seeds/004_prestudent.php deleted file mode 100644 index 7be4e8651..000000000 --- a/application/seeds/004_prestudent.php +++ /dev/null @@ -1,58 +0,0 @@ -fhc =& get_instance(); - } - - public function seed($limit = 25) - { - echo "Seeding $limit prestudents "; - - $person = $this->fhc->db->query('SELECT person_id FROM public.tbl_person WHERE person_id>2 AND person_id%5!=0 LIMIT 100;'); - $studplan = $this->fhc->db->query('SELECT oe_kurzbz, studiengang_kz, studienplan_id from public.tbl_studiengang JOIN lehre.tbl_studienordnung USING (studiengang_kz) JOIN lehre.tbl_studienplan USING (studienordnung_id) LIMIT 100;'); - $studrows = $studplan->num_rows(); - $studplan = $studplan->result(); - - $i = 0; - foreach ($person->result() as $p) - { - $studrow = $i % $studrows; - - // Prestudent - $data = array( - 'person_id' => $p->person_id, - 'aufmerksamdurch_kurzbz' => 'k.A.', - 'studiengang_kz' => $studplan[$studrow]->studiengang_kz - ); - $this->fhc->db->insert('public.tbl_prestudent',$data); - $id = $this->fhc->db->insert_id(); - - // Prestudentstatus - $data = array( - 'prestudent_id' => $id, - 'status_kurzbz' => 'Interessent', - 'studiensemester_kurzbz' => 'WS2016', - 'datum' => 'now()', - 'studienplan_id' => $studplan[$studrow]->studienplan_id - ); - $this->fhc->db->insert('public.tbl_prestudentstatus',$data); - - echo "."; - if (++$i>$limit) - break; - } - - echo PHP_EOL; - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.tbl_prestudent;'); - } -} - diff --git a/application/seeds/005_message.php b/application/seeds/005_message.php deleted file mode 100644 index 8e6d6b50e..000000000 --- a/application/seeds/005_message.php +++ /dev/null @@ -1,55 +0,0 @@ -fhc =& get_instance(); - $this->fhc->load->helper('fhc'); - } - - public function seed($limit = 50) - { - echo "Seeding $limit messages "; - // fetch some persons - $db = $this->fhc->db->query('SELECT person_id FROM public.tbl_person LIMIT 100;'); - $person = $db->result(); - $num_persons = $db->num_rows(); - - for ($i = 0; $i < $limit; $i++) - { - echo "."; - - $data = array - ( - 'subject' => $this->fhc->faker->sentence(4, true), - 'body' => $this->fhc->faker->text(400), - 'person_id' => $person[$i%$num_persons]->person_id - ); - $this->fhc->db->insert('public.tbl_msg_message', $data); - $message_id = $this->fhc->db->insert_id(); - - $data = array - ( - 'message_id' => $message_id, - 'person_id' => $person[$i%($num_persons-1)+1]->person_id, - 'token' => generateToken(), - 'insertvon' => 'seed' - ); - $recipient = $this->fhc->db->insert('public.tbl_msg_recipient', $data); - if (!$recipient) - show_error($recipient); - } - - echo PHP_EOL; - - } - - public function truncate() - { - $this->fhc->db->query('DELETE FROM public.msg_message;'); - } -} diff --git a/application/seeds/006_vorlage.php b/application/seeds/006_vorlage.php deleted file mode 100644 index e52b5d8df..000000000 --- a/application/seeds/006_vorlage.php +++ /dev/null @@ -1,170 +0,0 @@ -fhc =& get_instance(); - } - - public function seed() - { - echo "Seeding Standard templates (Vorlage) "; - // OEen ohne Eltern holen - $query = 'SELECT oe_kurzbz FROM public.tbl_organisationseinheit WHERE oe_parent_kurzbz IS NULL;'; - $oe = $this->fhc->db->query($query)->result(); - - // ************** Mail Registration Conf ****************** - // Insert Template MailRegistrationConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailRegistrationConfirmation', 'eMail zur Bestätigung der Registrierung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"code\": { \"type\": \"string\", \"description\": \"Accesscode\", \"minLength\": 6, \"default\": \"1q2w3e4r5t6z7u8i9o0\" }, \"link\": { \"type\": \"string\", \"description\": \"LoginURL\", \"minLength\": 6, \"default\": \"https://demo.fhcomplete.org/addons/aufnahme/cis/index.php/\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailRegistrationConfirmation!"; - - // Insert Vorlagetext for MailRegistration - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailRegistrationConfirmation', 0, 1, '

Vielen Dank für Ihre Anmeldung!

-

Bitte klicken Sie folgenden Link, um Ihre Anmeldung zu bestätigen:
{link}

-

Ihre Anmeldedaten:
-Code: {code}
-eMail: {eMailAdresse}

-

Mit freundlichen Grüßen,
FH Complete

', '$o->oe_kurzbz','German','Registration'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailRegistrationConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - // ************** Mail Application Conf ****************** - // Insert Template MailApplicationConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailApplicationConfirmation', 'eMail zur Bestätigung der Bewerbung', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Max\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Mustermann\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Medientechnik\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailApplicationConfirmation!"; - - // Insert Vorlagetext for MailApplicationConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailApplicationConfirmation', 0, 1, '

Sehr geehrter Herr {vorname} {nachname}!

-

Wir freuen uns über Ihre Bewerbung für das Studium {typ} {studiengang} an unserer Fachhochschule und bestätigen den Erhalt Ihrer Bewerbungsunterlagen. Ihre Bewerbung wird von uns bearbeitet und die Zugangsvoraussetzungen geprüft. Im Falle von Unklarheiten melden wir uns bei Ihnen.

-

Über die endgültige Aufnahme wird nach Abschluss des Aufnahmeverfahrens entschieden. - Bitte melden Sie sich für einen Aufnahmetermin an, sofern Sie das noch nicht erledigt haben.

-

Bei Fragen stehen wir Ihnen gerne zur Verfügung!

-

Mit freundlichen Grüßen
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
-
- ________________________ -
-

Dear {vorname} {nachname}!

-

Thank you for your application for  the degree program {typ} {studiengang} at our University, which we hereby confirm. Your application is currently being processed and the admission requirements checked. We will contact you if something is not clear. - Decisions concerning admission will be made after the application process has been finalized. We would ask you to register for an admission date if you have not already done so.

-

In the event of any questions, please do not hesitate to contact: -

Yours sincerely,
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
', '$o->oe_kurzbz','German','Registrierung'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailApplicationConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - // ************** Mail Appointment Conf ****************** - // Insert Template MailAppointmentConfirmation - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailAppointmentConfirmation', 'eMail zur Bestätigung des Aufnahmetermins', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"termin\": { \"type\": \"string\", \"description\": \"Aufnahmetermin\", \"minLength\": 1, \"default\": \"Dummytermin:11.22.3333, 44:55\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailAppointmentConfirmation!"; - - // Insert Vorlagetext for MailAppointmentConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailAppointmentConfirmation', 0, 1, '

Vielen Dank für Ihre Anmeldung zum Aufnahmetermin des {typ}-Studiengangs {studiengang} ({orgform})!

-

Sie haben folgenden Aufnahmetermin ausgewählt: - {termin}

-

Unser Aufnahmeverfahren besteht aus einem computergestützten, bildungsneutralen Test sowie einem Aufnahmegespräch. Informationen zum genauen Ablauf des Aufnahmetages erhalten Sie ca. eine Woche vor dem Termin per E-Mail. Bitte reservieren Sie sich aber vorerst den ganzen Tag. Die Einteilung ist abhängig von der Anzahl der BewerberInnen.

-

Wir bitten Sie, sich rechtzeitig zu Ihrem ausgewählten Termin am Fachhochschulstandort am Informationstreffpunkt im Erdgeschoß einzufinden. Die Registrierung zur Testteilnahme erfolgt jeweils 45 Min. vor Testbeginn. - Zur persönlichen Identifikation ist es erforderlich, einen aktuellen Lichtbildausweis (Führerschein oder Pass) vorzulegen.

-

Die Ergebnisse werden erst nach Abschluss des gesamten Aufnahmeverfahrens innerhalb von 14 Tagen nach dem letzten Aufnahmetermin bekannt gegeben.

-

Wir wünschen Ihnen viel Erfolg für das Aufnahmeverfahren!

- -

Bei Fragen stehen wir Ihnen gerne zur Verfügung!
- Mit freundlichen Grüßen,
- FH Complete

- - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-

Achtung!
- Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.
- Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat.', '$o->oe_kurzbz','German','Bestätigung Aufnahmetermin'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' '; - } - - - // ************** Mail Status Confirmation Interessent ****************** - // Insert Template MailStatConfirmInteressent - $query= "INSERT INTO public.tbl_vorlage(vorlage_kurzbz, bezeichnung, anmerkung, mimetype, attribute) VALUES ('MailStatConfirmInteressent', 'Zulassung zum Aufnahmeverfahren', NULL, 'text/html', '{ \"\$schema\": \"http://json-schema.org/draft-03/schema#\", \"title\": \"Person\", \"type\": \"object\", \"properties\": { \"anrede\": { \"type\": \"string\", \"enum\": [ \"Herr\", \"Frau\" ], \"default\": \"Herr\" }, \"vorname\": { \"type\": \"string\", \"description\": \"Firstname\", \"minLength\": 2, \"default\": \"Vorname\" }, \"nachname\": { \"type\": \"string\", \"description\": \"Surename\", \"minLength\": 2, \"default\": \"Nachname\" }, \"typ\": { \"type\": \"string\", \"description\": \"Studiengangstyp\", \"minLength\": 1, \"default\": \"Bachelor\" }, \"studiengang\": { \"type\": \"string\", \"description\": \"Studiengangsbezeichnung\", \"minLength\": 3, \"default\": \"Studiengang\" }, \"orgform\": { \"type\": \"string\", \"description\": \"Organisationsform\", \"minLength\": 2, \"default\": \"Vollzeit\" }, \"stgMail\": { \"type\": \"string\", \"description\": \"StudiengangsMailAdresse\", \"minLength\": 1, \"default\": \"xxx@example.com\" } }}'); - "; - if (! $this->fhc->db->simple_query($query)) - echo "Error adding Template MailAppointmentConfirmation!"; - - // Insert Vorlagetext for MailAppointmentConfirmation - foreach ($oe as $o) - { - $query = "INSERT INTO public.tbl_vorlagestudiengang(vorlage_kurzbz, studiengang_kz, version, text, oe_kurzbz, sprache, subject) VALUES ('MailStatConfirmInteressent', 0, 1, 'Sehr geehrte/r {anrede} {vorname} {nachname}, - - Sie haben die notwendigen Zugangsvoraussetzungen zum {typ}-Studiengang {studiengang} ({orgform}) erfüllt und sind nun für das Aufnahmeverfahren zugelassen. - Bitte wählen Sie Ihren gewünschten Termin in der Online Bewerbung unter dem Menüpunkt „Aufnahmetermine“ aus. - Bei Fragen stehen wir Ihnen gerne unter {stgMail} zur Verfügung! - - Mit freundlichen Grüßen, - Studiengang {studiengang} - - Fachhochschule FHComplete
- Demostrasse 15,
- 1234 Ortsname
- T: +43/555/123 456 - 200
- F: +43/555/123 456 - 339
- M: bewerbung@example.com
- I: www.example.com
-
-

Achtung!
- Antworten Sie nicht direkt auf diese Mail, da diese Mailadresse nur dem Versenden von Mails dient.
- Bitte wenden Sie sich direkt an das zuständige Studiengangssekretariat. ({stgMail})', '$o->oe_kurzbz','German','Zulassung zum Aufnahmeverfahren'); - "; - if ($this->fhc->db->simple_query($query)) - echo 'Added Tamplate MailAppointmentConfirmation for OE:'.$o->oe_kurzbz.' '; - } - echo PHP_EOL; - } - - public function truncate() - { - //$this->fhc->db->query("DELETE FROM public.tbl_vorlage WHERE mimetype='text/html';"); - } -} From 50f3b95c89f3caa3060c631622d764e276c67b2f Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 11:16:41 +0200 Subject: [PATCH 10/14] Deleted all not used models by this project and by extensions --- .../models/accounting/Aufteilung_model.php | 14 --- .../models/accounting/Bestelldetail_model.php | 14 --- .../accounting/Bestelldetailtag_model.php | 14 --- .../models/accounting/Bestellstatus_model.php | 14 --- .../models/accounting/Bestellung_model.php | 14 --- .../models/accounting/Bestellungtag_model.php | 14 --- .../models/accounting/Buchung_model.php | 14 --- .../models/accounting/Buchungstyp_model.php | 14 --- .../models/accounting/Budget_model.php | 14 --- .../models/accounting/Rechnung_model.php | 14 --- .../accounting/Rechnungsbetrag_model.php | 14 --- .../models/accounting/Rechnungstyp_model.php | 14 --- .../models/accounting/Vertrag_model.php | 14 --- .../accounting/Vertragsstatus_model.php | 14 --- .../models/accounting/Vertragstyp_model.php | 14 --- .../models/accounting/Zahlungstyp_model.php | 14 --- application/models/codex/Akadgrad_model.php | 14 --- application/models/codex/Archiv_model.php | 14 --- .../models/codex/Aufmerksamdurch_model.php | 14 --- application/models/codex/Ausbildung_model.php | 14 --- .../models/codex/Berufstaetigkeit_model.php | 14 --- .../codex/Beschaeftigungsausmass_model.php | 14 --- application/models/codex/Besqual_model.php | 14 --- .../models/codex/Bisfunktion_model.php | 14 --- application/models/codex/Bisio_model.php | 14 --- application/models/codex/Bisorgform_model.php | 14 --- .../models/codex/Bisverwendung_model.php | 14 --- application/models/codex/Bundesland_model.php | 14 --- .../models/codex/Entwicklungsteam_model.php | 14 --- application/models/codex/Gemeinde_model.php | 22 ----- application/models/codex/Hauptberuf_model.php | 14 --- application/models/codex/Lehrform_model.php | 14 --- application/models/codex/Lgartcode_model.php | 14 --- .../codex/Mobilitaetsprogramm_model.php | 14 --- application/models/codex/Nation_model.php | 14 --- application/models/codex/Note_model.php | 14 --- application/models/codex/Verwendung_model.php | 14 --- application/models/codex/Zgv_model.php | 14 --- application/models/codex/Zgvdoktor_model.php | 14 --- application/models/codex/Zgvgruppe_model.php | 13 --- application/models/codex/Zgvmaster_model.php | 14 --- application/models/codex/Zweck_model.php | 14 --- application/models/content/Content_model.php | 14 --- .../models/content/Contentchild_model.php | 14 --- .../models/content/Contentgruppe_model.php | 14 --- .../models/content/Contentlog_model.php | 14 --- .../models/content/Contentsprache_model.php | 14 --- .../models/content/Infoscreen_model.php | 14 --- application/models/content/News_model.php | 14 --- application/models/content/Template_model.php | 14 --- .../models/content/Veranstaltung_model.php | 14 --- .../content/Veranstaltungskategorie_model.php | 14 --- .../models/crm/Aufnahmeschluessel_model.php | 14 --- .../models/crm/Bewerbungstermine_model.php | 14 --- application/models/crm/Buchungstyp_model.php | 14 --- application/models/crm/Dokument_model.php | 14 --- .../models/crm/Dokumentprestudent_model.php | 71 --------------- application/models/crm/Konto_model.php | 14 --- application/models/crm/Preincoming_model.php | 14 --- .../models/crm/Preinteressent_model.php | 14 --- .../crm/Preinteressentstudiengang_model.php | 14 --- application/models/crm/Preoutgoing_model.php | 14 --- application/models/crm/Student_model.php | 48 ---------- application/models/education/Uebung_model.php | 14 --- .../models/organisation/Erhalter_model.php | 14 --- .../models/organisation/Fachbereich_model.php | 14 --- .../models/organisation/Ferien_model.php | 14 --- .../models/organisation/Lehrverband_model.php | 14 --- .../Organisationseinheittyp_model.php | 14 --- .../organisation/Semesterwochen_model.php | 14 --- .../models/organisation/Service_model.php | 14 --- .../models/organisation/Standort_model.php | 14 --- .../models/organisation/Statistik_model.php | 14 --- .../organisation/Studiengangstyp_model.php | 14 --- .../organisation/Studienordnung_model.php | 14 --- .../Studienordnungstatus_model.php | 14 --- .../organisation/Studienplatz_model.php | 14 --- .../models/person/Bankverbindung_model.php | 14 --- .../models/person/Benutzergruppe_model.php | 15 ---- .../models/person/Fotostatus_model.php | 14 --- application/models/person/Freebusy_model.php | 14 --- .../models/person/Freebusytyp_model.php | 14 --- .../models/person/Kontaktmedium_model.php | 14 --- .../models/person/Kontakttyp_model.php | 14 --- .../models/person/Notizzuordnung_model.php | 14 --- .../models/project/Aktivitaet_model.php | 14 --- .../models/project/Aufwandstyp_model.php | 14 --- .../project/Projekt_ressource_model.php | 14 --- .../models/project/Projektphase_model.php | 14 --- .../models/project/Projekttask_model.php | 14 --- .../models/project/Ressource_model.php | 14 --- .../models/project/Scrumsprint_model.php | 14 --- .../models/ressource/Betriebsmittel_model.php | 14 --- .../ressource/Betriebsmittelperson_model.php | 14 --- .../ressource/Betriebsmittelstatus_model.php | 14 --- .../ressource/Betriebsmitteltyp_model.php | 14 --- application/models/ressource/Coodle_model.php | 14 --- .../models/ressource/Erreichbarkeit_model.php | 14 --- application/models/ressource/Firma_model.php | 14 --- .../models/ressource/Firmatag_model.php | 14 --- .../models/ressource/Firmentyp_model.php | 14 --- .../models/ressource/Funktion_model.php | 14 --- .../models/ressource/Lehrmittel_model.php | 14 --- .../models/ressource/Mitarbeiter_model.php | 14 --- application/models/ressource/Ort_model.php | 23 ----- .../models/ressource/Ortraumtyp_model.php | 14 --- .../Personfunktionstandort_model.php | 14 --- .../models/ressource/Raumtyp_model.php | 14 --- .../models/ressource/Reservierung_model.php | 14 --- application/models/ressource/Stunde_model.php | 14 --- .../models/ressource/Stundenplan_model.php | 14 --- .../ressource/Zeitaufzeichnung_model.php | 14 --- .../models/ressource/Zeitsperre_model.php | 14 --- .../models/ressource/Zeitsperretyp_model.php | 14 --- .../models/ressource/Zeitwunsch_model.php | 14 --- application/models/system/App_model.php | 15 ---- .../models/system/Berechtigung_model.php | 14 --- application/models/system/Cronjob_model.php | 14 --- application/models/system/Filter_model.php | 14 --- application/models/system/Log_model.php | 14 --- .../models/system/PersonLock_model.php | 88 ------------------- application/models/system/Rolle_model.php | 14 --- .../models/system/Rolleberechtigung_model.php | 14 --- application/models/system/Server_model.php | 14 --- application/models/system/Tag_model.php | 14 --- application/models/system/Variable_model.php | 14 --- .../models/system/Webservicelog_model.php | 14 --- .../models/system/Webservicerecht_model.php | 14 --- .../models/system/Webservicetyp_model.php | 14 --- application/models/testtool/Ablauf_model.php | 14 --- application/models/testtool/Antwort_model.php | 14 --- application/models/testtool/Frage_model.php | 14 --- application/models/testtool/Gebiet_model.php | 14 --- .../models/testtool/Kategorie_model.php | 14 --- .../models/testtool/Kriterien_model.php | 14 --- .../models/testtool/Pruefling_model.php | 14 --- .../models/testtool/Vorschlag_model.php | 14 --- 137 files changed, 2101 deletions(-) delete mode 100644 application/models/accounting/Aufteilung_model.php delete mode 100644 application/models/accounting/Bestelldetail_model.php delete mode 100644 application/models/accounting/Bestelldetailtag_model.php delete mode 100644 application/models/accounting/Bestellstatus_model.php delete mode 100644 application/models/accounting/Bestellung_model.php delete mode 100644 application/models/accounting/Bestellungtag_model.php delete mode 100644 application/models/accounting/Buchung_model.php delete mode 100644 application/models/accounting/Buchungstyp_model.php delete mode 100644 application/models/accounting/Budget_model.php delete mode 100644 application/models/accounting/Rechnung_model.php delete mode 100644 application/models/accounting/Rechnungsbetrag_model.php delete mode 100644 application/models/accounting/Rechnungstyp_model.php delete mode 100644 application/models/accounting/Vertrag_model.php delete mode 100644 application/models/accounting/Vertragsstatus_model.php delete mode 100644 application/models/accounting/Vertragstyp_model.php delete mode 100644 application/models/accounting/Zahlungstyp_model.php delete mode 100644 application/models/codex/Akadgrad_model.php delete mode 100644 application/models/codex/Archiv_model.php delete mode 100644 application/models/codex/Aufmerksamdurch_model.php delete mode 100644 application/models/codex/Ausbildung_model.php delete mode 100644 application/models/codex/Berufstaetigkeit_model.php delete mode 100644 application/models/codex/Beschaeftigungsausmass_model.php delete mode 100644 application/models/codex/Besqual_model.php delete mode 100644 application/models/codex/Bisfunktion_model.php delete mode 100644 application/models/codex/Bisio_model.php delete mode 100644 application/models/codex/Bisorgform_model.php delete mode 100644 application/models/codex/Bisverwendung_model.php delete mode 100644 application/models/codex/Bundesland_model.php delete mode 100644 application/models/codex/Entwicklungsteam_model.php delete mode 100644 application/models/codex/Gemeinde_model.php delete mode 100644 application/models/codex/Hauptberuf_model.php delete mode 100644 application/models/codex/Lehrform_model.php delete mode 100644 application/models/codex/Lgartcode_model.php delete mode 100644 application/models/codex/Mobilitaetsprogramm_model.php delete mode 100644 application/models/codex/Nation_model.php delete mode 100644 application/models/codex/Note_model.php delete mode 100644 application/models/codex/Verwendung_model.php delete mode 100644 application/models/codex/Zgv_model.php delete mode 100644 application/models/codex/Zgvdoktor_model.php delete mode 100644 application/models/codex/Zgvgruppe_model.php delete mode 100644 application/models/codex/Zgvmaster_model.php delete mode 100644 application/models/codex/Zweck_model.php delete mode 100644 application/models/content/Content_model.php delete mode 100644 application/models/content/Contentchild_model.php delete mode 100644 application/models/content/Contentgruppe_model.php delete mode 100644 application/models/content/Contentlog_model.php delete mode 100644 application/models/content/Contentsprache_model.php delete mode 100644 application/models/content/Infoscreen_model.php delete mode 100644 application/models/content/News_model.php delete mode 100644 application/models/content/Template_model.php delete mode 100644 application/models/content/Veranstaltung_model.php delete mode 100644 application/models/content/Veranstaltungskategorie_model.php delete mode 100644 application/models/crm/Aufnahmeschluessel_model.php delete mode 100644 application/models/crm/Bewerbungstermine_model.php delete mode 100644 application/models/crm/Buchungstyp_model.php delete mode 100644 application/models/crm/Dokument_model.php delete mode 100644 application/models/crm/Dokumentprestudent_model.php delete mode 100644 application/models/crm/Konto_model.php delete mode 100644 application/models/crm/Preincoming_model.php delete mode 100644 application/models/crm/Preinteressent_model.php delete mode 100644 application/models/crm/Preinteressentstudiengang_model.php delete mode 100644 application/models/crm/Preoutgoing_model.php delete mode 100644 application/models/crm/Student_model.php delete mode 100644 application/models/education/Uebung_model.php delete mode 100644 application/models/organisation/Erhalter_model.php delete mode 100644 application/models/organisation/Fachbereich_model.php delete mode 100644 application/models/organisation/Ferien_model.php delete mode 100644 application/models/organisation/Lehrverband_model.php delete mode 100644 application/models/organisation/Organisationseinheittyp_model.php delete mode 100644 application/models/organisation/Semesterwochen_model.php delete mode 100644 application/models/organisation/Service_model.php delete mode 100644 application/models/organisation/Standort_model.php delete mode 100644 application/models/organisation/Statistik_model.php delete mode 100644 application/models/organisation/Studiengangstyp_model.php delete mode 100644 application/models/organisation/Studienordnung_model.php delete mode 100644 application/models/organisation/Studienordnungstatus_model.php delete mode 100644 application/models/organisation/Studienplatz_model.php delete mode 100644 application/models/person/Bankverbindung_model.php delete mode 100644 application/models/person/Benutzergruppe_model.php delete mode 100644 application/models/person/Fotostatus_model.php delete mode 100644 application/models/person/Freebusy_model.php delete mode 100644 application/models/person/Freebusytyp_model.php delete mode 100644 application/models/person/Kontaktmedium_model.php delete mode 100644 application/models/person/Kontakttyp_model.php delete mode 100644 application/models/person/Notizzuordnung_model.php delete mode 100644 application/models/project/Aktivitaet_model.php delete mode 100644 application/models/project/Aufwandstyp_model.php delete mode 100644 application/models/project/Projekt_ressource_model.php delete mode 100644 application/models/project/Projektphase_model.php delete mode 100644 application/models/project/Projekttask_model.php delete mode 100644 application/models/project/Ressource_model.php delete mode 100644 application/models/project/Scrumsprint_model.php delete mode 100644 application/models/ressource/Betriebsmittel_model.php delete mode 100644 application/models/ressource/Betriebsmittelperson_model.php delete mode 100644 application/models/ressource/Betriebsmittelstatus_model.php delete mode 100644 application/models/ressource/Betriebsmitteltyp_model.php delete mode 100644 application/models/ressource/Coodle_model.php delete mode 100644 application/models/ressource/Erreichbarkeit_model.php delete mode 100644 application/models/ressource/Firma_model.php delete mode 100644 application/models/ressource/Firmatag_model.php delete mode 100644 application/models/ressource/Firmentyp_model.php delete mode 100644 application/models/ressource/Funktion_model.php delete mode 100644 application/models/ressource/Lehrmittel_model.php delete mode 100644 application/models/ressource/Mitarbeiter_model.php delete mode 100644 application/models/ressource/Ort_model.php delete mode 100644 application/models/ressource/Ortraumtyp_model.php delete mode 100644 application/models/ressource/Personfunktionstandort_model.php delete mode 100644 application/models/ressource/Raumtyp_model.php delete mode 100644 application/models/ressource/Reservierung_model.php delete mode 100644 application/models/ressource/Stunde_model.php delete mode 100644 application/models/ressource/Stundenplan_model.php delete mode 100644 application/models/ressource/Zeitaufzeichnung_model.php delete mode 100644 application/models/ressource/Zeitsperre_model.php delete mode 100644 application/models/ressource/Zeitsperretyp_model.php delete mode 100644 application/models/ressource/Zeitwunsch_model.php delete mode 100644 application/models/system/App_model.php delete mode 100644 application/models/system/Berechtigung_model.php delete mode 100644 application/models/system/Cronjob_model.php delete mode 100644 application/models/system/Filter_model.php delete mode 100644 application/models/system/Log_model.php delete mode 100644 application/models/system/PersonLock_model.php delete mode 100644 application/models/system/Rolle_model.php delete mode 100644 application/models/system/Rolleberechtigung_model.php delete mode 100644 application/models/system/Server_model.php delete mode 100644 application/models/system/Tag_model.php delete mode 100644 application/models/system/Variable_model.php delete mode 100644 application/models/system/Webservicelog_model.php delete mode 100644 application/models/system/Webservicerecht_model.php delete mode 100644 application/models/system/Webservicetyp_model.php delete mode 100644 application/models/testtool/Ablauf_model.php delete mode 100644 application/models/testtool/Antwort_model.php delete mode 100644 application/models/testtool/Frage_model.php delete mode 100644 application/models/testtool/Gebiet_model.php delete mode 100644 application/models/testtool/Kategorie_model.php delete mode 100644 application/models/testtool/Kriterien_model.php delete mode 100644 application/models/testtool/Pruefling_model.php delete mode 100644 application/models/testtool/Vorschlag_model.php diff --git a/application/models/accounting/Aufteilung_model.php b/application/models/accounting/Aufteilung_model.php deleted file mode 100644 index bacd50404..000000000 --- a/application/models/accounting/Aufteilung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_aufteilung'; - $this->pk = 'aufteilung_id'; - } -} diff --git a/application/models/accounting/Bestelldetail_model.php b/application/models/accounting/Bestelldetail_model.php deleted file mode 100644 index dd57002d1..000000000 --- a/application/models/accounting/Bestelldetail_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestelldetail'; - $this->pk = 'bestelldetail_id'; - } -} diff --git a/application/models/accounting/Bestelldetailtag_model.php b/application/models/accounting/Bestelldetailtag_model.php deleted file mode 100644 index a760c26a2..000000000 --- a/application/models/accounting/Bestelldetailtag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestelldetailtag'; - $this->pk = array('bestelldetail_id', 'tag'); - } -} diff --git a/application/models/accounting/Bestellstatus_model.php b/application/models/accounting/Bestellstatus_model.php deleted file mode 100644 index 0f9810818..000000000 --- a/application/models/accounting/Bestellstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellstatus'; - $this->pk = 'bestellstatus_kurzbz'; - } -} diff --git a/application/models/accounting/Bestellung_model.php b/application/models/accounting/Bestellung_model.php deleted file mode 100644 index 0d0ea37f8..000000000 --- a/application/models/accounting/Bestellung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellung'; - $this->pk = 'bestellung_id'; - } -} diff --git a/application/models/accounting/Bestellungtag_model.php b/application/models/accounting/Bestellungtag_model.php deleted file mode 100644 index 77c7416f5..000000000 --- a/application/models/accounting/Bestellungtag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_bestellungtag'; - $this->pk = array('bestellung_id', 'tag'); - } -} diff --git a/application/models/accounting/Buchung_model.php b/application/models/accounting/Buchung_model.php deleted file mode 100644 index adc700dfc..000000000 --- a/application/models/accounting/Buchung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_buchung'; - $this->pk = 'buchung_id'; - } -} diff --git a/application/models/accounting/Buchungstyp_model.php b/application/models/accounting/Buchungstyp_model.php deleted file mode 100644 index 7ed47217d..000000000 --- a/application/models/accounting/Buchungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_buchungstyp'; - $this->pk = 'buchungstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Budget_model.php b/application/models/accounting/Budget_model.php deleted file mode 100644 index f425f3479..000000000 --- a/application/models/accounting/Budget_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_budget'; - $this->pk = array('kostenstelle_id', 'geschaeftsjahr_kurzbz'); - } -} diff --git a/application/models/accounting/Rechnung_model.php b/application/models/accounting/Rechnung_model.php deleted file mode 100644 index 6e5ddcf83..000000000 --- a/application/models/accounting/Rechnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnung'; - $this->pk = 'rechnung_id'; - } -} diff --git a/application/models/accounting/Rechnungsbetrag_model.php b/application/models/accounting/Rechnungsbetrag_model.php deleted file mode 100644 index 11617429c..000000000 --- a/application/models/accounting/Rechnungsbetrag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnungsbetrag'; - $this->pk = 'rechnungsbetrag_id'; - } -} diff --git a/application/models/accounting/Rechnungstyp_model.php b/application/models/accounting/Rechnungstyp_model.php deleted file mode 100644 index 3f1e0633e..000000000 --- a/application/models/accounting/Rechnungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_rechnungstyp'; - $this->pk = 'rechnungstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Vertrag_model.php b/application/models/accounting/Vertrag_model.php deleted file mode 100644 index cd4b466d6..000000000 --- a/application/models/accounting/Vertrag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertrag'; - $this->pk = 'vertrag_id'; - } -} diff --git a/application/models/accounting/Vertragsstatus_model.php b/application/models/accounting/Vertragsstatus_model.php deleted file mode 100644 index 21367b84a..000000000 --- a/application/models/accounting/Vertragsstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertragsstatus'; - $this->pk = 'vertragsstatus_kurzbz'; - } -} diff --git a/application/models/accounting/Vertragstyp_model.php b/application/models/accounting/Vertragstyp_model.php deleted file mode 100644 index 42d248217..000000000 --- a/application/models/accounting/Vertragstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_vertragstyp'; - $this->pk = 'vertragstyp_kurzbz'; - } -} diff --git a/application/models/accounting/Zahlungstyp_model.php b/application/models/accounting/Zahlungstyp_model.php deleted file mode 100644 index 5ab7350ab..000000000 --- a/application/models/accounting/Zahlungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_zahlungstyp'; - $this->pk = 'zahlungstyp_kurzbz'; - } -} diff --git a/application/models/codex/Akadgrad_model.php b/application/models/codex/Akadgrad_model.php deleted file mode 100644 index 0623ef3ab..000000000 --- a/application/models/codex/Akadgrad_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_akadgrad'; - $this->pk = 'akadgrad_id'; - } -} diff --git a/application/models/codex/Archiv_model.php b/application/models/codex/Archiv_model.php deleted file mode 100644 index 45cde5a00..000000000 --- a/application/models/codex/Archiv_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_archiv'; - $this->pk = 'archiv_id'; - } -} diff --git a/application/models/codex/Aufmerksamdurch_model.php b/application/models/codex/Aufmerksamdurch_model.php deleted file mode 100644 index 2c5f5d2c6..000000000 --- a/application/models/codex/Aufmerksamdurch_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_aufmerksamdurch'; - $this->pk = 'aufmerksamdurch_kurzbz'; - } -} diff --git a/application/models/codex/Ausbildung_model.php b/application/models/codex/Ausbildung_model.php deleted file mode 100644 index 8cadcb92d..000000000 --- a/application/models/codex/Ausbildung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_ausbildung'; - $this->pk = 'ausbildungcode'; - } -} diff --git a/application/models/codex/Berufstaetigkeit_model.php b/application/models/codex/Berufstaetigkeit_model.php deleted file mode 100644 index 59b39d775..000000000 --- a/application/models/codex/Berufstaetigkeit_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_berufstaetigkeit'; - $this->pk = 'berufstaetigkeit_code'; - } -} diff --git a/application/models/codex/Beschaeftigungsausmass_model.php b/application/models/codex/Beschaeftigungsausmass_model.php deleted file mode 100644 index 3b54fa310..000000000 --- a/application/models/codex/Beschaeftigungsausmass_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_beschaeftigungsausmass'; - $this->pk = 'beschausmasscode'; - } -} diff --git a/application/models/codex/Besqual_model.php b/application/models/codex/Besqual_model.php deleted file mode 100644 index b89cb123a..000000000 --- a/application/models/codex/Besqual_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_besqual'; - $this->pk = 'besqualcode'; - } -} diff --git a/application/models/codex/Bisfunktion_model.php b/application/models/codex/Bisfunktion_model.php deleted file mode 100644 index 72135ecc0..000000000 --- a/application/models/codex/Bisfunktion_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisfunktion'; - $this->pk = array('studiengang_kz', 'bisverwendung_id'); - } -} diff --git a/application/models/codex/Bisio_model.php b/application/models/codex/Bisio_model.php deleted file mode 100644 index 5f35aec9a..000000000 --- a/application/models/codex/Bisio_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisio'; - $this->pk = 'bisio_id'; - } -} diff --git a/application/models/codex/Bisorgform_model.php b/application/models/codex/Bisorgform_model.php deleted file mode 100644 index c489c849c..000000000 --- a/application/models/codex/Bisorgform_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisorgform'; - $this->pk = 'bisorgform_kurzbz'; - } -} diff --git a/application/models/codex/Bisverwendung_model.php b/application/models/codex/Bisverwendung_model.php deleted file mode 100644 index fa2cf84d0..000000000 --- a/application/models/codex/Bisverwendung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bisverwendung'; - $this->pk = 'bisverwendung_id'; - } -} diff --git a/application/models/codex/Bundesland_model.php b/application/models/codex/Bundesland_model.php deleted file mode 100644 index 03a4774ce..000000000 --- a/application/models/codex/Bundesland_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_bundesland'; - $this->pk = 'bundesland_code'; - } -} diff --git a/application/models/codex/Entwicklungsteam_model.php b/application/models/codex/Entwicklungsteam_model.php deleted file mode 100644 index 5cf21c23b..000000000 --- a/application/models/codex/Entwicklungsteam_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_entwicklungsteam'; - $this->pk = array('studiengang_kz', 'mitarbeiter_uid'); - } -} diff --git a/application/models/codex/Gemeinde_model.php b/application/models/codex/Gemeinde_model.php deleted file mode 100644 index c782346a0..000000000 --- a/application/models/codex/Gemeinde_model.php +++ /dev/null @@ -1,22 +0,0 @@ -dbTable = "bis.tbl_gemeinde"; - $this->pk = "gemeinde_id"; - } - - public function getGemeindeByPlz($plz) - { - $this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer"); - $this->addOrder("ortschaftsname"); - - return $this->loadWhere(array("plz" => $plz)); - } -} \ No newline at end of file diff --git a/application/models/codex/Hauptberuf_model.php b/application/models/codex/Hauptberuf_model.php deleted file mode 100644 index 7ae7ee44d..000000000 --- a/application/models/codex/Hauptberuf_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_hauptberuf'; - $this->pk = 'hauptberufcode'; - } -} diff --git a/application/models/codex/Lehrform_model.php b/application/models/codex/Lehrform_model.php deleted file mode 100644 index dc53b3085..000000000 --- a/application/models/codex/Lehrform_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_lehrform'; - $this->pk = 'lehrform_kurzbz'; - } -} diff --git a/application/models/codex/Lgartcode_model.php b/application/models/codex/Lgartcode_model.php deleted file mode 100644 index a2c09c00e..000000000 --- a/application/models/codex/Lgartcode_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_lgartcode'; - $this->pk = 'lgartcode'; - } -} diff --git a/application/models/codex/Mobilitaetsprogramm_model.php b/application/models/codex/Mobilitaetsprogramm_model.php deleted file mode 100644 index 5fd46e725..000000000 --- a/application/models/codex/Mobilitaetsprogramm_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_mobilitaetsprogramm'; - $this->pk = 'mobilitaetsprogramm_code'; - } -} diff --git a/application/models/codex/Nation_model.php b/application/models/codex/Nation_model.php deleted file mode 100644 index 239639795..000000000 --- a/application/models/codex/Nation_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_nation'; - $this->pk = 'nation_code'; - } -} \ No newline at end of file diff --git a/application/models/codex/Note_model.php b/application/models/codex/Note_model.php deleted file mode 100644 index e83ee2f48..000000000 --- a/application/models/codex/Note_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_note'; - $this->pk = 'note'; - } -} diff --git a/application/models/codex/Verwendung_model.php b/application/models/codex/Verwendung_model.php deleted file mode 100644 index 509b0388b..000000000 --- a/application/models/codex/Verwendung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_verwendung'; - $this->pk = 'verwendung_code'; - } -} diff --git a/application/models/codex/Zgv_model.php b/application/models/codex/Zgv_model.php deleted file mode 100644 index 1e1ba99ad..000000000 --- a/application/models/codex/Zgv_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgv'; - $this->pk = 'zgv_code'; - } -} diff --git a/application/models/codex/Zgvdoktor_model.php b/application/models/codex/Zgvdoktor_model.php deleted file mode 100644 index 8caf397e0..000000000 --- a/application/models/codex/Zgvdoktor_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgvdoktor'; - $this->pk = 'zgvdoktor_code'; - } -} diff --git a/application/models/codex/Zgvgruppe_model.php b/application/models/codex/Zgvgruppe_model.php deleted file mode 100644 index 69da70271..000000000 --- a/application/models/codex/Zgvgruppe_model.php +++ /dev/null @@ -1,13 +0,0 @@ -dbTable = 'bis.tbl_zgvgruppe'; - $this->pk = 'gruppe_kurzbz'; - } -} \ No newline at end of file diff --git a/application/models/codex/Zgvmaster_model.php b/application/models/codex/Zgvmaster_model.php deleted file mode 100644 index 38f8a0dcb..000000000 --- a/application/models/codex/Zgvmaster_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zgvmaster'; - $this->pk = 'zgvmas_code'; - } -} diff --git a/application/models/codex/Zweck_model.php b/application/models/codex/Zweck_model.php deleted file mode 100644 index 600e9fb40..000000000 --- a/application/models/codex/Zweck_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'bis.tbl_zweck'; - $this->pk = 'zweck_code'; - } -} diff --git a/application/models/content/Content_model.php b/application/models/content/Content_model.php deleted file mode 100644 index ee4315ebd..000000000 --- a/application/models/content/Content_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_content'; - $this->pk = 'content_id'; - } -} diff --git a/application/models/content/Contentchild_model.php b/application/models/content/Contentchild_model.php deleted file mode 100644 index 11738d144..000000000 --- a/application/models/content/Contentchild_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentchild'; - $this->pk = 'contentchild_id'; - } -} diff --git a/application/models/content/Contentgruppe_model.php b/application/models/content/Contentgruppe_model.php deleted file mode 100644 index 03efc87b1..000000000 --- a/application/models/content/Contentgruppe_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentgruppe'; - $this->pk = array('gruppe_kurzbz', 'content_id'); - } -} diff --git a/application/models/content/Contentlog_model.php b/application/models/content/Contentlog_model.php deleted file mode 100644 index 025cb94aa..000000000 --- a/application/models/content/Contentlog_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentlog'; - $this->pk = 'contentlog_id'; - } -} diff --git a/application/models/content/Contentsprache_model.php b/application/models/content/Contentsprache_model.php deleted file mode 100644 index eb7e257b2..000000000 --- a/application/models/content/Contentsprache_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_contentsprache'; - $this->pk = 'contentsprache_id'; - } -} diff --git a/application/models/content/Infoscreen_model.php b/application/models/content/Infoscreen_model.php deleted file mode 100644 index c4134ff06..000000000 --- a/application/models/content/Infoscreen_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_infoscreen'; - $this->pk = 'infoscreen_id'; - } -} diff --git a/application/models/content/News_model.php b/application/models/content/News_model.php deleted file mode 100644 index 8d636d808..000000000 --- a/application/models/content/News_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_news'; - $this->pk = 'news_id'; - } -} diff --git a/application/models/content/Template_model.php b/application/models/content/Template_model.php deleted file mode 100644 index 6f452e23c..000000000 --- a/application/models/content/Template_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_template'; - $this->pk = 'template_kurzbz'; - } -} diff --git a/application/models/content/Veranstaltung_model.php b/application/models/content/Veranstaltung_model.php deleted file mode 100644 index 48e7bc2cc..000000000 --- a/application/models/content/Veranstaltung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_veranstaltung'; - $this->pk = 'veranstaltung_id'; - } -} diff --git a/application/models/content/Veranstaltungskategorie_model.php b/application/models/content/Veranstaltungskategorie_model.php deleted file mode 100644 index 85d069735..000000000 --- a/application/models/content/Veranstaltungskategorie_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_veranstaltungskategorie'; - $this->pk = 'veranstaltungskategorie_kurzbz'; - } -} diff --git a/application/models/crm/Aufnahmeschluessel_model.php b/application/models/crm/Aufnahmeschluessel_model.php deleted file mode 100644 index df74791bb..000000000 --- a/application/models/crm/Aufnahmeschluessel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_aufnahmeschluessel'; - $this->pk = 'aufnahmeschluessel'; - } -} diff --git a/application/models/crm/Bewerbungstermine_model.php b/application/models/crm/Bewerbungstermine_model.php deleted file mode 100644 index 74326a702..000000000 --- a/application/models/crm/Bewerbungstermine_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_bewerbungstermine'; - $this->pk = 'bewerbungstermin_id'; - } -} diff --git a/application/models/crm/Buchungstyp_model.php b/application/models/crm/Buchungstyp_model.php deleted file mode 100644 index f06e45eb2..000000000 --- a/application/models/crm/Buchungstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_buchungstyp'; - $this->pk = 'buchungstyp_kurzbz'; - } -} diff --git a/application/models/crm/Dokument_model.php b/application/models/crm/Dokument_model.php deleted file mode 100644 index 7ef2be716..000000000 --- a/application/models/crm/Dokument_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_dokument'; - $this->pk = 'dokument_kurzbz'; - } -} diff --git a/application/models/crm/Dokumentprestudent_model.php b/application/models/crm/Dokumentprestudent_model.php deleted file mode 100644 index ab4764479..000000000 --- a/application/models/crm/Dokumentprestudent_model.php +++ /dev/null @@ -1,71 +0,0 @@ -dbTable = 'public.tbl_dokumentprestudent'; - $this->pk = array('prestudent_id', 'dokument_kurzbz'); - } - - /** - * setAccepted - */ - public function setAccepted($prestudent_id, $studiengang_kz) - { - $result = null; - - if (is_numeric($prestudent_id) && is_numeric($studiengang_kz)) - { - $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( - SELECT ds.dokument_kurzbz, - p.prestudent_id, - NOW() AS insertamum - FROM (SELECT DISTINCT person_id, dokument_kurzbz FROM public.tbl_akte) a - INNER JOIN public.tbl_prestudent p USING(person_id) - INNER JOIN public.tbl_dokumentstudiengang ds USING(dokument_kurzbz, studiengang_kz) - LEFT JOIN public.tbl_dokumentprestudent dp USING(dokument_kurzbz, prestudent_id) - WHERE ds.onlinebewerbung IS TRUE - AND (dp.dokument_kurzbz IS NULL AND dp.prestudent_id IS NULL) - AND p.prestudent_id = ? - AND ds.studiengang_kz = ? - )'; - - $result = $this->execQuery($query, array($prestudent_id, $studiengang_kz)); - } - - return $result; - } - - /** - * setAcceptedDocuments - */ - public function setAcceptedDocuments($prestudent_id, $dokument_kurzbz) - { - $result = null; - - if (is_numeric($prestudent_id) && is_array($dokument_kurzbz) && count($dokument_kurzbz) > 0) - { - $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( - SELECT d.dokument_kurzbz, - ? AS prestudent_id, - NOW() AS insertamum - FROM public.tbl_dokument d - WHERE d.dokument_kurzbz IN ? - AND d.dokument_kurzbz NOT IN ( - SELECT dokument_kurzbz - FROM public.tbl_dokumentprestudent - WHERE prestudent_id = ? - ) - )'; - - $result = $this->execQuery($query, array($prestudent_id, $dokument_kurzbz, $prestudent_id)); - } - - return $result; - } -} diff --git a/application/models/crm/Konto_model.php b/application/models/crm/Konto_model.php deleted file mode 100644 index 286d3189e..000000000 --- a/application/models/crm/Konto_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_konto'; - $this->pk = 'buchungsnr'; - } -} diff --git a/application/models/crm/Preincoming_model.php b/application/models/crm/Preincoming_model.php deleted file mode 100644 index f9906781f..000000000 --- a/application/models/crm/Preincoming_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preincoming'; - $this->pk = 'preincoming_id'; - } -} diff --git a/application/models/crm/Preinteressent_model.php b/application/models/crm/Preinteressent_model.php deleted file mode 100644 index bfc2a8afa..000000000 --- a/application/models/crm/Preinteressent_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preinteressent'; - $this->pk = 'preinteressent_id'; - } -} diff --git a/application/models/crm/Preinteressentstudiengang_model.php b/application/models/crm/Preinteressentstudiengang_model.php deleted file mode 100644 index 4ed665840..000000000 --- a/application/models/crm/Preinteressentstudiengang_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preinteressentstudiengang'; - $this->pk = array('preinteressent_id', 'studiengang_kz'); - } -} diff --git a/application/models/crm/Preoutgoing_model.php b/application/models/crm/Preoutgoing_model.php deleted file mode 100644 index e9e8e76fd..000000000 --- a/application/models/crm/Preoutgoing_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_preoutgoing'; - $this->pk = 'preoutgoing_id'; - } -} diff --git a/application/models/crm/Student_model.php b/application/models/crm/Student_model.php deleted file mode 100644 index 532658208..000000000 --- a/application/models/crm/Student_model.php +++ /dev/null @@ -1,48 +0,0 @@ -dbTable = 'public.tbl_student'; - $this->pk = array('student_uid'); - $this->hasSequence = false; - } - - // **** - // * Generiert die Matrikelnummer - // * FORMAT: 0710254001 - // * 07 = Jahr - // * 1/2/0 = WS/SS/incoming - // * 0254 = Studiengangskennzahl vierstellig - // * 001 = Laufende Nummer - // **** - public function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz) - { - $jahr = mb_substr($studiensemester_kurzbz, 4); - $sem = mb_substr($studiensemester_kurzbz, 0, 2); - if ($sem == 'SS') - $jahr = $jahr - 1; - $art = 0; - - $matrikelnummer = sprintf("%02d", $jahr).$art.sprintf("%04d", $studiengang_kz); - - $qry = "SELECT matrikelnr FROM public.tbl_student WHERE matrikelnr LIKE ? ORDER BY matrikelnr DESC LIMIT 1"; - - $matrikelnrres = $this->execQuery($qry, array($matrikelnummer.'%')); - - if (hasData($matrikelnrres)) - { - $max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7); - } - else - $max = 0; - - $max += 1; - return $matrikelnummer.sprintf("%03d", $max); - } -} diff --git a/application/models/education/Uebung_model.php b/application/models/education/Uebung_model.php deleted file mode 100644 index 199328225..000000000 --- a/application/models/education/Uebung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_uebung'; - $this->pk = 'uebung_id'; - } -} diff --git a/application/models/organisation/Erhalter_model.php b/application/models/organisation/Erhalter_model.php deleted file mode 100644 index 607d9ccd9..000000000 --- a/application/models/organisation/Erhalter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_erhalter'; - $this->pk = 'erhalter_kz'; - } -} diff --git a/application/models/organisation/Fachbereich_model.php b/application/models/organisation/Fachbereich_model.php deleted file mode 100644 index e69565364..000000000 --- a/application/models/organisation/Fachbereich_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_fachbereich'; - $this->pk = 'fachbereich_kurzbz'; - } -} diff --git a/application/models/organisation/Ferien_model.php b/application/models/organisation/Ferien_model.php deleted file mode 100644 index 2ade75aa4..000000000 --- a/application/models/organisation/Ferien_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_ferien'; - $this->pk = array('studiengang_kz', 'bezeichnung'); - } -} diff --git a/application/models/organisation/Lehrverband_model.php b/application/models/organisation/Lehrverband_model.php deleted file mode 100644 index 953e4b7b2..000000000 --- a/application/models/organisation/Lehrverband_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_lehrverband'; - $this->pk = array('gruppe', 'verband', 'semester', 'studiengang_kz'); - } -} diff --git a/application/models/organisation/Organisationseinheittyp_model.php b/application/models/organisation/Organisationseinheittyp_model.php deleted file mode 100644 index 6355758b6..000000000 --- a/application/models/organisation/Organisationseinheittyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_organisationseinheittyp'; - $this->pk = 'organisationseinheittyp_kurzbz'; - } -} diff --git a/application/models/organisation/Semesterwochen_model.php b/application/models/organisation/Semesterwochen_model.php deleted file mode 100644 index 32666804d..000000000 --- a/application/models/organisation/Semesterwochen_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_semesterwochen'; - $this->pk = array('studiengang_kz', 'semester'); - } -} diff --git a/application/models/organisation/Service_model.php b/application/models/organisation/Service_model.php deleted file mode 100644 index 5f692e707..000000000 --- a/application/models/organisation/Service_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_service'; - $this->pk = 'service_id'; - } -} diff --git a/application/models/organisation/Standort_model.php b/application/models/organisation/Standort_model.php deleted file mode 100644 index 382236e2f..000000000 --- a/application/models/organisation/Standort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_standort'; - $this->pk = 'standort_id'; - } -} diff --git a/application/models/organisation/Statistik_model.php b/application/models/organisation/Statistik_model.php deleted file mode 100644 index b72ac0577..000000000 --- a/application/models/organisation/Statistik_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_statistik'; - $this->pk = 'statistik_kurzbz'; - } -} diff --git a/application/models/organisation/Studiengangstyp_model.php b/application/models/organisation/Studiengangstyp_model.php deleted file mode 100644 index 9a6b5df22..000000000 --- a/application/models/organisation/Studiengangstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_studiengangstyp'; - $this->pk = 'typ'; - } -} diff --git a/application/models/organisation/Studienordnung_model.php b/application/models/organisation/Studienordnung_model.php deleted file mode 100644 index fc2e28d4b..000000000 --- a/application/models/organisation/Studienordnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienordnung'; - $this->pk = 'studienordnung_id'; - } -} diff --git a/application/models/organisation/Studienordnungstatus_model.php b/application/models/organisation/Studienordnungstatus_model.php deleted file mode 100644 index 8b6417ab1..000000000 --- a/application/models/organisation/Studienordnungstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienordnungstatus'; - $this->pk = 'status_kurzbz'; - } -} diff --git a/application/models/organisation/Studienplatz_model.php b/application/models/organisation/Studienplatz_model.php deleted file mode 100644 index 7bfd8b13b..000000000 --- a/application/models/organisation/Studienplatz_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_studienplatz'; - $this->pk = 'studienplatz_id'; - } -} diff --git a/application/models/person/Bankverbindung_model.php b/application/models/person/Bankverbindung_model.php deleted file mode 100644 index 193aad257..000000000 --- a/application/models/person/Bankverbindung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_bankverbindung'; - $this->pk = 'bankverbindung_id'; - } -} diff --git a/application/models/person/Benutzergruppe_model.php b/application/models/person/Benutzergruppe_model.php deleted file mode 100644 index e569094c4..000000000 --- a/application/models/person/Benutzergruppe_model.php +++ /dev/null @@ -1,15 +0,0 @@ -dbTable = 'public.tbl_benutzergruppe'; - $this->pk = array('gruppe_kurzbz', 'uid'); - $this->hasSequence = false; - } -} diff --git a/application/models/person/Fotostatus_model.php b/application/models/person/Fotostatus_model.php deleted file mode 100644 index eb2b43e51..000000000 --- a/application/models/person/Fotostatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_fotostatus'; - $this->pk = 'fotostatus_kurzbz'; - } -} diff --git a/application/models/person/Freebusy_model.php b/application/models/person/Freebusy_model.php deleted file mode 100644 index 01969dfc1..000000000 --- a/application/models/person/Freebusy_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_freebusy'; - $this->pk = 'freebusy_id'; - } -} diff --git a/application/models/person/Freebusytyp_model.php b/application/models/person/Freebusytyp_model.php deleted file mode 100644 index d5207850c..000000000 --- a/application/models/person/Freebusytyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_freebusytyp'; - $this->pk = 'freebusytyp_kurzbz'; - } -} diff --git a/application/models/person/Kontaktmedium_model.php b/application/models/person/Kontaktmedium_model.php deleted file mode 100644 index cc330ddd7..000000000 --- a/application/models/person/Kontaktmedium_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_kontaktmedium'; - $this->pk = 'kontaktmedium_kurzbz'; - } -} diff --git a/application/models/person/Kontakttyp_model.php b/application/models/person/Kontakttyp_model.php deleted file mode 100644 index d32cded13..000000000 --- a/application/models/person/Kontakttyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_kontakttyp'; - $this->pk = 'kontakttyp'; - } -} diff --git a/application/models/person/Notizzuordnung_model.php b/application/models/person/Notizzuordnung_model.php deleted file mode 100644 index 187a8399b..000000000 --- a/application/models/person/Notizzuordnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_notizzuordnung'; - $this->pk = 'notizzuordnung_id'; - } -} diff --git a/application/models/project/Aktivitaet_model.php b/application/models/project/Aktivitaet_model.php deleted file mode 100644 index 529040aa3..000000000 --- a/application/models/project/Aktivitaet_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_aktivitaet'; - $this->pk = 'aktivitaet_kurzbz'; - } -} diff --git a/application/models/project/Aufwandstyp_model.php b/application/models/project/Aufwandstyp_model.php deleted file mode 100644 index 2f20600ce..000000000 --- a/application/models/project/Aufwandstyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_aufwandstyp'; - $this->pk = 'aufwandstyp_kurzbz'; - } -} diff --git a/application/models/project/Projekt_ressource_model.php b/application/models/project/Projekt_ressource_model.php deleted file mode 100644 index d641556fd..000000000 --- a/application/models/project/Projekt_ressource_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projekt_ressource'; - $this->pk = 'projekt_ressource_id'; - } -} diff --git a/application/models/project/Projektphase_model.php b/application/models/project/Projektphase_model.php deleted file mode 100644 index 4980ed64b..000000000 --- a/application/models/project/Projektphase_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projektphase'; - $this->pk = 'projektphase_id'; - } -} diff --git a/application/models/project/Projekttask_model.php b/application/models/project/Projekttask_model.php deleted file mode 100644 index 64ea94089..000000000 --- a/application/models/project/Projekttask_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_projekttask'; - $this->pk = 'projekttask_id'; - } -} diff --git a/application/models/project/Ressource_model.php b/application/models/project/Ressource_model.php deleted file mode 100644 index 35eb4eb97..000000000 --- a/application/models/project/Ressource_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_ressource'; - $this->pk = 'ressource_id'; - } -} diff --git a/application/models/project/Scrumsprint_model.php b/application/models/project/Scrumsprint_model.php deleted file mode 100644 index c2c8a60a1..000000000 --- a/application/models/project/Scrumsprint_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'fue.tbl_scrumsprint'; - $this->pk = 'scrumsprint_id'; - } -} diff --git a/application/models/ressource/Betriebsmittel_model.php b/application/models/ressource/Betriebsmittel_model.php deleted file mode 100644 index 849a9199f..000000000 --- a/application/models/ressource/Betriebsmittel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittel'; - $this->pk = 'betriebsmittel_id'; - } -} diff --git a/application/models/ressource/Betriebsmittelperson_model.php b/application/models/ressource/Betriebsmittelperson_model.php deleted file mode 100644 index 924f670e0..000000000 --- a/application/models/ressource/Betriebsmittelperson_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittelperson'; - $this->pk = 'betriebsmittelperson_id'; - } -} diff --git a/application/models/ressource/Betriebsmittelstatus_model.php b/application/models/ressource/Betriebsmittelstatus_model.php deleted file mode 100644 index 7b4f70c59..000000000 --- a/application/models/ressource/Betriebsmittelstatus_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmittelstatus'; - $this->pk = 'betriebsmittelstatus_kurzbz'; - } -} diff --git a/application/models/ressource/Betriebsmitteltyp_model.php b/application/models/ressource/Betriebsmitteltyp_model.php deleted file mode 100644 index 23bec97a8..000000000 --- a/application/models/ressource/Betriebsmitteltyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'wawi.tbl_betriebsmitteltyp'; - $this->pk = 'betriebsmitteltyp'; - } -} diff --git a/application/models/ressource/Coodle_model.php b/application/models/ressource/Coodle_model.php deleted file mode 100644 index 1382bf7a0..000000000 --- a/application/models/ressource/Coodle_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_coodle'; - $this->pk = 'coodle_id'; - } -} diff --git a/application/models/ressource/Erreichbarkeit_model.php b/application/models/ressource/Erreichbarkeit_model.php deleted file mode 100644 index b16b1614f..000000000 --- a/application/models/ressource/Erreichbarkeit_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_erreichbarkeit'; - $this->pk = 'erreichbarkeit_kurzbz'; - } -} diff --git a/application/models/ressource/Firma_model.php b/application/models/ressource/Firma_model.php deleted file mode 100644 index 1b8dfb51d..000000000 --- a/application/models/ressource/Firma_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firma'; - $this->pk = 'firma_id'; - } -} diff --git a/application/models/ressource/Firmatag_model.php b/application/models/ressource/Firmatag_model.php deleted file mode 100644 index 582ea0679..000000000 --- a/application/models/ressource/Firmatag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firmatag'; - $this->pk = array('tag', 'firma_id'); - } -} diff --git a/application/models/ressource/Firmentyp_model.php b/application/models/ressource/Firmentyp_model.php deleted file mode 100644 index a9aa93705..000000000 --- a/application/models/ressource/Firmentyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_firmentyp'; - $this->pk = 'firmentyp_kurzbz'; - } -} diff --git a/application/models/ressource/Funktion_model.php b/application/models/ressource/Funktion_model.php deleted file mode 100644 index 43908167c..000000000 --- a/application/models/ressource/Funktion_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_funktion'; - $this->pk = 'funktion_kurzbz'; - } -} diff --git a/application/models/ressource/Lehrmittel_model.php b/application/models/ressource/Lehrmittel_model.php deleted file mode 100644 index b21e91764..000000000 --- a/application/models/ressource/Lehrmittel_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_lehrmittel'; - $this->pk = 'lehrmittel_kurzbz'; - } -} diff --git a/application/models/ressource/Mitarbeiter_model.php b/application/models/ressource/Mitarbeiter_model.php deleted file mode 100644 index 1e03a0ecd..000000000 --- a/application/models/ressource/Mitarbeiter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_mitarbeiter'; - $this->pk = 'mitarbeiter_uid'; - } -} diff --git a/application/models/ressource/Ort_model.php b/application/models/ressource/Ort_model.php deleted file mode 100644 index 59b213a54..000000000 --- a/application/models/ressource/Ort_model.php +++ /dev/null @@ -1,23 +0,0 @@ -dbTable = "public.tbl_ort"; - $this->pk = "ort_kurzbz"; - } - - public function getAll($raumtyp_kurzbz) - { - $this->addOrder("ort_kurzbz"); - - $this->addJoin("public.tbl_ortraumtyp", "ort_kurzbz"); - - return $this->OrtModel->loadWhere(array("raumtyp_kurzbz" => $raumtyp_kurzbz)); - } -} \ No newline at end of file diff --git a/application/models/ressource/Ortraumtyp_model.php b/application/models/ressource/Ortraumtyp_model.php deleted file mode 100644 index af0d3cb09..000000000 --- a/application/models/ressource/Ortraumtyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_ortraumtyp'; - $this->pk = array('hierarchie', 'ort_kurzbz'); - } -} diff --git a/application/models/ressource/Personfunktionstandort_model.php b/application/models/ressource/Personfunktionstandort_model.php deleted file mode 100644 index addbb760a..000000000 --- a/application/models/ressource/Personfunktionstandort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_personfunktionstandort'; - $this->pk = 'personfunktionstandort_id'; - } -} diff --git a/application/models/ressource/Raumtyp_model.php b/application/models/ressource/Raumtyp_model.php deleted file mode 100644 index afc8a7cc3..000000000 --- a/application/models/ressource/Raumtyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_raumtyp'; - $this->pk = 'raumtyp_kurzbz'; - } -} diff --git a/application/models/ressource/Reservierung_model.php b/application/models/ressource/Reservierung_model.php deleted file mode 100644 index 37d0cb376..000000000 --- a/application/models/ressource/Reservierung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_reservierung'; - $this->pk = 'reservierung_id'; - } -} diff --git a/application/models/ressource/Stunde_model.php b/application/models/ressource/Stunde_model.php deleted file mode 100644 index 05a9cddff..000000000 --- a/application/models/ressource/Stunde_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_stunde'; - $this->pk = 'stunde'; - } -} diff --git a/application/models/ressource/Stundenplan_model.php b/application/models/ressource/Stundenplan_model.php deleted file mode 100644 index be3d520b5..000000000 --- a/application/models/ressource/Stundenplan_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'lehre.tbl_stundenplan'; - $this->pk = 'stundenplan_id'; - } -} diff --git a/application/models/ressource/Zeitaufzeichnung_model.php b/application/models/ressource/Zeitaufzeichnung_model.php deleted file mode 100644 index f887a20a0..000000000 --- a/application/models/ressource/Zeitaufzeichnung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitaufzeichnung'; - $this->pk = 'zeitaufzeichnung_id'; - } -} diff --git a/application/models/ressource/Zeitsperre_model.php b/application/models/ressource/Zeitsperre_model.php deleted file mode 100644 index 07889e349..000000000 --- a/application/models/ressource/Zeitsperre_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitsperre'; - $this->pk = 'zeitsperre_id'; - } -} diff --git a/application/models/ressource/Zeitsperretyp_model.php b/application/models/ressource/Zeitsperretyp_model.php deleted file mode 100644 index ef54571e8..000000000 --- a/application/models/ressource/Zeitsperretyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitsperretyp'; - $this->pk = 'zeitsperretyp_kurzbz'; - } -} diff --git a/application/models/ressource/Zeitwunsch_model.php b/application/models/ressource/Zeitwunsch_model.php deleted file mode 100644 index ea2ec698a..000000000 --- a/application/models/ressource/Zeitwunsch_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'campus.tbl_zeitwunsch'; - $this->pk = array('tag', 'mitarbeiter_uid', 'stunde'); - } -} diff --git a/application/models/system/App_model.php b/application/models/system/App_model.php deleted file mode 100644 index e0fd19c75..000000000 --- a/application/models/system/App_model.php +++ /dev/null @@ -1,15 +0,0 @@ -dbTable = 'system.tbl_app'; - $this->pk = 'app'; - } - -} diff --git a/application/models/system/Berechtigung_model.php b/application/models/system/Berechtigung_model.php deleted file mode 100644 index 9bd572614..000000000 --- a/application/models/system/Berechtigung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_berechtigung'; - $this->pk = 'berechtigung_kurzbz'; - } -} diff --git a/application/models/system/Cronjob_model.php b/application/models/system/Cronjob_model.php deleted file mode 100644 index e47ea5bef..000000000 --- a/application/models/system/Cronjob_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_cronjob'; - $this->pk = 'cronjob_id'; - } -} diff --git a/application/models/system/Filter_model.php b/application/models/system/Filter_model.php deleted file mode 100644 index 5d44e0052..000000000 --- a/application/models/system/Filter_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_filter'; - $this->pk = 'filter_id'; - } -} diff --git a/application/models/system/Log_model.php b/application/models/system/Log_model.php deleted file mode 100644 index 8b27f6c53..000000000 --- a/application/models/system/Log_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_log'; - $this->pk = 'log_id'; - } -} diff --git a/application/models/system/PersonLock_model.php b/application/models/system/PersonLock_model.php deleted file mode 100644 index 1d106b789..000000000 --- a/application/models/system/PersonLock_model.php +++ /dev/null @@ -1,88 +0,0 @@ -dbTable = 'system.tbl_person_lock'; - $this->pk = 'lock_id'; - } - - /** - * Checks if a specific person is locked. By default, looks for entries with no app in locktable for the person. - * Alternatively, looks only for locks in a certain app. - * @param $person_id - * @param null $app - * @return array all locks for a person if locked, null otherwise - */ - public function checkIfLocked($person_id, $app = null) - { - $lockdata = array('person_id' => $person_id, 'app' => $app); - - $result = $this->loadWhere($lockdata); - - if ($result->error) - return error($result->retval); - - if (count($result->retval) > 0) - return success($result->retval); - else - return success(null); - } - - /** - * Locks a person. Returns null if person was not locked (e.g. when already locked). - * @param $person_id - * @param $uid user who locks the person - * @param $app optional, application in which person is locked - * @return array inserted lock id if person was locked, null otherwise - */ - public function lockPerson($person_id, $uid, $app = null) - { - $locked = $this->checkIfLocked($person_id, $app); - - if ($locked->error) - return error($locked->retval); - - //insert only if not already locked - if ($locked->retval === null) - return $this->insert(array('person_id' => $person_id, 'uid' => $uid, 'app' => $app)); - else - return success(null); - } - - /** - * Remove a lock for a person. By default, removes any entries in locktable for the person. - * Alternatively, removes only locks in a certain app. - * @param $person_id - * @param null $app - * @return array deleted lock ids if person was locked, null otherwise - */ - public function unlockPerson($person_id, $app = null) - { - $deleted = array(); - $locks = $this->checkIfLocked($person_id, $app); - - if ($locks->retval === null) - return success(null); - - foreach ($locks->retval as $lock) - { - $result = $this->delete($lock->lock_id); - if ($result->error) - return error($result->retval); - - $deleted[] = $lock; - } - - return success($deleted); - } -} diff --git a/application/models/system/Rolle_model.php b/application/models/system/Rolle_model.php deleted file mode 100644 index 5ba085853..000000000 --- a/application/models/system/Rolle_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_rolle'; - $this->pk = 'rolle_kurzbz'; - } -} diff --git a/application/models/system/Rolleberechtigung_model.php b/application/models/system/Rolleberechtigung_model.php deleted file mode 100644 index 0b08da1ca..000000000 --- a/application/models/system/Rolleberechtigung_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_rolleberechtigung'; - $this->pk = array('rolle_kurzbz', 'berechtigung_kurzbz'); - } -} diff --git a/application/models/system/Server_model.php b/application/models/system/Server_model.php deleted file mode 100644 index 4521e1fd4..000000000 --- a/application/models/system/Server_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_server'; - $this->pk = 'server_kurzbz'; - } -} \ No newline at end of file diff --git a/application/models/system/Tag_model.php b/application/models/system/Tag_model.php deleted file mode 100644 index 94434da45..000000000 --- a/application/models/system/Tag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_tag'; - $this->pk = 'tag'; - } -} diff --git a/application/models/system/Variable_model.php b/application/models/system/Variable_model.php deleted file mode 100644 index 9800999fe..000000000 --- a/application/models/system/Variable_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'public.tbl_variable'; - $this->pk = array('uid', 'name'); - } -} diff --git a/application/models/system/Webservicelog_model.php b/application/models/system/Webservicelog_model.php deleted file mode 100644 index dc45b13a7..000000000 --- a/application/models/system/Webservicelog_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicelog'; - $this->pk = 'webservicelog_id'; - } -} diff --git a/application/models/system/Webservicerecht_model.php b/application/models/system/Webservicerecht_model.php deleted file mode 100644 index a5bd036f0..000000000 --- a/application/models/system/Webservicerecht_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicerecht'; - $this->pk = 'webservicerecht_id'; - } -} diff --git a/application/models/system/Webservicetyp_model.php b/application/models/system/Webservicetyp_model.php deleted file mode 100644 index 5d989de2a..000000000 --- a/application/models/system/Webservicetyp_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'system.tbl_webservicetyp'; - $this->pk = 'webservicetyp_kurzbz'; - } -} diff --git a/application/models/testtool/Ablauf_model.php b/application/models/testtool/Ablauf_model.php deleted file mode 100644 index 748926658..000000000 --- a/application/models/testtool/Ablauf_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_ablauf'; - $this->pk = 'ablauf_id'; - } -} diff --git a/application/models/testtool/Antwort_model.php b/application/models/testtool/Antwort_model.php deleted file mode 100644 index 1594be6c3..000000000 --- a/application/models/testtool/Antwort_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_antwort'; - $this->pk = 'antwort_id'; - } -} diff --git a/application/models/testtool/Frage_model.php b/application/models/testtool/Frage_model.php deleted file mode 100644 index de64c303b..000000000 --- a/application/models/testtool/Frage_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_frage'; - $this->pk = 'frage_id'; - } -} diff --git a/application/models/testtool/Gebiet_model.php b/application/models/testtool/Gebiet_model.php deleted file mode 100644 index 202d6a4aa..000000000 --- a/application/models/testtool/Gebiet_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_gebiet'; - $this->pk = 'gebiet_id'; - } -} diff --git a/application/models/testtool/Kategorie_model.php b/application/models/testtool/Kategorie_model.php deleted file mode 100644 index 10e450651..000000000 --- a/application/models/testtool/Kategorie_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_kategorie'; - $this->pk = 'kategorie_kurzbz'; - } -} diff --git a/application/models/testtool/Kriterien_model.php b/application/models/testtool/Kriterien_model.php deleted file mode 100644 index 83d0fb97c..000000000 --- a/application/models/testtool/Kriterien_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_kriterien'; - $this->pk = 'kategorie_kurzbz'; - } -} diff --git a/application/models/testtool/Pruefling_model.php b/application/models/testtool/Pruefling_model.php deleted file mode 100644 index da131ba4a..000000000 --- a/application/models/testtool/Pruefling_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_pruefling'; - $this->pk = 'pruefling_id'; - } -} diff --git a/application/models/testtool/Vorschlag_model.php b/application/models/testtool/Vorschlag_model.php deleted file mode 100644 index 853852da2..000000000 --- a/application/models/testtool/Vorschlag_model.php +++ /dev/null @@ -1,14 +0,0 @@ -dbTable = 'testtool.tbl_vorschlag'; - $this->pk = 'vorschlag_id'; - } -} From f0fe4bc2393a13be6fa98e840e2c7a6e3fba73b8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 11:27:39 +0200 Subject: [PATCH 11/14] Removed not used config files --- application/config/grocery_crud.php | 35 ---------------- application/config/migration.php | 34 +++++++-------- application/config/pagination.php | 37 ----------------- application/config/roles.php | 62 ---------------------------- application/config/smileys.php | 64 ----------------------------- application/config/template.php | 15 ------- 6 files changed, 17 insertions(+), 230 deletions(-) delete mode 100644 application/config/grocery_crud.php delete mode 100644 application/config/pagination.php delete mode 100644 application/config/roles.php delete mode 100644 application/config/smileys.php delete mode 100644 application/config/template.php diff --git a/application/config/grocery_crud.php b/application/config/grocery_crud.php deleted file mode 100644 index 57caddd15..000000000 --- a/application/config/grocery_crud.php +++ /dev/null @@ -1,35 +0,0 @@ -migration->current() this is the version that schema will -| be upgraded / downgraded to. -| -*/ -$config['migration_version'] = '014'; +$config['migration_enabled'] = FALSE; /* |-------------------------------------------------------------------------- @@ -41,7 +30,7 @@ $config['migration_version'] = '014'; | defaults to 'sequential' for backward compatibility with CI2. | */ -$config['migration_type'] = 'sequential'; +$config['migration_type'] = 'timestamp'; /* |-------------------------------------------------------------------------- @@ -55,8 +44,7 @@ $config['migration_type'] = 'sequential'; | will migrate up. This must be set. | */ -//$config['migration_table'] = 'system.ci_migrations'; // A missing feature or a bug cannot use another schema than public. Bug: tableExists only looks in the public schema. -$config['migration_table'] = 'ci_migrations'; +$config['migration_table'] = 'migrations'; /* |-------------------------------------------------------------------------- @@ -72,6 +60,18 @@ $config['migration_table'] = 'ci_migrations'; */ $config['migration_auto_latest'] = FALSE; +/* +|-------------------------------------------------------------------------- +| Migrations version +|-------------------------------------------------------------------------- +| +| This is used to set migration version that the file system should be on. +| If you run $this->migration->current() this is the version that schema will +| be upgraded / downgraded to. +| +*/ +$config['migration_version'] = 0; + /* |-------------------------------------------------------------------------- | Migrations Path diff --git a/application/config/pagination.php b/application/config/pagination.php deleted file mode 100644 index 229036a0f..000000000 --- a/application/config/pagination.php +++ /dev/null @@ -1,37 +0,0 @@ -

    '; -$config['full_tag_close'] = '
'; - -$config['first_link'] = 'First'; -$config['first_tag_open'] = '
  • '; -$config['first_tag_close'] = '
  • '; - -$config['last_link'] = 'Last'; -$config['last_tag_open'] = '
  • '; -$config['last_tag_close'] = '
  • '; - -$config['next_link'] = 'Next'; -$config['next_tag_open'] = '
  • '; -$config['next_tag_close'] = '
  • '; - -$config['prev_link'] = 'Prev'; -$config['prev_tag_open'] = '
  • '; -$config['prev_tag_close'] = '
  • '; - -$config['cur_tag_open'] = '
  • '; -$config['cur_tag_close'] = '
  • '; - -$config['num_tag_open'] = '
  • '; -$config['num_tag_close'] = '
  • '; - - -/* End of file pagination.php */ -/* Location: ./application/config/pagination.php */ diff --git a/application/config/roles.php b/application/config/roles.php deleted file mode 100644 index 75a928db0..000000000 --- a/application/config/roles.php +++ /dev/null @@ -1,62 +0,0 @@ - 'admin', - 'berechtigung' => array - ( - 'admin', 'assistenz', 'basis/addon', 'basis/ampel', 'basis/ampeluebersicht', - 'basis/benutzer', 'basis/berechtigung', 'basis/betriebsmittel', 'basis/cms', - 'basis/cms_review', 'basis/cms_sperrfreigabe', 'basis/cronjob', 'basis/dms', - 'basis/fas', 'basis/ferien', 'basis/fhausweis','basis/firma', - 'basis/infoscreen', 'basis/moodle', 'basis/moodle','basis/news', 'basis/notiz', - 'basis/organisationseinheit', 'basis/ort', 'basis/person', 'basis/planner', - 'basis/service', 'basis/statistik', 'basis/studiengang', 'basis/studiensemester', 'basis/tempus', - 'basis/testtool', 'basis/variable', 'basis/vilesci', 'buchung/typen', - 'buchung/mitarbeiter', 'inout/incoming', 'inout/outgoing', 'inout/uebersicht', - 'lehre', 'lehre/abgabetool', 'lehre/freifach', 'lehre/lehrfach', - 'lehre/lehrveranstaltung', 'lehre/lvplan', 'lehre/lvinfo', - 'lehre/pruefungsanmeldungAdmin', 'lehre/pruefungsbeurteilung', - 'lehre/pruefungsbeurteilungAdmin', 'lehre/pruefungsterminAdmin', - 'lehre/pruefungsfenster', 'lehre/reihungstest', 'lehre/reservierung', - 'lehre/studienordnung', 'lehre/studienordnungInaktiv', 'lehre/studienplan', - 'lehre/vorrueckung', 'lv-plan', 'lv-plan/gruppenentfernen', - 'lv-plan/lektorentfernen', 'mitarbeiter', 'mitarbeiter/bankdaten', - 'mitarbeiter/personalnummer', 'mitarbeiter/stammdaten', 'mitarbeiter/urlaube', - 'mitarbeiter/zeitsperre', 'news', 'planner', 'preinteressent', 'raumres', - 'reihungstest', 'sdTools', 'soap/lv', 'soap/lvplan', 'soap/mitarbeiter', - 'soap/ort', 'soap/pruefungsfenster', 'soap/student', 'soap/studienordnung', - 'soap/benutzer', 'soap/buchungen', 'student/bankdaten', 'student/anrechnung', - 'student/anwesenheit', 'student/dokumente', 'student/noten', 'system/phrase', - 'system/vorlage', 'system/vorlagestudiengang', 'student/stammdaten', - 'student/vorrueckung', 'system/developer', 'system/loginasuser', - 'user', 'veranstaltung', 'vertrag/mitarbeiter', 'vertrag/typen', - 'wawi/berichte', 'wawi/bestellung', 'wawi/bestellung_advanced', 'wawi/budget', - 'wawi/delete_advanced', 'wawi/firma', 'wawi/freigabe', - 'wawi/freigabe_advanced', 'wawi/inventar', 'wawi/konto', 'wawi/kostenstelle', - 'wawi/rechnung', 'wawi/rechnung_freigeben', 'wawi/rechnung_transfer', - 'wawi/storno' - ) - ), - array - ( - 'rolle_kurzbz' => 'infocenter', - 'berechtigung' => array - ( - 'basis/adresse','basis/akte','basis/kontakt','basis/log','basis/nation','basis/notiz','basis/notizzuordnung', - 'basis/person','basis/prestudent','basis/prestudentstatus','basis/status','basis/zgv','basis/zgvmaster', - 'lehre/studienplan','system/filters','fs/dms','basis/message','basis/benutzerrolle', 'basis/sprache', - 'system/personlock','basis/benutzerfunktion','system/vorlagestudiengang', 'basis/bewerbungstermine' - ) - ) -); diff --git a/application/config/smileys.php b/application/config/smileys.php deleted file mode 100644 index 272be2fcd..000000000 --- a/application/config/smileys.php +++ /dev/null @@ -1,64 +0,0 @@ - array('grin.gif', '19', '19', 'grin'), - ':lol:' => array('lol.gif', '19', '19', 'LOL'), - ':cheese:' => array('cheese.gif', '19', '19', 'cheese'), - ':)' => array('smile.gif', '19', '19', 'smile'), - ';-)' => array('wink.gif', '19', '19', 'wink'), - ';)' => array('wink.gif', '19', '19', 'wink'), - ':smirk:' => array('smirk.gif', '19', '19', 'smirk'), - ':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'), - ':-S' => array('confused.gif', '19', '19', 'confused'), - ':wow:' => array('surprise.gif', '19', '19', 'surprised'), - ':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'), - ':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'), - '%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'), - ';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'), - ':P' => array('raspberry.gif', '19', '19', 'raspberry'), - ':blank:' => array('blank.gif', '19', '19', 'blank stare'), - ':long:' => array('longface.gif', '19', '19', 'long face'), - ':ohh:' => array('ohh.gif', '19', '19', 'ohh'), - ':grrr:' => array('grrr.gif', '19', '19', 'grrr'), - ':gulp:' => array('gulp.gif', '19', '19', 'gulp'), - '8-/' => array('ohoh.gif', '19', '19', 'oh oh'), - ':down:' => array('downer.gif', '19', '19', 'downer'), - ':red:' => array('embarrassed.gif', '19', '19', 'red face'), - ':sick:' => array('sick.gif', '19', '19', 'sick'), - ':shut:' => array('shuteye.gif', '19', '19', 'shut eye'), - ':-/' => array('hmm.gif', '19', '19', 'hmmm'), - '>:(' => array('mad.gif', '19', '19', 'mad'), - ':mad:' => array('mad.gif', '19', '19', 'mad'), - '>:-(' => array('angry.gif', '19', '19', 'angry'), - ':angry:' => array('angry.gif', '19', '19', 'angry'), - ':zip:' => array('zip.gif', '19', '19', 'zipper'), - ':kiss:' => array('kiss.gif', '19', '19', 'kiss'), - ':ahhh:' => array('shock.gif', '19', '19', 'shock'), - ':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'), - ':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'), - ':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'), - ':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'), - ':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'), - ':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'), - ':vampire:' => array('vampire.gif', '19', '19', 'vampire'), - ':snake:' => array('snake.gif', '19', '19', 'snake'), - ':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'), - ':question:' => array('question.gif', '19', '19', 'question') - -); diff --git a/application/config/template.php b/application/config/template.php deleted file mode 100644 index d47a13d4f..000000000 --- a/application/config/template.php +++ /dev/null @@ -1,15 +0,0 @@ - Date: Fri, 26 Apr 2019 11:38:28 +0200 Subject: [PATCH 12/14] Removed not used libraries and views --- application/libraries/Format.php | 531 --------------------- application/views/rdf/basic.php | 54 --- application/views/rdf/basic_sparql.php | 74 --- application/views/rdf/converter.php | 112 ----- application/views/rdf/foafinfo.php | 124 ----- application/views/rdf/foafmaker.php | 121 ----- application/views/rdf/form.php | 121 ----- application/views/rdf/html_tag_helpers.php | 218 --------- 8 files changed, 1355 deletions(-) delete mode 100644 application/libraries/Format.php delete mode 100644 application/views/rdf/basic.php delete mode 100644 application/views/rdf/basic_sparql.php delete mode 100644 application/views/rdf/converter.php delete mode 100644 application/views/rdf/foafinfo.php delete mode 100644 application/views/rdf/foafmaker.php delete mode 100644 application/views/rdf/form.php delete mode 100644 application/views/rdf/html_tag_helpers.php diff --git a/application/libraries/Format.php b/application/libraries/Format.php deleted file mode 100644 index 0f7ea4a87..000000000 --- a/application/libraries/Format.php +++ /dev/null @@ -1,531 +0,0 @@ -_CI = &get_instance(); - - // Load the inflector helper - $this->_CI->load->helper('inflector'); - - // If the provided data is already formatted we should probably convert it to an array - if ($from_type !== NULL) - { - if (method_exists($this, '_from_' . $from_type)) - { - $data = call_user_func([$this, '_from_' . $from_type], $data); - } - else - { - throw new Exception('Format class does not support conversion from "' . $from_type . '".'); - } - } - - // Set the member variable to the data passed - $this->_data = $data; - } - - /** - * Create an instance of the format class - * e.g: echo $this->format->factory(['foo' => 'bar'])->to_csv(); - * - * @param mixed $data Data to convert/parse - * @param string $from_type Type to convert from e.g. json, csv, html - * - * @return object Instance of the format class - */ - public function factory($data, $from_type = NULL) - { - // $class = __CLASS__; - // return new $class(); - - return new static($data, $from_type); - } - - // FORMATTING OUTPUT --------------------------------------------------------- - - /** - * Format data as an array - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return array Data parsed as an array; otherwise, an empty array - */ - public function to_array($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - $array = []; - foreach ((array) $data as $key => $value) - { - if (is_object($value) === TRUE || is_array($value) === TRUE) - { - $array[$key] = $this->to_array($value); - } - else - { - $array[$key] = $value; - } - } - - return $array; - } - - /** - * Format data as XML - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @param NULL $structure - * @param string $basenode - * @return mixed - */ - public function to_xml($data = NULL, $structure = NULL, $basenode = 'xml') - { - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // turn off compatibility mode as simple xml throws a wobbly if you don't. - if (ini_get('zend.ze1_compatibility_mode') == 1) - { - ini_set('zend.ze1_compatibility_mode', 0); - } - - if ($structure === NULL) - { - $structure = simplexml_load_string("<$basenode />"); - } - - // Force it to be something useful - if (is_array($data) === FALSE && is_object($data) === FALSE) - { - $data = (array) $data; - } - - foreach ($data as $key => $value) - { - - //change false/true to 0/1 - if (is_bool($value)) - { - $value = (int) $value; - } - - // no numeric keys in our xml please! - if (is_numeric($key)) - { - // make string key... - $key = (singular($basenode) != $basenode) ? singular($basenode) : 'item'; - } - - // replace anything not alpha numeric - $key = preg_replace('/[^a-z_\-0-9]/i', '', $key); - - if ($key === '_attributes' && (is_array($value) || is_object($value))) - { - $attributes = $value; - if (is_object($attributes)) - { - $attributes = get_object_vars($attributes); - } - - foreach ($attributes as $attribute_name => $attribute_value) - { - $structure->addAttribute($attribute_name, $attribute_value); - } - } - // if there is another array found recursively call this function - elseif (is_array($value) || is_object($value)) - { - $node = $structure->addChild($key); - - // recursive call. - $this->to_xml($value, $node, $key); - } - else - { - // add single node. - $value = htmlspecialchars(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8'); - - $structure->addChild($key, $value); - } - } - - return $structure->asXML(); - } - - /** - * Format data as HTML - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return mixed - */ - public function to_html($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - // Check if it's a multi-dimensional array - if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) - { - // Multi-dimensional array - $headings = array_keys($data[0]); - } - else - { - // Single array - $headings = array_keys($data); - $data = [$data]; - } - - // Load the table library - $this->_CI->load->library('table'); - - $this->_CI->table->set_heading($headings); - - foreach ($data as $row) - { - // Suppressing the "array to string conversion" notice - // Keep the "evil" @ here - $row = @array_map('strval', $row); - - $this->_CI->table->add_row($row); - } - - return $this->_CI->table->generate(); - } - - /** - * @link http://www.metashock.de/2014/02/create-csv-file-in-memory-php/ - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @param string $delimiter The optional delimiter parameter sets the field - * delimiter (one character only). NULL will use the default value (,) - * @param string $enclosure The optional enclosure parameter sets the field - * enclosure (one character only). NULL will use the default value (") - * @return string A csv string - */ - public function to_csv($data = NULL, $delimiter = ',', $enclosure = '"') - { - // Use a threshold of 1 MB (1024 * 1024) - $handle = fopen('php://temp/maxmemory:1048576', 'w'); - if ($handle === FALSE) - { - return NULL; - } - - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // If NULL, then set as the default delimiter - if ($delimiter === NULL) - { - $delimiter = ','; - } - - // If NULL, then set as the default enclosure - if ($enclosure === NULL) - { - $enclosure = '"'; - } - - // Cast as an array if not already - if (is_array($data) === FALSE) - { - $data = (array) $data; - } - - // Check if it's a multi-dimensional array - if (isset($data[0]) && count($data) !== count($data, COUNT_RECURSIVE)) - { - // Multi-dimensional array - $headings = array_keys($data[0]); - } - else - { - // Single array - $headings = array_keys($data); - $data = [$data]; - } - - // Apply the headings - fputcsv($handle, $headings, $delimiter, $enclosure); - - foreach ($data as $record) - { - // If the record is not an array, then break. This is because the 2nd param of - // fputcsv() should be an array - if (is_array($record) === FALSE) - { - break; - } - - // Suppressing the "array to string conversion" notice. - // Keep the "evil" @ here. - $record = @ array_map('strval', $record); - - // Returns the length of the string written or FALSE - fputcsv($handle, $record, $delimiter, $enclosure); - } - - // Reset the file pointer - rewind($handle); - - // Retrieve the csv contents - $csv = stream_get_contents($handle); - - // Close the handle - fclose($handle); - - return $csv; - } - - /** - * Encode data as json - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return string Json representation of a value - */ - public function to_json($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - // Get the callback parameter (if set) - $callback = $this->_CI->input->get('callback'); - - if (empty($callback) === TRUE) - { - return json_encode($data); - } - - // We only honour a jsonp callback which are valid javascript identifiers - elseif (preg_match('/^[a-z_\$][a-z0-9\$_]*(\.[a-z_\$][a-z0-9\$_]*)*$/i', $callback)) - { - // Return the data as encoded json with a callback - return $callback . '(' . json_encode($data) . ');'; - } - - // An invalid jsonp callback function provided. - // Though I don't believe this should be hardcoded here - $data['warning'] = 'INVALID JSONP CALLBACK: ' . $callback; - - return json_encode($data); - } - - /** - * Encode data as a serialized array - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return string Serialized data - */ - public function to_serialized($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - return serialize($data); - } - - /** - * Format data using a PHP structure - * - * @param mixed|NULL $data Optional data to pass, so as to override the data passed - * to the constructor - * @return mixed String representation of a variable - */ - public function to_php($data = NULL) - { - // If no data is passed as a parameter, then use the data passed - // via the constructor - if ($data === NULL && func_num_args() === 0) - { - $data = $this->_data; - } - - return var_export($data, TRUE); - } - - // INTERNAL FUNCTIONS - - /** - * @param $data XML string - * @return SimpleXMLElement XML element object; otherwise, empty array - */ - protected function _from_xml($data) - { - return $data ? (array) simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA) : []; - } - - /** - * @param string $data CSV string - * @param string $delimiter The optional delimiter parameter sets the field - * delimiter (one character only). NULL will use the default value (,) - * @param string $enclosure The optional enclosure parameter sets the field - * enclosure (one character only). NULL will use the default value (") - * @return array A multi-dimensional array with the outer array being the number of rows - * and the inner arrays the individual fields - */ - protected function _from_csv($data, $delimiter = ',', $enclosure = '"') - { - // If NULL, then set as the default delimiter - if ($delimiter === NULL) - { - $delimiter = ','; - } - - // If NULL, then set as the default enclosure - if ($enclosure === NULL) - { - $enclosure = '"'; - } - - return str_getcsv($data, $delimiter, $enclosure); - } - - /** - * @param $data Encoded json string - * @return mixed Decoded json string with leading and trailing whitespace removed - */ - protected function _from_json($data) - { - return json_decode(trim($data)); - } - - /** - * @param string Data to unserialized - * @return mixed Unserialized data - */ - protected function _from_serialize($data) - { - return unserialize(trim($data)); - } - - /** - * @param $data Data to trim leading and trailing whitespace - * @return string Data with leading and trailing whitespace removed - */ - protected function _from_php($data) - { - return trim($data); - } - -} diff --git a/application/views/rdf/basic.php b/application/views/rdf/basic.php deleted file mode 100644 index 2fd6ed3f7..000000000 --- a/application/views/rdf/basic.php +++ /dev/null @@ -1,54 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - primaryTopic(); -?> - - - - - - - - - - -
    NameGive NameFamily Name
    get('foaf:name') ?> get('foaf:givenName') ?> get('foaf:familyName') ?>
    - - - -
    \ No newline at end of file diff --git a/application/views/rdf/basic_sparql.php b/application/views/rdf/basic_sparql.php deleted file mode 100644 index 91ca04e85..000000000 --- a/application/views/rdf/basic_sparql.php +++ /dev/null @@ -1,74 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - - - -query( - 'SELECT * WHERE {'. - ' ?country rdf:type dbo:Country .'. - ' ?country rdfs:label ?label .'. - ' ?country dc:subject category:Member_states_of_the_United_Nations .'. - ' FILTER ( lang(?label) = "en" )'. - '} ORDER BY ?label' - ); - -?> - Total number of countries: numRows() ?> - - - - - - - - - - - - -
    LabelCountry
    label ?> country ?>
    - - - -
    diff --git a/application/views/rdf/converter.php b/application/views/rdf/converter.php deleted file mode 100644 index b8c0b9ae3..000000000 --- a/application/views/rdf/converter.php +++ /dev/null @@ -1,112 +0,0 @@ -
    -

    Converter

    -
    -
    -
    -
    - -
    -
    - - - -load->view('rdf/html_tag_helpers'); - - $input_format_options = array('Guess' => 'guess'); - $output_format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $output_format_options[$format->getLabel()] = $format->getName(); - } - if ($format->getParserClass()) { - $input_format_options[$format->getLabel()] = $format->getName(); - } - } - - // Stupid PHP :( - if (get_magic_quotes_gpc() and isset($_REQUEST['data'])) { - $_REQUEST['data'] = stripslashes($_REQUEST['data']); - } - - // Default to Guess input and Turtle output - if (!isset($_REQUEST['output_format'])) { - $_REQUEST['output_format'] = 'turtle'; - } - if (!isset($_REQUEST['input_format'])) { - $_REQUEST['input_format'] = 'guess'; - } - - // Display the form, if raw option isn't set - if (!isset($_REQUEST['raw'])) { - print "\n"; - print "EasyRdf Converter\n"; - print "\n"; - print "

    EasyRdf Converter

    \n"; - - print "
    \n"; - print form_tag(); - print label_tag('data', 'Input Data: ').'
    '.text_area_tag('data', '', array('cols'=>30, 'rows'=>10)) . "
    \n"; - print label_tag('uri', 'or Uri: ').text_field_tag('uri', 'http://www.dajobe.org/foaf.rdf', array('size'=>80)) . "
    \n"; - print label_tag('input_format', 'Input Format: ').select_tag('input_format', $input_format_options) . "
    \n"; - print label_tag('output_format', 'Output Format: ').select_tag('output_format', $output_format_options) . "
    \n"; - print label_tag('raw', 'Raw Output: ').check_box_tag('raw') . "
    \n"; - print reset_tag() . submit_tag(); - print form_end_tag(); - print "
    \n"; - } - - if (isset($_REQUEST['uri']) or isset($_REQUEST['data'])) { - // Parse the input - $graph = new EasyRdf_Graph($_REQUEST['uri']); - if (empty($_REQUEST['data'])) { - $graph->load($_REQUEST['uri'], $_REQUEST['input_format']); - } else { - $graph->parse($_REQUEST['data'], $_REQUEST['input_format'], $_REQUEST['uri']); - } - - // Lookup the output format - $format = EasyRdf_Format::getFormat($_REQUEST['output_format']); - - // Serialise to the new output format - $output = $graph->serialise($format); - if (!is_scalar($output)) { - $output = var_export($output, true); - } - - // Send the output back to the client - if (isset($_REQUEST['raw'])) { - header('Content-Type: '.$format->getDefaultMimeType()); - print $output; - } else { - print '
    '.htmlspecialchars($output).'
    '; - } - } - - if (!isset($_REQUEST['raw'])) { - print "\n"; - print "\n"; - } - -?> -
    \ No newline at end of file diff --git a/application/views/rdf/foafinfo.php b/application/views/rdf/foafinfo.php deleted file mode 100644 index 54cceec9b..000000000 --- a/application/views/rdf/foafinfo.php +++ /dev/null @@ -1,124 +0,0 @@ - -
    -

    -
    -
    -
    -
    - -
    -
    - - -
    - -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    -

    FOAF me

    -load->view('rdf/html_tag_helpers'); - - - if (isset($_REQUEST['uri'])): ?> - - - - - - - type() == 'foaf:PersonalProfileDocument'): ?> - primaryTopic(); ?> - type() == 'foaf:Person'): ?> - resource(); ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NameHomepage
    get('foaf:name') ?> get('foaf:homepage') ?>
    - - - - -

    Known Person

    - - all('foaf:knows') as $friend) { - $label = $friend->label(); - - if (!$label) { - $label = $friend->getUri(); - } - ?> - - - - - - - - - - isBNode()): ?> - - - - ".link_to_self($label, 'uri='.urlencode($friend)).""; ?> - - - - - - - - - -
    - - - - - - -
    - - - - - - \ No newline at end of file diff --git a/application/views/rdf/foafmaker.php b/application/views/rdf/foafmaker.php deleted file mode 100644 index c79f9f838..000000000 --- a/application/views/rdf/foafmaker.php +++ /dev/null @@ -1,121 +0,0 @@ -
    -

    EasyRdf FOAF Maker Example

    -
    -
    -
    -
    - -
    -
    -load->view('rdf/html_tag_helpers'); - - if (isset($_REQUEST['enable_arc']) && $_REQUEST['enable_arc']) { - require_once "EasyRdf/Serialiser/Arc.php"; - EasyRdf_Format::registerSerialiser('ntriples', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('posh', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Arc'); - } - - if (isset($_REQUEST['enable_rapper']) && $_REQUEST['enable_rapper']) { - require_once "EasyRdf/Serialiser/Rapper.php"; - EasyRdf_Format::registerSerialiser('dot', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Rapper'); - } - - $format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $format_options[$format->getLabel()] = $format->getName(); - } - } -?> - -

    - - 'POST')) ?> - -

    Your Identifier

    -40)) ?>
    - -

    Your details

    -8)) ?>
    -
    -
    -
    -
    -40)) ?>
    - -

    People you know

    -40)) ?>
    -40)) ?>
    -40)) ?>
    -40)) ?>
    - -

    Output

    -Enable Arc 2?
    -Enable Rapper?
    -
    - - - - - -resource($_REQUEST['uri'], 'foaf:Person'); - $me->set('foaf:name', $_REQUEST['title'].' '.$_REQUEST['given_name'].' '.$_REQUEST['family_name']); - if ($_REQUEST['email']) { - $email = $graph->resource("mailto:".$_REQUEST['email']); - $me->add('foaf:mbox', $email); - } - if ($_REQUEST['homepage']) { - $homepage = $graph->resource($_REQUEST['homepage']); - $me->add('foaf:homepage', $homepage); - } - - # 2nd Technique - $graph->addLiteral($_REQUEST['uri'], 'foaf:title', $_REQUEST['title']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:givenname', $_REQUEST['given_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:family_name', $_REQUEST['family_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:nick', $_REQUEST['nickname']); - - # Add friends - for ($i=1; $i<=4; $i++) { - if ($_REQUEST["person_$i"]) { - $person = $graph->resource($_REQUEST["person_$i"]); - $graph->add($me, 'foaf:knows', $person); - } - } - - # Finally output the graph - $data = $graph->serialise($_REQUEST['format']); - if (!is_scalar($data)) { - $data = var_export($data, true); - } - print "
    ".htmlspecialchars($data)."
    "; - } - -?> - -
    \ No newline at end of file diff --git a/application/views/rdf/form.php b/application/views/rdf/form.php deleted file mode 100644 index ad0c704b5..000000000 --- a/application/views/rdf/form.php +++ /dev/null @@ -1,121 +0,0 @@ -
    -

    EasyRdf FOAF Maker Example

    -
    -
    -
    -
    - -
    -
    -load->view('rdf/html_tag_helpers'); - - if (isset($_REQUEST['enable_arc']) && $_REQUEST['enable_arc']) { - require_once "EasyRdf/Serialiser/Arc.php"; - EasyRdf_Format::registerSerialiser('ntriples', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('posh', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Arc'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Arc'); - } - - if (isset($_REQUEST['enable_rapper']) && $_REQUEST['enable_rapper']) { - require_once "EasyRdf/Serialiser/Rapper.php"; - EasyRdf_Format::registerSerialiser('dot', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('rdfxml', 'EasyRdf_Serialiser_Rapper'); - EasyRdf_Format::registerSerialiser('turtle', 'EasyRdf_Serialiser_Rapper'); - } - - $format_options = array(); - foreach (EasyRdf_Format::getFormats() as $format) { - if ($format->getSerialiserClass()) { - $format_options[$format->getLabel()] = $format->getName(); - } - } -?> - -

    - - 'POST')) ?> - -

    Your Identifier

    -40)) ?>
    - -

    Your details

    -8)) ?>
    -
    -
    -
    -
    -40)) ?>
    - -

    People you know

    -40)) ?>
    -40)) ?>
    -40)) ?>
    -40)) ?>
    - -

    Output

    -Enable Arc 2?
    -Enable Rapper?
    -
    - - - - - -resource($_REQUEST['uri'], 'foaf:Person'); - $me->set('foaf:name', $_REQUEST['title'].' '.$_REQUEST['given_name'].' '.$_REQUEST['family_name']); - if ($_REQUEST['email']) { - $email = $graph->resource("mailto:".$_REQUEST['email']); - $me->add('foaf:mbox', $email); - } - if ($_REQUEST['homepage']) { - $homepage = $graph->resource($_REQUEST['homepage']); - $me->add('foaf:homepage', $homepage); - } - - # 2nd Technique - $graph->addLiteral($_REQUEST['uri'], 'foaf:title', $_REQUEST['title']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:givenname', $_REQUEST['given_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:family_name', $_REQUEST['family_name']); - $graph->addLiteral($_REQUEST['uri'], 'foaf:nick', $_REQUEST['nickname']); - - # Add friends - for ($i=1; $i<=4; $i++) { - if ($_REQUEST["person_$i"]) { - $person = $graph->resource($_REQUEST["person_$i"]); - $graph->add($me, 'foaf:knows', $person); - } - } - - # Finally output the graph - $data = $graph->serialise($_REQUEST['format']); - if (!is_scalar($data)) { - $data = var_export($data, true); - } - print "
    ".htmlspecialchars($data)."
    "; - } - -?> - -
    \ No newline at end of file diff --git a/application/views/rdf/html_tag_helpers.php b/application/views/rdf/html_tag_helpers.php deleted file mode 100644 index 0cdcdddac..000000000 --- a/application/views/rdf/html_tag_helpers.php +++ /dev/null @@ -1,218 +0,0 @@ -'foo')); - -echo tag('br'); -echo link_to('Hyperlink', 'http://www.example.com/?a=1&b=2'); -echo tag('br'); - -echo form_tag(); - - echo label_tag('first_name').text_field_tag('first_name', 'Joe').tag('br'); - echo label_tag('password').password_field_tag().tag('br'); - - echo label_tag('radio1_value1', 'Radio 1').radio_button_tag('radio1', 'value1').tag('br'); - echo label_tag('radio1_value2', 'Radio 2').radio_button_tag('radio1', 'value2', true).tag('br'); - echo label_tag('radio1_value3', 'Radio 3').radio_button_tag('radio1', 'value3').tag('br'); - - echo label_tag('check1', 'Check 1').check_box_tag('check1', 'value1').tag('br'); - echo label_tag('check2', 'Check 2').check_box_tag('check2', 'value2', true).tag('br'); - echo label_tag('check3', 'Check 3').check_box_tag('check3', 'value3').tag('br'); - - $options = array('Label 1' => 'value1', 'Label 2' => 'value2', 'Label 3' => 'value3'); - echo label_tag('select1', 'Select Something:'); - echo select_tag('select1', $options, 'value2').tag('br'); - - echo label_tag('textarea1', 'Type Something:'); - echo text_area_tag('textarea1', "Hello World!").tag('br'); - - echo submit_tag(); - -echo form_end_tag(); - -*/ - - -function tag_options($options) -{ - $html = ""; - foreach ($options as $key => $value) { - if ($key and $value) { - $html .= " ".htmlspecialchars($key)."=\"". - htmlspecialchars($value)."\""; - } - } - return $html; -} - -function tag($name, $options = array(), $open = false) -{ - return "<$name".tag_options($options).($open ? ">" : " />"); -} - -function content_tag($name, $content = null, $options = array()) -{ - return "<$name".tag_options($options).">". - htmlspecialchars($content).""; -} - -function link_to($text, $uri = null, $options = array()) -{ - if ($uri == null) $uri = $text; - $options = array_merge(array('href' => $uri), $options); - return content_tag('a', $text, $options); -} - -function link_to_self($text, $query_string, $options = array()) -{ - return link_to($text, $_SERVER['PHP_SELF'].'?'.$query_string, $options); -} - -function image_tag($src, $options = array()) -{ - $options = array_merge(array('src' => $src), $options); - return tag('img', $options); -} - -function input_tag($type, $name, $value = null, $options = array()) -{ - $options = array_merge( - array( - 'type' => $type, - 'name' => $name, - 'id' => $name, - 'value' => $value - ), - $options - ); - return tag('input', $options); -} - -function text_field_tag($name, $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('text', $name, $value, $options); -} - -function text_area_tag($name, $default = null, $options = array()) -{ - $content = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - $options = array_merge( - array( - 'name' => $name, - 'id' => $name, - 'cols' => 60, - 'rows' => 5 - ), - $options - ); - return content_tag('textarea', $content, $options); -} - -function hidden_field_tag($name, $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('hidden', $name, $value, $options); -} - -function password_field_tag($name = 'password', $default = null, $options = array()) -{ - $value = isset($_REQUEST[$name]) ? $_REQUEST[$name] : $default; - return input_tag('password', $name, $value, $options); -} - -function radio_button_tag($name, $value, $default = false, $options = array()) -{ - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST[$name]) and $default)) - { - $options = array_merge(array('checked' => 'checked'), $options); - } - $options = array_merge(array('id' => $name.'_'.$value), $options); - return input_tag('radio', $name, $value, $options); -} - -function check_box_tag($name, $value = '1', $default = false, $options = array()) -{ - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST['submit']) and $default)) - { - $options = array_merge(array('checked' => 'checked'),$options); - } - return input_tag('checkbox', $name, $value, $options); -} - -function submit_tag($name = '', $value = 'Submit', $options = array()) -{ - return input_tag('submit', $name, $value, $options); -} - -function reset_tag($name = '', $value = 'Reset', $options = array()) -{ - return input_tag('reset', $name, $value, $options); -} - -function label_tag($name, $text = null, $options = array()) -{ - if ($text == null) { - $text = ucwords(str_replace('_', ' ', $name)).': '; - } - $options = array_merge( - array('for' => $name, 'id' => "label_for_$name"), - $options - ); - return content_tag('label', $text, $options); -} - -function labeled_text_field_tag($name, $default = null, $options = array()) -{ - return label_tag($name).text_field_tag($name, $default, $options); -} - -function select_tag($name, $options, $default = null, $html_options = array()) -{ - $opts = ''; - foreach ($options as $key => $value) { - $arr = array('value' => $value); - if ((isset($_REQUEST[$name]) and $_REQUEST[$name] == $value) or - (!isset($_REQUEST[$name]) and $default == $value)) - { - $arr = array_merge(array('selected' => 'selected'),$arr); - } - $opts .= content_tag('option', $key, $arr); - } - $html_options = array_merge( - array('name' => $name, 'id' => $name), - $html_options - ); - return "$opts"; -} - -function form_tag($uri = null, $options = array()) -{ - if ($uri == null) { - $uri = $_SERVER['PHP_SELF']; - } - $options = array_merge( - array('method' => 'get', 'action' => $uri), - $options - ); - return tag('form', $options, true); -} - -function form_end_tag() -{ - return ""; -} From c84c484a2a7b06a17f24952292dc0d82a475190d Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 12:43:51 +0200 Subject: [PATCH 13/14] Fixed models --- .../controllers/api/v1/codex/Nation.php | 16 ++-- application/controllers/api/v1/codex/Zgv.php | 2 +- .../api/v1/crm/Bewerbungstermine.php | 2 +- .../api/v1/crm/Dokumentprestudent.php | 2 +- .../api/v1/person/Notizzuordnung.php | 2 +- .../system/infocenter/InfoCenter.php | 20 ++--- application/models/CL/Messages_model.php | 4 +- .../models/accounting/Aufteilung_model.php | 14 +++ .../models/accounting/Bestelldetail_model.php | 14 +++ .../accounting/Bestelldetailtag_model.php | 14 +++ .../models/accounting/Bestellstatus_model.php | 14 +++ .../models/accounting/Bestellung_model.php | 14 +++ .../models/accounting/Bestellungtag_model.php | 14 +++ .../models/accounting/Buchung_model.php | 14 +++ .../models/accounting/Buchungstyp_model.php | 14 +++ .../models/accounting/Budget_model.php | 14 +++ .../models/accounting/Rechnung_model.php | 14 +++ .../accounting/Rechnungsbetrag_model.php | 14 +++ .../models/accounting/Rechnungstyp_model.php | 14 +++ .../models/accounting/Vertrag_model.php | 14 +++ .../accounting/Vertragsstatus_model.php | 14 +++ .../models/accounting/Vertragstyp_model.php | 14 +++ .../models/accounting/Zahlungstyp_model.php | 14 +++ application/models/codex/Akadgrad_model.php | 14 +++ application/models/codex/Archiv_model.php | 14 +++ .../models/codex/Aufmerksamdurch_model.php | 14 +++ application/models/codex/Ausbildung_model.php | 14 +++ .../models/codex/Berufstaetigkeit_model.php | 14 +++ .../codex/Beschaeftigungsausmass_model.php | 14 +++ application/models/codex/Besqual_model.php | 14 +++ .../models/codex/Bisfunktion_model.php | 14 +++ application/models/codex/Bisio_model.php | 14 +++ application/models/codex/Bisorgform_model.php | 14 +++ .../models/codex/Bisverwendung_model.php | 14 +++ application/models/codex/Bundesland_model.php | 14 +++ .../models/codex/Entwicklungsteam_model.php | 14 +++ application/models/codex/Gemeinde_model.php | 22 +++++ application/models/codex/Hauptberuf_model.php | 14 +++ application/models/codex/Lehrform_model.php | 14 +++ application/models/codex/Lgartcode_model.php | 14 +++ .../codex/Mobilitaetsprogramm_model.php | 14 +++ application/models/codex/Nation_model.php | 14 +++ application/models/codex/Note_model.php | 14 +++ application/models/codex/Verwendung_model.php | 14 +++ application/models/codex/Zgv_model.php | 14 +++ application/models/codex/Zgvdoktor_model.php | 14 +++ application/models/codex/Zgvgruppe_model.php | 13 +++ application/models/codex/Zgvmaster_model.php | 14 +++ application/models/codex/Zweck_model.php | 14 +++ application/models/content/Content_model.php | 14 +++ .../models/content/Contentchild_model.php | 14 +++ .../models/content/Contentgruppe_model.php | 14 +++ .../models/content/Contentlog_model.php | 14 +++ .../models/content/Contentsprache_model.php | 14 +++ .../models/content/Infoscreen_model.php | 14 +++ application/models/content/News_model.php | 14 +++ application/models/content/Template_model.php | 14 +++ .../models/content/Veranstaltung_model.php | 14 +++ .../content/Veranstaltungskategorie_model.php | 14 +++ .../models/crm/Aufnahmeschluessel_model.php | 14 +++ .../models/crm/Bewerbungstermine_model.php | 14 +++ application/models/crm/Buchungstyp_model.php | 14 +++ application/models/crm/Dokument_model.php | 14 +++ .../models/crm/Dokumentprestudent_model.php | 71 +++++++++++++++ application/models/crm/Konto_model.php | 14 +++ application/models/crm/Preincoming_model.php | 14 +++ .../models/crm/Preinteressent_model.php | 14 +++ .../crm/Preinteressentstudiengang_model.php | 14 +++ application/models/crm/Preoutgoing_model.php | 14 +++ application/models/crm/Student_model.php | 48 ++++++++++ application/models/education/Uebung_model.php | 14 +++ .../models/organisation/Erhalter_model.php | 14 +++ .../models/organisation/Fachbereich_model.php | 14 +++ .../models/organisation/Ferien_model.php | 14 +++ .../models/organisation/Lehrverband_model.php | 14 +++ .../Organisationseinheittyp_model.php | 14 +++ .../organisation/Semesterwochen_model.php | 14 +++ .../models/organisation/Service_model.php | 14 +++ .../models/organisation/Standort_model.php | 14 +++ .../models/organisation/Statistik_model.php | 14 +++ .../organisation/Studiengangstyp_model.php | 14 +++ .../organisation/Studienordnung_model.php | 14 +++ .../Studienordnungstatus_model.php | 14 +++ .../organisation/Studienplatz_model.php | 14 +++ .../models/person/Bankverbindung_model.php | 14 +++ .../models/person/Benutzergruppe_model.php | 15 ++++ .../models/person/Fotostatus_model.php | 14 +++ application/models/person/Freebusy_model.php | 14 +++ .../models/person/Freebusytyp_model.php | 14 +++ .../models/person/Kontaktmedium_model.php | 14 +++ .../models/person/Kontakttyp_model.php | 14 +++ application/models/person/Notiz_model.php | 32 +++---- .../models/person/Notizzuordnung_model.php | 14 +++ .../models/project/Aktivitaet_model.php | 14 +++ .../models/project/Aufwandstyp_model.php | 14 +++ .../project/Projekt_ressource_model.php | 14 +++ .../models/project/Projektphase_model.php | 14 +++ .../models/project/Projekttask_model.php | 14 +++ .../models/project/Ressource_model.php | 14 +++ .../models/project/Scrumsprint_model.php | 14 +++ .../models/ressource/Betriebsmittel_model.php | 14 +++ .../ressource/Betriebsmittelperson_model.php | 14 +++ .../ressource/Betriebsmittelstatus_model.php | 14 +++ .../ressource/Betriebsmitteltyp_model.php | 14 +++ application/models/ressource/Coodle_model.php | 14 +++ .../models/ressource/Erreichbarkeit_model.php | 14 +++ application/models/ressource/Firma_model.php | 14 +++ .../models/ressource/Firmatag_model.php | 14 +++ .../models/ressource/Firmentyp_model.php | 14 +++ .../models/ressource/Funktion_model.php | 14 +++ .../models/ressource/Lehrmittel_model.php | 14 +++ .../models/ressource/Mitarbeiter_model.php | 14 +++ application/models/ressource/Ort_model.php | 23 +++++ .../models/ressource/Ortraumtyp_model.php | 14 +++ .../Personfunktionstandort_model.php | 14 +++ .../models/ressource/Raumtyp_model.php | 14 +++ .../models/ressource/Reservierung_model.php | 14 +++ application/models/ressource/Stunde_model.php | 14 +++ .../models/ressource/Stundenplan_model.php | 14 +++ .../ressource/Zeitaufzeichnung_model.php | 14 +++ .../models/ressource/Zeitsperre_model.php | 14 +++ .../models/ressource/Zeitsperretyp_model.php | 14 +++ .../models/ressource/Zeitwunsch_model.php | 14 +++ .../models/system/Berechtigung_model.php | 14 +++ application/models/system/Cronjob_model.php | 14 +++ application/models/system/Filter_model.php | 14 +++ application/models/system/Log_model.php | 14 +++ application/models/system/Message_model.php | 4 +- .../models/system/PersonLock_model.php | 88 +++++++++++++++++++ application/models/system/Rolle_model.php | 14 +++ .../models/system/Rolleberechtigung_model.php | 14 +++ application/models/system/Server_model.php | 14 +++ application/models/system/Tag_model.php | 14 +++ application/models/system/Variable_model.php | 14 +++ .../models/system/Webservicelog_model.php | 14 +++ .../models/system/Webservicerecht_model.php | 14 +++ .../models/system/Webservicetyp_model.php | 14 +++ application/models/testtool/Ablauf_model.php | 14 +++ application/models/testtool/Antwort_model.php | 14 +++ application/models/testtool/Frage_model.php | 14 +++ application/models/testtool/Gebiet_model.php | 14 +++ .../models/testtool/Kategorie_model.php | 14 +++ .../models/testtool/Kriterien_model.php | 14 +++ .../models/testtool/Pruefling_model.php | 14 +++ .../models/testtool/Vorschlag_model.php | 14 +++ application/widgets/Nation_widget.php | 4 +- application/widgets/Zgv_widget.php | 4 +- 147 files changed, 2132 insertions(+), 46 deletions(-) create mode 100644 application/models/accounting/Aufteilung_model.php create mode 100644 application/models/accounting/Bestelldetail_model.php create mode 100644 application/models/accounting/Bestelldetailtag_model.php create mode 100644 application/models/accounting/Bestellstatus_model.php create mode 100644 application/models/accounting/Bestellung_model.php create mode 100644 application/models/accounting/Bestellungtag_model.php create mode 100644 application/models/accounting/Buchung_model.php create mode 100644 application/models/accounting/Buchungstyp_model.php create mode 100644 application/models/accounting/Budget_model.php create mode 100644 application/models/accounting/Rechnung_model.php create mode 100644 application/models/accounting/Rechnungsbetrag_model.php create mode 100644 application/models/accounting/Rechnungstyp_model.php create mode 100644 application/models/accounting/Vertrag_model.php create mode 100644 application/models/accounting/Vertragsstatus_model.php create mode 100644 application/models/accounting/Vertragstyp_model.php create mode 100644 application/models/accounting/Zahlungstyp_model.php create mode 100644 application/models/codex/Akadgrad_model.php create mode 100644 application/models/codex/Archiv_model.php create mode 100644 application/models/codex/Aufmerksamdurch_model.php create mode 100644 application/models/codex/Ausbildung_model.php create mode 100644 application/models/codex/Berufstaetigkeit_model.php create mode 100644 application/models/codex/Beschaeftigungsausmass_model.php create mode 100644 application/models/codex/Besqual_model.php create mode 100644 application/models/codex/Bisfunktion_model.php create mode 100644 application/models/codex/Bisio_model.php create mode 100644 application/models/codex/Bisorgform_model.php create mode 100644 application/models/codex/Bisverwendung_model.php create mode 100644 application/models/codex/Bundesland_model.php create mode 100644 application/models/codex/Entwicklungsteam_model.php create mode 100644 application/models/codex/Gemeinde_model.php create mode 100644 application/models/codex/Hauptberuf_model.php create mode 100644 application/models/codex/Lehrform_model.php create mode 100644 application/models/codex/Lgartcode_model.php create mode 100644 application/models/codex/Mobilitaetsprogramm_model.php create mode 100644 application/models/codex/Nation_model.php create mode 100644 application/models/codex/Note_model.php create mode 100644 application/models/codex/Verwendung_model.php create mode 100644 application/models/codex/Zgv_model.php create mode 100644 application/models/codex/Zgvdoktor_model.php create mode 100644 application/models/codex/Zgvgruppe_model.php create mode 100644 application/models/codex/Zgvmaster_model.php create mode 100644 application/models/codex/Zweck_model.php create mode 100644 application/models/content/Content_model.php create mode 100644 application/models/content/Contentchild_model.php create mode 100644 application/models/content/Contentgruppe_model.php create mode 100644 application/models/content/Contentlog_model.php create mode 100644 application/models/content/Contentsprache_model.php create mode 100644 application/models/content/Infoscreen_model.php create mode 100644 application/models/content/News_model.php create mode 100644 application/models/content/Template_model.php create mode 100644 application/models/content/Veranstaltung_model.php create mode 100644 application/models/content/Veranstaltungskategorie_model.php create mode 100644 application/models/crm/Aufnahmeschluessel_model.php create mode 100644 application/models/crm/Bewerbungstermine_model.php create mode 100644 application/models/crm/Buchungstyp_model.php create mode 100644 application/models/crm/Dokument_model.php create mode 100644 application/models/crm/Dokumentprestudent_model.php create mode 100644 application/models/crm/Konto_model.php create mode 100644 application/models/crm/Preincoming_model.php create mode 100644 application/models/crm/Preinteressent_model.php create mode 100644 application/models/crm/Preinteressentstudiengang_model.php create mode 100644 application/models/crm/Preoutgoing_model.php create mode 100644 application/models/crm/Student_model.php create mode 100644 application/models/education/Uebung_model.php create mode 100644 application/models/organisation/Erhalter_model.php create mode 100644 application/models/organisation/Fachbereich_model.php create mode 100644 application/models/organisation/Ferien_model.php create mode 100644 application/models/organisation/Lehrverband_model.php create mode 100644 application/models/organisation/Organisationseinheittyp_model.php create mode 100644 application/models/organisation/Semesterwochen_model.php create mode 100644 application/models/organisation/Service_model.php create mode 100644 application/models/organisation/Standort_model.php create mode 100644 application/models/organisation/Statistik_model.php create mode 100644 application/models/organisation/Studiengangstyp_model.php create mode 100644 application/models/organisation/Studienordnung_model.php create mode 100644 application/models/organisation/Studienordnungstatus_model.php create mode 100644 application/models/organisation/Studienplatz_model.php create mode 100644 application/models/person/Bankverbindung_model.php create mode 100644 application/models/person/Benutzergruppe_model.php create mode 100644 application/models/person/Fotostatus_model.php create mode 100644 application/models/person/Freebusy_model.php create mode 100644 application/models/person/Freebusytyp_model.php create mode 100644 application/models/person/Kontaktmedium_model.php create mode 100644 application/models/person/Kontakttyp_model.php create mode 100644 application/models/person/Notizzuordnung_model.php create mode 100644 application/models/project/Aktivitaet_model.php create mode 100644 application/models/project/Aufwandstyp_model.php create mode 100644 application/models/project/Projekt_ressource_model.php create mode 100644 application/models/project/Projektphase_model.php create mode 100644 application/models/project/Projekttask_model.php create mode 100644 application/models/project/Ressource_model.php create mode 100644 application/models/project/Scrumsprint_model.php create mode 100644 application/models/ressource/Betriebsmittel_model.php create mode 100644 application/models/ressource/Betriebsmittelperson_model.php create mode 100644 application/models/ressource/Betriebsmittelstatus_model.php create mode 100644 application/models/ressource/Betriebsmitteltyp_model.php create mode 100644 application/models/ressource/Coodle_model.php create mode 100644 application/models/ressource/Erreichbarkeit_model.php create mode 100644 application/models/ressource/Firma_model.php create mode 100644 application/models/ressource/Firmatag_model.php create mode 100644 application/models/ressource/Firmentyp_model.php create mode 100644 application/models/ressource/Funktion_model.php create mode 100644 application/models/ressource/Lehrmittel_model.php create mode 100644 application/models/ressource/Mitarbeiter_model.php create mode 100644 application/models/ressource/Ort_model.php create mode 100644 application/models/ressource/Ortraumtyp_model.php create mode 100644 application/models/ressource/Personfunktionstandort_model.php create mode 100644 application/models/ressource/Raumtyp_model.php create mode 100644 application/models/ressource/Reservierung_model.php create mode 100644 application/models/ressource/Stunde_model.php create mode 100644 application/models/ressource/Stundenplan_model.php create mode 100644 application/models/ressource/Zeitaufzeichnung_model.php create mode 100644 application/models/ressource/Zeitsperre_model.php create mode 100644 application/models/ressource/Zeitsperretyp_model.php create mode 100644 application/models/ressource/Zeitwunsch_model.php create mode 100644 application/models/system/Berechtigung_model.php create mode 100644 application/models/system/Cronjob_model.php create mode 100644 application/models/system/Filter_model.php create mode 100644 application/models/system/Log_model.php create mode 100644 application/models/system/PersonLock_model.php create mode 100644 application/models/system/Rolle_model.php create mode 100644 application/models/system/Rolleberechtigung_model.php create mode 100644 application/models/system/Server_model.php create mode 100644 application/models/system/Tag_model.php create mode 100644 application/models/system/Variable_model.php create mode 100644 application/models/system/Webservicelog_model.php create mode 100644 application/models/system/Webservicerecht_model.php create mode 100644 application/models/system/Webservicetyp_model.php create mode 100644 application/models/testtool/Ablauf_model.php create mode 100644 application/models/testtool/Antwort_model.php create mode 100644 application/models/testtool/Frage_model.php create mode 100644 application/models/testtool/Gebiet_model.php create mode 100644 application/models/testtool/Kategorie_model.php create mode 100644 application/models/testtool/Kriterien_model.php create mode 100644 application/models/testtool/Pruefling_model.php create mode 100644 application/models/testtool/Vorschlag_model.php diff --git a/application/controllers/api/v1/codex/Nation.php b/application/controllers/api/v1/codex/Nation.php index a8074bd82..ad6c5e10e 100644 --- a/application/controllers/api/v1/codex/Nation.php +++ b/application/controllers/api/v1/codex/Nation.php @@ -23,17 +23,17 @@ class Nation extends APIv1_Controller { parent::__construct(array('Nation' => 'basis/nation:r', 'All' => 'basis/nation:r')); // Load model NationModel - $this->load->model('codex/nation_model', 'NationModel'); + $this->load->model('codex/Nation_model', 'NationModel'); } - + public function getNation() { $nation_code = $this->get("nation_code"); - + if (isset($nation_code)) { $result = $this->NationModel->loadWhere(array('nation_code' => $nation_code)); - + $this->response($result, REST_Controller::HTTP_OK); } else @@ -41,7 +41,7 @@ class Nation extends APIv1_Controller $this->response(); } } - + public function getAll() { if (!$this->get('orderEnglish')) @@ -52,7 +52,7 @@ class Nation extends APIv1_Controller { $result = $this->NationModel->addOrder('engltext'); } - + if (isSuccess($result)) { if ($this->get('ohnesperre')) @@ -64,7 +64,7 @@ class Nation extends APIv1_Controller $result = $this->NationModel->load(); } } - + $this->response($result, REST_Controller::HTTP_OK); } -} \ No newline at end of file +} diff --git a/application/controllers/api/v1/codex/Zgv.php b/application/controllers/api/v1/codex/Zgv.php index d042b2b56..b1a0981dc 100644 --- a/application/controllers/api/v1/codex/Zgv.php +++ b/application/controllers/api/v1/codex/Zgv.php @@ -23,7 +23,7 @@ class Zgv extends APIv1_Controller { parent::__construct(array('Zgv' => 'basis/zgv:rw')); // Load model ZgvModel - $this->load->model('codex/zgv_model', 'ZgvModel'); + $this->load->model('codex/Zgv_model', 'ZgvModel'); } /** diff --git a/application/controllers/api/v1/crm/Bewerbungstermine.php b/application/controllers/api/v1/crm/Bewerbungstermine.php index 8d3c8b774..55d49ff58 100644 --- a/application/controllers/api/v1/crm/Bewerbungstermine.php +++ b/application/controllers/api/v1/crm/Bewerbungstermine.php @@ -30,7 +30,7 @@ class Bewerbungstermine extends APIv1_Controller ) ); // Load model BewerbungstermineModel - $this->load->model('crm/bewerbungstermine_model', 'BewerbungstermineModel'); + $this->load->model('crm/Bewerbungstermine_model', 'BewerbungstermineModel'); } diff --git a/application/controllers/api/v1/crm/Dokumentprestudent.php b/application/controllers/api/v1/crm/Dokumentprestudent.php index 020a876cd..e05815d33 100644 --- a/application/controllers/api/v1/crm/Dokumentprestudent.php +++ b/application/controllers/api/v1/crm/Dokumentprestudent.php @@ -29,7 +29,7 @@ class Dokumentprestudent extends APIv1_Controller ) ); // Load model DokumentprestudentModel - $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); + $this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel'); } /** diff --git a/application/controllers/api/v1/person/Notizzuordnung.php b/application/controllers/api/v1/person/Notizzuordnung.php index c5dab8cbe..da185e20f 100644 --- a/application/controllers/api/v1/person/Notizzuordnung.php +++ b/application/controllers/api/v1/person/Notizzuordnung.php @@ -23,7 +23,7 @@ class Notizzuordnung extends APIv1_Controller { parent::__construct(array('Notizzuordnung' => 'basis/notizzuordnung:rw')); // Load model NotizzuordnungModel - $this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel'); + $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); } diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 3dc2919e1..575f1f23b 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -102,15 +102,15 @@ class InfoCenter extends Auth_Controller ); // Loads models - $this->load->model('crm/akte_model', 'AkteModel'); - $this->load->model('crm/prestudent_model', 'PrestudentModel'); - $this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel'); - $this->load->model('crm/statusgrund_model', 'StatusgrundModel'); - $this->load->model('person/notiz_model', 'NotizModel'); - $this->load->model('person/person_model', 'PersonModel'); - $this->load->model('system/message_model', 'MessageModel'); - $this->load->model('system/filters_model', 'FiltersModel'); - $this->load->model('system/personLock_model', 'PersonLockModel'); + $this->load->model('crm/Akte_model', 'AkteModel'); + $this->load->model('crm/Prestudent_model', 'PrestudentModel'); + $this->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel'); + $this->load->model('crm/Statusgrund_model', 'StatusgrundModel'); + $this->load->model('person/Notiz_model', 'NotizModel'); + $this->load->model('person/Person_model', 'PersonModel'); + $this->load->model('system/Message_model', 'MessageModel'); + $this->load->model('system/Filters_model', 'FiltersModel'); + $this->load->model('system/PersonLock_model', 'PersonLockModel'); // Loads libraries $this->load->library('PersonLogLib'); @@ -522,7 +522,7 @@ class InfoCenter extends Auth_Controller if (isSuccess($result)) { - $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); + $this->load->model('crm/Dokumentprestudent_model', 'DokumentprestudentModel'); //set documents which have been formal geprüft to accepted $dokument_kurzbzs = array(); diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5f3f40e6d..5a0a77a31 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@ dbTable = 'wawi.tbl_aufteilung'; + $this->pk = 'aufteilung_id'; + } +} diff --git a/application/models/accounting/Bestelldetail_model.php b/application/models/accounting/Bestelldetail_model.php new file mode 100644 index 000000000..dd57002d1 --- /dev/null +++ b/application/models/accounting/Bestelldetail_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestelldetail'; + $this->pk = 'bestelldetail_id'; + } +} diff --git a/application/models/accounting/Bestelldetailtag_model.php b/application/models/accounting/Bestelldetailtag_model.php new file mode 100644 index 000000000..a760c26a2 --- /dev/null +++ b/application/models/accounting/Bestelldetailtag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestelldetailtag'; + $this->pk = array('bestelldetail_id', 'tag'); + } +} diff --git a/application/models/accounting/Bestellstatus_model.php b/application/models/accounting/Bestellstatus_model.php new file mode 100644 index 000000000..0f9810818 --- /dev/null +++ b/application/models/accounting/Bestellstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellstatus'; + $this->pk = 'bestellstatus_kurzbz'; + } +} diff --git a/application/models/accounting/Bestellung_model.php b/application/models/accounting/Bestellung_model.php new file mode 100644 index 000000000..0d0ea37f8 --- /dev/null +++ b/application/models/accounting/Bestellung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellung'; + $this->pk = 'bestellung_id'; + } +} diff --git a/application/models/accounting/Bestellungtag_model.php b/application/models/accounting/Bestellungtag_model.php new file mode 100644 index 000000000..77c7416f5 --- /dev/null +++ b/application/models/accounting/Bestellungtag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_bestellungtag'; + $this->pk = array('bestellung_id', 'tag'); + } +} diff --git a/application/models/accounting/Buchung_model.php b/application/models/accounting/Buchung_model.php new file mode 100644 index 000000000..adc700dfc --- /dev/null +++ b/application/models/accounting/Buchung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_buchung'; + $this->pk = 'buchung_id'; + } +} diff --git a/application/models/accounting/Buchungstyp_model.php b/application/models/accounting/Buchungstyp_model.php new file mode 100644 index 000000000..7ed47217d --- /dev/null +++ b/application/models/accounting/Buchungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_buchungstyp'; + $this->pk = 'buchungstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Budget_model.php b/application/models/accounting/Budget_model.php new file mode 100644 index 000000000..f425f3479 --- /dev/null +++ b/application/models/accounting/Budget_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_budget'; + $this->pk = array('kostenstelle_id', 'geschaeftsjahr_kurzbz'); + } +} diff --git a/application/models/accounting/Rechnung_model.php b/application/models/accounting/Rechnung_model.php new file mode 100644 index 000000000..6e5ddcf83 --- /dev/null +++ b/application/models/accounting/Rechnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnung'; + $this->pk = 'rechnung_id'; + } +} diff --git a/application/models/accounting/Rechnungsbetrag_model.php b/application/models/accounting/Rechnungsbetrag_model.php new file mode 100644 index 000000000..11617429c --- /dev/null +++ b/application/models/accounting/Rechnungsbetrag_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnungsbetrag'; + $this->pk = 'rechnungsbetrag_id'; + } +} diff --git a/application/models/accounting/Rechnungstyp_model.php b/application/models/accounting/Rechnungstyp_model.php new file mode 100644 index 000000000..3f1e0633e --- /dev/null +++ b/application/models/accounting/Rechnungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_rechnungstyp'; + $this->pk = 'rechnungstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Vertrag_model.php b/application/models/accounting/Vertrag_model.php new file mode 100644 index 000000000..cd4b466d6 --- /dev/null +++ b/application/models/accounting/Vertrag_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertrag'; + $this->pk = 'vertrag_id'; + } +} diff --git a/application/models/accounting/Vertragsstatus_model.php b/application/models/accounting/Vertragsstatus_model.php new file mode 100644 index 000000000..21367b84a --- /dev/null +++ b/application/models/accounting/Vertragsstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertragsstatus'; + $this->pk = 'vertragsstatus_kurzbz'; + } +} diff --git a/application/models/accounting/Vertragstyp_model.php b/application/models/accounting/Vertragstyp_model.php new file mode 100644 index 000000000..42d248217 --- /dev/null +++ b/application/models/accounting/Vertragstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_vertragstyp'; + $this->pk = 'vertragstyp_kurzbz'; + } +} diff --git a/application/models/accounting/Zahlungstyp_model.php b/application/models/accounting/Zahlungstyp_model.php new file mode 100644 index 000000000..5ab7350ab --- /dev/null +++ b/application/models/accounting/Zahlungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_zahlungstyp'; + $this->pk = 'zahlungstyp_kurzbz'; + } +} diff --git a/application/models/codex/Akadgrad_model.php b/application/models/codex/Akadgrad_model.php new file mode 100644 index 000000000..0623ef3ab --- /dev/null +++ b/application/models/codex/Akadgrad_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_akadgrad'; + $this->pk = 'akadgrad_id'; + } +} diff --git a/application/models/codex/Archiv_model.php b/application/models/codex/Archiv_model.php new file mode 100644 index 000000000..45cde5a00 --- /dev/null +++ b/application/models/codex/Archiv_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_archiv'; + $this->pk = 'archiv_id'; + } +} diff --git a/application/models/codex/Aufmerksamdurch_model.php b/application/models/codex/Aufmerksamdurch_model.php new file mode 100644 index 000000000..2c5f5d2c6 --- /dev/null +++ b/application/models/codex/Aufmerksamdurch_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_aufmerksamdurch'; + $this->pk = 'aufmerksamdurch_kurzbz'; + } +} diff --git a/application/models/codex/Ausbildung_model.php b/application/models/codex/Ausbildung_model.php new file mode 100644 index 000000000..8cadcb92d --- /dev/null +++ b/application/models/codex/Ausbildung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_ausbildung'; + $this->pk = 'ausbildungcode'; + } +} diff --git a/application/models/codex/Berufstaetigkeit_model.php b/application/models/codex/Berufstaetigkeit_model.php new file mode 100644 index 000000000..59b39d775 --- /dev/null +++ b/application/models/codex/Berufstaetigkeit_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_berufstaetigkeit'; + $this->pk = 'berufstaetigkeit_code'; + } +} diff --git a/application/models/codex/Beschaeftigungsausmass_model.php b/application/models/codex/Beschaeftigungsausmass_model.php new file mode 100644 index 000000000..3b54fa310 --- /dev/null +++ b/application/models/codex/Beschaeftigungsausmass_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_beschaeftigungsausmass'; + $this->pk = 'beschausmasscode'; + } +} diff --git a/application/models/codex/Besqual_model.php b/application/models/codex/Besqual_model.php new file mode 100644 index 000000000..b89cb123a --- /dev/null +++ b/application/models/codex/Besqual_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_besqual'; + $this->pk = 'besqualcode'; + } +} diff --git a/application/models/codex/Bisfunktion_model.php b/application/models/codex/Bisfunktion_model.php new file mode 100644 index 000000000..72135ecc0 --- /dev/null +++ b/application/models/codex/Bisfunktion_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisfunktion'; + $this->pk = array('studiengang_kz', 'bisverwendung_id'); + } +} diff --git a/application/models/codex/Bisio_model.php b/application/models/codex/Bisio_model.php new file mode 100644 index 000000000..5f35aec9a --- /dev/null +++ b/application/models/codex/Bisio_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisio'; + $this->pk = 'bisio_id'; + } +} diff --git a/application/models/codex/Bisorgform_model.php b/application/models/codex/Bisorgform_model.php new file mode 100644 index 000000000..c489c849c --- /dev/null +++ b/application/models/codex/Bisorgform_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisorgform'; + $this->pk = 'bisorgform_kurzbz'; + } +} diff --git a/application/models/codex/Bisverwendung_model.php b/application/models/codex/Bisverwendung_model.php new file mode 100644 index 000000000..fa2cf84d0 --- /dev/null +++ b/application/models/codex/Bisverwendung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bisverwendung'; + $this->pk = 'bisverwendung_id'; + } +} diff --git a/application/models/codex/Bundesland_model.php b/application/models/codex/Bundesland_model.php new file mode 100644 index 000000000..03a4774ce --- /dev/null +++ b/application/models/codex/Bundesland_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_bundesland'; + $this->pk = 'bundesland_code'; + } +} diff --git a/application/models/codex/Entwicklungsteam_model.php b/application/models/codex/Entwicklungsteam_model.php new file mode 100644 index 000000000..5cf21c23b --- /dev/null +++ b/application/models/codex/Entwicklungsteam_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_entwicklungsteam'; + $this->pk = array('studiengang_kz', 'mitarbeiter_uid'); + } +} diff --git a/application/models/codex/Gemeinde_model.php b/application/models/codex/Gemeinde_model.php new file mode 100644 index 000000000..c782346a0 --- /dev/null +++ b/application/models/codex/Gemeinde_model.php @@ -0,0 +1,22 @@ +dbTable = "bis.tbl_gemeinde"; + $this->pk = "gemeinde_id"; + } + + public function getGemeindeByPlz($plz) + { + $this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer"); + $this->addOrder("ortschaftsname"); + + return $this->loadWhere(array("plz" => $plz)); + } +} \ No newline at end of file diff --git a/application/models/codex/Hauptberuf_model.php b/application/models/codex/Hauptberuf_model.php new file mode 100644 index 000000000..7ae7ee44d --- /dev/null +++ b/application/models/codex/Hauptberuf_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_hauptberuf'; + $this->pk = 'hauptberufcode'; + } +} diff --git a/application/models/codex/Lehrform_model.php b/application/models/codex/Lehrform_model.php new file mode 100644 index 000000000..dc53b3085 --- /dev/null +++ b/application/models/codex/Lehrform_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_lehrform'; + $this->pk = 'lehrform_kurzbz'; + } +} diff --git a/application/models/codex/Lgartcode_model.php b/application/models/codex/Lgartcode_model.php new file mode 100644 index 000000000..a2c09c00e --- /dev/null +++ b/application/models/codex/Lgartcode_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_lgartcode'; + $this->pk = 'lgartcode'; + } +} diff --git a/application/models/codex/Mobilitaetsprogramm_model.php b/application/models/codex/Mobilitaetsprogramm_model.php new file mode 100644 index 000000000..5fd46e725 --- /dev/null +++ b/application/models/codex/Mobilitaetsprogramm_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_mobilitaetsprogramm'; + $this->pk = 'mobilitaetsprogramm_code'; + } +} diff --git a/application/models/codex/Nation_model.php b/application/models/codex/Nation_model.php new file mode 100644 index 000000000..239639795 --- /dev/null +++ b/application/models/codex/Nation_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_nation'; + $this->pk = 'nation_code'; + } +} \ No newline at end of file diff --git a/application/models/codex/Note_model.php b/application/models/codex/Note_model.php new file mode 100644 index 000000000..e83ee2f48 --- /dev/null +++ b/application/models/codex/Note_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_note'; + $this->pk = 'note'; + } +} diff --git a/application/models/codex/Verwendung_model.php b/application/models/codex/Verwendung_model.php new file mode 100644 index 000000000..509b0388b --- /dev/null +++ b/application/models/codex/Verwendung_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_verwendung'; + $this->pk = 'verwendung_code'; + } +} diff --git a/application/models/codex/Zgv_model.php b/application/models/codex/Zgv_model.php new file mode 100644 index 000000000..1e1ba99ad --- /dev/null +++ b/application/models/codex/Zgv_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgv'; + $this->pk = 'zgv_code'; + } +} diff --git a/application/models/codex/Zgvdoktor_model.php b/application/models/codex/Zgvdoktor_model.php new file mode 100644 index 000000000..8caf397e0 --- /dev/null +++ b/application/models/codex/Zgvdoktor_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgvdoktor'; + $this->pk = 'zgvdoktor_code'; + } +} diff --git a/application/models/codex/Zgvgruppe_model.php b/application/models/codex/Zgvgruppe_model.php new file mode 100644 index 000000000..69da70271 --- /dev/null +++ b/application/models/codex/Zgvgruppe_model.php @@ -0,0 +1,13 @@ +dbTable = 'bis.tbl_zgvgruppe'; + $this->pk = 'gruppe_kurzbz'; + } +} \ No newline at end of file diff --git a/application/models/codex/Zgvmaster_model.php b/application/models/codex/Zgvmaster_model.php new file mode 100644 index 000000000..38f8a0dcb --- /dev/null +++ b/application/models/codex/Zgvmaster_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zgvmaster'; + $this->pk = 'zgvmas_code'; + } +} diff --git a/application/models/codex/Zweck_model.php b/application/models/codex/Zweck_model.php new file mode 100644 index 000000000..600e9fb40 --- /dev/null +++ b/application/models/codex/Zweck_model.php @@ -0,0 +1,14 @@ +dbTable = 'bis.tbl_zweck'; + $this->pk = 'zweck_code'; + } +} diff --git a/application/models/content/Content_model.php b/application/models/content/Content_model.php new file mode 100644 index 000000000..ee4315ebd --- /dev/null +++ b/application/models/content/Content_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_content'; + $this->pk = 'content_id'; + } +} diff --git a/application/models/content/Contentchild_model.php b/application/models/content/Contentchild_model.php new file mode 100644 index 000000000..11738d144 --- /dev/null +++ b/application/models/content/Contentchild_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentchild'; + $this->pk = 'contentchild_id'; + } +} diff --git a/application/models/content/Contentgruppe_model.php b/application/models/content/Contentgruppe_model.php new file mode 100644 index 000000000..03efc87b1 --- /dev/null +++ b/application/models/content/Contentgruppe_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentgruppe'; + $this->pk = array('gruppe_kurzbz', 'content_id'); + } +} diff --git a/application/models/content/Contentlog_model.php b/application/models/content/Contentlog_model.php new file mode 100644 index 000000000..025cb94aa --- /dev/null +++ b/application/models/content/Contentlog_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentlog'; + $this->pk = 'contentlog_id'; + } +} diff --git a/application/models/content/Contentsprache_model.php b/application/models/content/Contentsprache_model.php new file mode 100644 index 000000000..eb7e257b2 --- /dev/null +++ b/application/models/content/Contentsprache_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_contentsprache'; + $this->pk = 'contentsprache_id'; + } +} diff --git a/application/models/content/Infoscreen_model.php b/application/models/content/Infoscreen_model.php new file mode 100644 index 000000000..c4134ff06 --- /dev/null +++ b/application/models/content/Infoscreen_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_infoscreen'; + $this->pk = 'infoscreen_id'; + } +} diff --git a/application/models/content/News_model.php b/application/models/content/News_model.php new file mode 100644 index 000000000..8d636d808 --- /dev/null +++ b/application/models/content/News_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_news'; + $this->pk = 'news_id'; + } +} diff --git a/application/models/content/Template_model.php b/application/models/content/Template_model.php new file mode 100644 index 000000000..6f452e23c --- /dev/null +++ b/application/models/content/Template_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_template'; + $this->pk = 'template_kurzbz'; + } +} diff --git a/application/models/content/Veranstaltung_model.php b/application/models/content/Veranstaltung_model.php new file mode 100644 index 000000000..48e7bc2cc --- /dev/null +++ b/application/models/content/Veranstaltung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_veranstaltung'; + $this->pk = 'veranstaltung_id'; + } +} diff --git a/application/models/content/Veranstaltungskategorie_model.php b/application/models/content/Veranstaltungskategorie_model.php new file mode 100644 index 000000000..85d069735 --- /dev/null +++ b/application/models/content/Veranstaltungskategorie_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_veranstaltungskategorie'; + $this->pk = 'veranstaltungskategorie_kurzbz'; + } +} diff --git a/application/models/crm/Aufnahmeschluessel_model.php b/application/models/crm/Aufnahmeschluessel_model.php new file mode 100644 index 000000000..df74791bb --- /dev/null +++ b/application/models/crm/Aufnahmeschluessel_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_aufnahmeschluessel'; + $this->pk = 'aufnahmeschluessel'; + } +} diff --git a/application/models/crm/Bewerbungstermine_model.php b/application/models/crm/Bewerbungstermine_model.php new file mode 100644 index 000000000..74326a702 --- /dev/null +++ b/application/models/crm/Bewerbungstermine_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_bewerbungstermine'; + $this->pk = 'bewerbungstermin_id'; + } +} diff --git a/application/models/crm/Buchungstyp_model.php b/application/models/crm/Buchungstyp_model.php new file mode 100644 index 000000000..f06e45eb2 --- /dev/null +++ b/application/models/crm/Buchungstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_buchungstyp'; + $this->pk = 'buchungstyp_kurzbz'; + } +} diff --git a/application/models/crm/Dokument_model.php b/application/models/crm/Dokument_model.php new file mode 100644 index 000000000..7ef2be716 --- /dev/null +++ b/application/models/crm/Dokument_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_dokument'; + $this->pk = 'dokument_kurzbz'; + } +} diff --git a/application/models/crm/Dokumentprestudent_model.php b/application/models/crm/Dokumentprestudent_model.php new file mode 100644 index 000000000..ab4764479 --- /dev/null +++ b/application/models/crm/Dokumentprestudent_model.php @@ -0,0 +1,71 @@ +dbTable = 'public.tbl_dokumentprestudent'; + $this->pk = array('prestudent_id', 'dokument_kurzbz'); + } + + /** + * setAccepted + */ + public function setAccepted($prestudent_id, $studiengang_kz) + { + $result = null; + + if (is_numeric($prestudent_id) && is_numeric($studiengang_kz)) + { + $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( + SELECT ds.dokument_kurzbz, + p.prestudent_id, + NOW() AS insertamum + FROM (SELECT DISTINCT person_id, dokument_kurzbz FROM public.tbl_akte) a + INNER JOIN public.tbl_prestudent p USING(person_id) + INNER JOIN public.tbl_dokumentstudiengang ds USING(dokument_kurzbz, studiengang_kz) + LEFT JOIN public.tbl_dokumentprestudent dp USING(dokument_kurzbz, prestudent_id) + WHERE ds.onlinebewerbung IS TRUE + AND (dp.dokument_kurzbz IS NULL AND dp.prestudent_id IS NULL) + AND p.prestudent_id = ? + AND ds.studiengang_kz = ? + )'; + + $result = $this->execQuery($query, array($prestudent_id, $studiengang_kz)); + } + + return $result; + } + + /** + * setAcceptedDocuments + */ + public function setAcceptedDocuments($prestudent_id, $dokument_kurzbz) + { + $result = null; + + if (is_numeric($prestudent_id) && is_array($dokument_kurzbz) && count($dokument_kurzbz) > 0) + { + $query = 'INSERT INTO public.tbl_dokumentprestudent (dokument_kurzbz, prestudent_id, insertamum) ( + SELECT d.dokument_kurzbz, + ? AS prestudent_id, + NOW() AS insertamum + FROM public.tbl_dokument d + WHERE d.dokument_kurzbz IN ? + AND d.dokument_kurzbz NOT IN ( + SELECT dokument_kurzbz + FROM public.tbl_dokumentprestudent + WHERE prestudent_id = ? + ) + )'; + + $result = $this->execQuery($query, array($prestudent_id, $dokument_kurzbz, $prestudent_id)); + } + + return $result; + } +} diff --git a/application/models/crm/Konto_model.php b/application/models/crm/Konto_model.php new file mode 100644 index 000000000..286d3189e --- /dev/null +++ b/application/models/crm/Konto_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_konto'; + $this->pk = 'buchungsnr'; + } +} diff --git a/application/models/crm/Preincoming_model.php b/application/models/crm/Preincoming_model.php new file mode 100644 index 000000000..f9906781f --- /dev/null +++ b/application/models/crm/Preincoming_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preincoming'; + $this->pk = 'preincoming_id'; + } +} diff --git a/application/models/crm/Preinteressent_model.php b/application/models/crm/Preinteressent_model.php new file mode 100644 index 000000000..bfc2a8afa --- /dev/null +++ b/application/models/crm/Preinteressent_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preinteressent'; + $this->pk = 'preinteressent_id'; + } +} diff --git a/application/models/crm/Preinteressentstudiengang_model.php b/application/models/crm/Preinteressentstudiengang_model.php new file mode 100644 index 000000000..4ed665840 --- /dev/null +++ b/application/models/crm/Preinteressentstudiengang_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preinteressentstudiengang'; + $this->pk = array('preinteressent_id', 'studiengang_kz'); + } +} diff --git a/application/models/crm/Preoutgoing_model.php b/application/models/crm/Preoutgoing_model.php new file mode 100644 index 000000000..e9e8e76fd --- /dev/null +++ b/application/models/crm/Preoutgoing_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_preoutgoing'; + $this->pk = 'preoutgoing_id'; + } +} diff --git a/application/models/crm/Student_model.php b/application/models/crm/Student_model.php new file mode 100644 index 000000000..532658208 --- /dev/null +++ b/application/models/crm/Student_model.php @@ -0,0 +1,48 @@ +dbTable = 'public.tbl_student'; + $this->pk = array('student_uid'); + $this->hasSequence = false; + } + + // **** + // * Generiert die Matrikelnummer + // * FORMAT: 0710254001 + // * 07 = Jahr + // * 1/2/0 = WS/SS/incoming + // * 0254 = Studiengangskennzahl vierstellig + // * 001 = Laufende Nummer + // **** + public function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz) + { + $jahr = mb_substr($studiensemester_kurzbz, 4); + $sem = mb_substr($studiensemester_kurzbz, 0, 2); + if ($sem == 'SS') + $jahr = $jahr - 1; + $art = 0; + + $matrikelnummer = sprintf("%02d", $jahr).$art.sprintf("%04d", $studiengang_kz); + + $qry = "SELECT matrikelnr FROM public.tbl_student WHERE matrikelnr LIKE ? ORDER BY matrikelnr DESC LIMIT 1"; + + $matrikelnrres = $this->execQuery($qry, array($matrikelnummer.'%')); + + if (hasData($matrikelnrres)) + { + $max = mb_substr($matrikelnrres->retval[0]->matrikelnr, 7); + } + else + $max = 0; + + $max += 1; + return $matrikelnummer.sprintf("%03d", $max); + } +} diff --git a/application/models/education/Uebung_model.php b/application/models/education/Uebung_model.php new file mode 100644 index 000000000..199328225 --- /dev/null +++ b/application/models/education/Uebung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_uebung'; + $this->pk = 'uebung_id'; + } +} diff --git a/application/models/organisation/Erhalter_model.php b/application/models/organisation/Erhalter_model.php new file mode 100644 index 000000000..607d9ccd9 --- /dev/null +++ b/application/models/organisation/Erhalter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_erhalter'; + $this->pk = 'erhalter_kz'; + } +} diff --git a/application/models/organisation/Fachbereich_model.php b/application/models/organisation/Fachbereich_model.php new file mode 100644 index 000000000..e69565364 --- /dev/null +++ b/application/models/organisation/Fachbereich_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_fachbereich'; + $this->pk = 'fachbereich_kurzbz'; + } +} diff --git a/application/models/organisation/Ferien_model.php b/application/models/organisation/Ferien_model.php new file mode 100644 index 000000000..2ade75aa4 --- /dev/null +++ b/application/models/organisation/Ferien_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_ferien'; + $this->pk = array('studiengang_kz', 'bezeichnung'); + } +} diff --git a/application/models/organisation/Lehrverband_model.php b/application/models/organisation/Lehrverband_model.php new file mode 100644 index 000000000..953e4b7b2 --- /dev/null +++ b/application/models/organisation/Lehrverband_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_lehrverband'; + $this->pk = array('gruppe', 'verband', 'semester', 'studiengang_kz'); + } +} diff --git a/application/models/organisation/Organisationseinheittyp_model.php b/application/models/organisation/Organisationseinheittyp_model.php new file mode 100644 index 000000000..6355758b6 --- /dev/null +++ b/application/models/organisation/Organisationseinheittyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_organisationseinheittyp'; + $this->pk = 'organisationseinheittyp_kurzbz'; + } +} diff --git a/application/models/organisation/Semesterwochen_model.php b/application/models/organisation/Semesterwochen_model.php new file mode 100644 index 000000000..32666804d --- /dev/null +++ b/application/models/organisation/Semesterwochen_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_semesterwochen'; + $this->pk = array('studiengang_kz', 'semester'); + } +} diff --git a/application/models/organisation/Service_model.php b/application/models/organisation/Service_model.php new file mode 100644 index 000000000..5f692e707 --- /dev/null +++ b/application/models/organisation/Service_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_service'; + $this->pk = 'service_id'; + } +} diff --git a/application/models/organisation/Standort_model.php b/application/models/organisation/Standort_model.php new file mode 100644 index 000000000..382236e2f --- /dev/null +++ b/application/models/organisation/Standort_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_standort'; + $this->pk = 'standort_id'; + } +} diff --git a/application/models/organisation/Statistik_model.php b/application/models/organisation/Statistik_model.php new file mode 100644 index 000000000..b72ac0577 --- /dev/null +++ b/application/models/organisation/Statistik_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_statistik'; + $this->pk = 'statistik_kurzbz'; + } +} diff --git a/application/models/organisation/Studiengangstyp_model.php b/application/models/organisation/Studiengangstyp_model.php new file mode 100644 index 000000000..9a6b5df22 --- /dev/null +++ b/application/models/organisation/Studiengangstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_studiengangstyp'; + $this->pk = 'typ'; + } +} diff --git a/application/models/organisation/Studienordnung_model.php b/application/models/organisation/Studienordnung_model.php new file mode 100644 index 000000000..fc2e28d4b --- /dev/null +++ b/application/models/organisation/Studienordnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienordnung'; + $this->pk = 'studienordnung_id'; + } +} diff --git a/application/models/organisation/Studienordnungstatus_model.php b/application/models/organisation/Studienordnungstatus_model.php new file mode 100644 index 000000000..8b6417ab1 --- /dev/null +++ b/application/models/organisation/Studienordnungstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienordnungstatus'; + $this->pk = 'status_kurzbz'; + } +} diff --git a/application/models/organisation/Studienplatz_model.php b/application/models/organisation/Studienplatz_model.php new file mode 100644 index 000000000..7bfd8b13b --- /dev/null +++ b/application/models/organisation/Studienplatz_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_studienplatz'; + $this->pk = 'studienplatz_id'; + } +} diff --git a/application/models/person/Bankverbindung_model.php b/application/models/person/Bankverbindung_model.php new file mode 100644 index 000000000..193aad257 --- /dev/null +++ b/application/models/person/Bankverbindung_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_bankverbindung'; + $this->pk = 'bankverbindung_id'; + } +} diff --git a/application/models/person/Benutzergruppe_model.php b/application/models/person/Benutzergruppe_model.php new file mode 100644 index 000000000..e569094c4 --- /dev/null +++ b/application/models/person/Benutzergruppe_model.php @@ -0,0 +1,15 @@ +dbTable = 'public.tbl_benutzergruppe'; + $this->pk = array('gruppe_kurzbz', 'uid'); + $this->hasSequence = false; + } +} diff --git a/application/models/person/Fotostatus_model.php b/application/models/person/Fotostatus_model.php new file mode 100644 index 000000000..eb2b43e51 --- /dev/null +++ b/application/models/person/Fotostatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_fotostatus'; + $this->pk = 'fotostatus_kurzbz'; + } +} diff --git a/application/models/person/Freebusy_model.php b/application/models/person/Freebusy_model.php new file mode 100644 index 000000000..01969dfc1 --- /dev/null +++ b/application/models/person/Freebusy_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_freebusy'; + $this->pk = 'freebusy_id'; + } +} diff --git a/application/models/person/Freebusytyp_model.php b/application/models/person/Freebusytyp_model.php new file mode 100644 index 000000000..d5207850c --- /dev/null +++ b/application/models/person/Freebusytyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_freebusytyp'; + $this->pk = 'freebusytyp_kurzbz'; + } +} diff --git a/application/models/person/Kontaktmedium_model.php b/application/models/person/Kontaktmedium_model.php new file mode 100644 index 000000000..cc330ddd7 --- /dev/null +++ b/application/models/person/Kontaktmedium_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_kontaktmedium'; + $this->pk = 'kontaktmedium_kurzbz'; + } +} diff --git a/application/models/person/Kontakttyp_model.php b/application/models/person/Kontakttyp_model.php new file mode 100644 index 000000000..d32cded13 --- /dev/null +++ b/application/models/person/Kontakttyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_kontakttyp'; + $this->pk = 'kontakttyp'; + } +} diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index a66a881c2..a5453aaa1 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -11,7 +11,7 @@ class Notiz_model extends DB_Model $this->dbTable = 'public.tbl_notiz'; $this->pk = 'notiz_id'; } - + // ------------------------------------------------------------------------------------------------------ /** * Get a specialization for a prestudent @@ -20,10 +20,10 @@ class Notiz_model extends DB_Model { // Join with the table public.tbl_notizzuordnung using notiz_id $this->addJoin('public.tbl_notizzuordnung', 'notiz_id'); - + return $this->NotizModel->loadWhere(array('prestudent_id' => $prestudent_id, 'titel' => $titel)); } - + /** * Remove a specialization */ @@ -31,31 +31,31 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->delete(array('notiz_id' => $notiz_id)); if (isSuccess($result)) { $result = $this->NotizzuordnungModel->delete(array('notiz_id' => $notiz_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while removing a specialization', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { $this->db->trans_commit(); $result = success('Specialization successfully removed'); } - + return $result; } @@ -66,32 +66,32 @@ class Notiz_model extends DB_Model { // Loads model Notizzuordnung_model $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); - + // Start DB transaction $this->db->trans_start(false); - + $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => true)); $notiz_id = $result->retval; if (isSuccess($result)) { $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'prestudent_id' => $prestudent_id)); } - + // Transaction complete! $this->db->trans_complete(); - + // Check if everything went ok during the transaction if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while adding a specialization', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { $this->db->trans_commit(); $result = success($notiz_id); } - + return $result; } @@ -122,7 +122,7 @@ class Notiz_model extends DB_Model if ($this->db->trans_status() === false || isError($result)) { $this->db->trans_rollback(); - $result = error('An error occurred while adding a note for a person', EXIT_ERROR); + $result = error($result->msg, EXIT_ERROR); } else { diff --git a/application/models/person/Notizzuordnung_model.php b/application/models/person/Notizzuordnung_model.php new file mode 100644 index 000000000..187a8399b --- /dev/null +++ b/application/models/person/Notizzuordnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_notizzuordnung'; + $this->pk = 'notizzuordnung_id'; + } +} diff --git a/application/models/project/Aktivitaet_model.php b/application/models/project/Aktivitaet_model.php new file mode 100644 index 000000000..529040aa3 --- /dev/null +++ b/application/models/project/Aktivitaet_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_aktivitaet'; + $this->pk = 'aktivitaet_kurzbz'; + } +} diff --git a/application/models/project/Aufwandstyp_model.php b/application/models/project/Aufwandstyp_model.php new file mode 100644 index 000000000..2f20600ce --- /dev/null +++ b/application/models/project/Aufwandstyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_aufwandstyp'; + $this->pk = 'aufwandstyp_kurzbz'; + } +} diff --git a/application/models/project/Projekt_ressource_model.php b/application/models/project/Projekt_ressource_model.php new file mode 100644 index 000000000..d641556fd --- /dev/null +++ b/application/models/project/Projekt_ressource_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projekt_ressource'; + $this->pk = 'projekt_ressource_id'; + } +} diff --git a/application/models/project/Projektphase_model.php b/application/models/project/Projektphase_model.php new file mode 100644 index 000000000..4980ed64b --- /dev/null +++ b/application/models/project/Projektphase_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projektphase'; + $this->pk = 'projektphase_id'; + } +} diff --git a/application/models/project/Projekttask_model.php b/application/models/project/Projekttask_model.php new file mode 100644 index 000000000..64ea94089 --- /dev/null +++ b/application/models/project/Projekttask_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_projekttask'; + $this->pk = 'projekttask_id'; + } +} diff --git a/application/models/project/Ressource_model.php b/application/models/project/Ressource_model.php new file mode 100644 index 000000000..35eb4eb97 --- /dev/null +++ b/application/models/project/Ressource_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_ressource'; + $this->pk = 'ressource_id'; + } +} diff --git a/application/models/project/Scrumsprint_model.php b/application/models/project/Scrumsprint_model.php new file mode 100644 index 000000000..c2c8a60a1 --- /dev/null +++ b/application/models/project/Scrumsprint_model.php @@ -0,0 +1,14 @@ +dbTable = 'fue.tbl_scrumsprint'; + $this->pk = 'scrumsprint_id'; + } +} diff --git a/application/models/ressource/Betriebsmittel_model.php b/application/models/ressource/Betriebsmittel_model.php new file mode 100644 index 000000000..849a9199f --- /dev/null +++ b/application/models/ressource/Betriebsmittel_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittel'; + $this->pk = 'betriebsmittel_id'; + } +} diff --git a/application/models/ressource/Betriebsmittelperson_model.php b/application/models/ressource/Betriebsmittelperson_model.php new file mode 100644 index 000000000..924f670e0 --- /dev/null +++ b/application/models/ressource/Betriebsmittelperson_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittelperson'; + $this->pk = 'betriebsmittelperson_id'; + } +} diff --git a/application/models/ressource/Betriebsmittelstatus_model.php b/application/models/ressource/Betriebsmittelstatus_model.php new file mode 100644 index 000000000..7b4f70c59 --- /dev/null +++ b/application/models/ressource/Betriebsmittelstatus_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmittelstatus'; + $this->pk = 'betriebsmittelstatus_kurzbz'; + } +} diff --git a/application/models/ressource/Betriebsmitteltyp_model.php b/application/models/ressource/Betriebsmitteltyp_model.php new file mode 100644 index 000000000..23bec97a8 --- /dev/null +++ b/application/models/ressource/Betriebsmitteltyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'wawi.tbl_betriebsmitteltyp'; + $this->pk = 'betriebsmitteltyp'; + } +} diff --git a/application/models/ressource/Coodle_model.php b/application/models/ressource/Coodle_model.php new file mode 100644 index 000000000..1382bf7a0 --- /dev/null +++ b/application/models/ressource/Coodle_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_coodle'; + $this->pk = 'coodle_id'; + } +} diff --git a/application/models/ressource/Erreichbarkeit_model.php b/application/models/ressource/Erreichbarkeit_model.php new file mode 100644 index 000000000..b16b1614f --- /dev/null +++ b/application/models/ressource/Erreichbarkeit_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_erreichbarkeit'; + $this->pk = 'erreichbarkeit_kurzbz'; + } +} diff --git a/application/models/ressource/Firma_model.php b/application/models/ressource/Firma_model.php new file mode 100644 index 000000000..1b8dfb51d --- /dev/null +++ b/application/models/ressource/Firma_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firma'; + $this->pk = 'firma_id'; + } +} diff --git a/application/models/ressource/Firmatag_model.php b/application/models/ressource/Firmatag_model.php new file mode 100644 index 000000000..582ea0679 --- /dev/null +++ b/application/models/ressource/Firmatag_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firmatag'; + $this->pk = array('tag', 'firma_id'); + } +} diff --git a/application/models/ressource/Firmentyp_model.php b/application/models/ressource/Firmentyp_model.php new file mode 100644 index 000000000..a9aa93705 --- /dev/null +++ b/application/models/ressource/Firmentyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_firmentyp'; + $this->pk = 'firmentyp_kurzbz'; + } +} diff --git a/application/models/ressource/Funktion_model.php b/application/models/ressource/Funktion_model.php new file mode 100644 index 000000000..43908167c --- /dev/null +++ b/application/models/ressource/Funktion_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_funktion'; + $this->pk = 'funktion_kurzbz'; + } +} diff --git a/application/models/ressource/Lehrmittel_model.php b/application/models/ressource/Lehrmittel_model.php new file mode 100644 index 000000000..b21e91764 --- /dev/null +++ b/application/models/ressource/Lehrmittel_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_lehrmittel'; + $this->pk = 'lehrmittel_kurzbz'; + } +} diff --git a/application/models/ressource/Mitarbeiter_model.php b/application/models/ressource/Mitarbeiter_model.php new file mode 100644 index 000000000..1e03a0ecd --- /dev/null +++ b/application/models/ressource/Mitarbeiter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_mitarbeiter'; + $this->pk = 'mitarbeiter_uid'; + } +} diff --git a/application/models/ressource/Ort_model.php b/application/models/ressource/Ort_model.php new file mode 100644 index 000000000..59b213a54 --- /dev/null +++ b/application/models/ressource/Ort_model.php @@ -0,0 +1,23 @@ +dbTable = "public.tbl_ort"; + $this->pk = "ort_kurzbz"; + } + + public function getAll($raumtyp_kurzbz) + { + $this->addOrder("ort_kurzbz"); + + $this->addJoin("public.tbl_ortraumtyp", "ort_kurzbz"); + + return $this->OrtModel->loadWhere(array("raumtyp_kurzbz" => $raumtyp_kurzbz)); + } +} \ No newline at end of file diff --git a/application/models/ressource/Ortraumtyp_model.php b/application/models/ressource/Ortraumtyp_model.php new file mode 100644 index 000000000..af0d3cb09 --- /dev/null +++ b/application/models/ressource/Ortraumtyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_ortraumtyp'; + $this->pk = array('hierarchie', 'ort_kurzbz'); + } +} diff --git a/application/models/ressource/Personfunktionstandort_model.php b/application/models/ressource/Personfunktionstandort_model.php new file mode 100644 index 000000000..addbb760a --- /dev/null +++ b/application/models/ressource/Personfunktionstandort_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_personfunktionstandort'; + $this->pk = 'personfunktionstandort_id'; + } +} diff --git a/application/models/ressource/Raumtyp_model.php b/application/models/ressource/Raumtyp_model.php new file mode 100644 index 000000000..afc8a7cc3 --- /dev/null +++ b/application/models/ressource/Raumtyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_raumtyp'; + $this->pk = 'raumtyp_kurzbz'; + } +} diff --git a/application/models/ressource/Reservierung_model.php b/application/models/ressource/Reservierung_model.php new file mode 100644 index 000000000..37d0cb376 --- /dev/null +++ b/application/models/ressource/Reservierung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_reservierung'; + $this->pk = 'reservierung_id'; + } +} diff --git a/application/models/ressource/Stunde_model.php b/application/models/ressource/Stunde_model.php new file mode 100644 index 000000000..05a9cddff --- /dev/null +++ b/application/models/ressource/Stunde_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_stunde'; + $this->pk = 'stunde'; + } +} diff --git a/application/models/ressource/Stundenplan_model.php b/application/models/ressource/Stundenplan_model.php new file mode 100644 index 000000000..be3d520b5 --- /dev/null +++ b/application/models/ressource/Stundenplan_model.php @@ -0,0 +1,14 @@ +dbTable = 'lehre.tbl_stundenplan'; + $this->pk = 'stundenplan_id'; + } +} diff --git a/application/models/ressource/Zeitaufzeichnung_model.php b/application/models/ressource/Zeitaufzeichnung_model.php new file mode 100644 index 000000000..f887a20a0 --- /dev/null +++ b/application/models/ressource/Zeitaufzeichnung_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitaufzeichnung'; + $this->pk = 'zeitaufzeichnung_id'; + } +} diff --git a/application/models/ressource/Zeitsperre_model.php b/application/models/ressource/Zeitsperre_model.php new file mode 100644 index 000000000..07889e349 --- /dev/null +++ b/application/models/ressource/Zeitsperre_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitsperre'; + $this->pk = 'zeitsperre_id'; + } +} diff --git a/application/models/ressource/Zeitsperretyp_model.php b/application/models/ressource/Zeitsperretyp_model.php new file mode 100644 index 000000000..ef54571e8 --- /dev/null +++ b/application/models/ressource/Zeitsperretyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitsperretyp'; + $this->pk = 'zeitsperretyp_kurzbz'; + } +} diff --git a/application/models/ressource/Zeitwunsch_model.php b/application/models/ressource/Zeitwunsch_model.php new file mode 100644 index 000000000..ea2ec698a --- /dev/null +++ b/application/models/ressource/Zeitwunsch_model.php @@ -0,0 +1,14 @@ +dbTable = 'campus.tbl_zeitwunsch'; + $this->pk = array('tag', 'mitarbeiter_uid', 'stunde'); + } +} diff --git a/application/models/system/Berechtigung_model.php b/application/models/system/Berechtigung_model.php new file mode 100644 index 000000000..9bd572614 --- /dev/null +++ b/application/models/system/Berechtigung_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_berechtigung'; + $this->pk = 'berechtigung_kurzbz'; + } +} diff --git a/application/models/system/Cronjob_model.php b/application/models/system/Cronjob_model.php new file mode 100644 index 000000000..e47ea5bef --- /dev/null +++ b/application/models/system/Cronjob_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_cronjob'; + $this->pk = 'cronjob_id'; + } +} diff --git a/application/models/system/Filter_model.php b/application/models/system/Filter_model.php new file mode 100644 index 000000000..5d44e0052 --- /dev/null +++ b/application/models/system/Filter_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_filter'; + $this->pk = 'filter_id'; + } +} diff --git a/application/models/system/Log_model.php b/application/models/system/Log_model.php new file mode 100644 index 000000000..8b27f6c53 --- /dev/null +++ b/application/models/system/Log_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_log'; + $this->pk = 'log_id'; + } +} diff --git a/application/models/system/Message_model.php b/application/models/system/Message_model.php index 6f2ad01e2..764c3ae14 100644 --- a/application/models/system/Message_model.php +++ b/application/models/system/Message_model.php @@ -151,7 +151,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), EXIT_DATABASE); + return error($this->db->error(), FHC_DB_ERROR); } } @@ -168,7 +168,7 @@ class Message_model extends DB_Model } else { - return error($this->db->error(), EXIT_DATABASE); + return error($this->db->error(), FHC_DB_ERROR); } } diff --git a/application/models/system/PersonLock_model.php b/application/models/system/PersonLock_model.php new file mode 100644 index 000000000..1d106b789 --- /dev/null +++ b/application/models/system/PersonLock_model.php @@ -0,0 +1,88 @@ +dbTable = 'system.tbl_person_lock'; + $this->pk = 'lock_id'; + } + + /** + * Checks if a specific person is locked. By default, looks for entries with no app in locktable for the person. + * Alternatively, looks only for locks in a certain app. + * @param $person_id + * @param null $app + * @return array all locks for a person if locked, null otherwise + */ + public function checkIfLocked($person_id, $app = null) + { + $lockdata = array('person_id' => $person_id, 'app' => $app); + + $result = $this->loadWhere($lockdata); + + if ($result->error) + return error($result->retval); + + if (count($result->retval) > 0) + return success($result->retval); + else + return success(null); + } + + /** + * Locks a person. Returns null if person was not locked (e.g. when already locked). + * @param $person_id + * @param $uid user who locks the person + * @param $app optional, application in which person is locked + * @return array inserted lock id if person was locked, null otherwise + */ + public function lockPerson($person_id, $uid, $app = null) + { + $locked = $this->checkIfLocked($person_id, $app); + + if ($locked->error) + return error($locked->retval); + + //insert only if not already locked + if ($locked->retval === null) + return $this->insert(array('person_id' => $person_id, 'uid' => $uid, 'app' => $app)); + else + return success(null); + } + + /** + * Remove a lock for a person. By default, removes any entries in locktable for the person. + * Alternatively, removes only locks in a certain app. + * @param $person_id + * @param null $app + * @return array deleted lock ids if person was locked, null otherwise + */ + public function unlockPerson($person_id, $app = null) + { + $deleted = array(); + $locks = $this->checkIfLocked($person_id, $app); + + if ($locks->retval === null) + return success(null); + + foreach ($locks->retval as $lock) + { + $result = $this->delete($lock->lock_id); + if ($result->error) + return error($result->retval); + + $deleted[] = $lock; + } + + return success($deleted); + } +} diff --git a/application/models/system/Rolle_model.php b/application/models/system/Rolle_model.php new file mode 100644 index 000000000..5ba085853 --- /dev/null +++ b/application/models/system/Rolle_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_rolle'; + $this->pk = 'rolle_kurzbz'; + } +} diff --git a/application/models/system/Rolleberechtigung_model.php b/application/models/system/Rolleberechtigung_model.php new file mode 100644 index 000000000..0b08da1ca --- /dev/null +++ b/application/models/system/Rolleberechtigung_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_rolleberechtigung'; + $this->pk = array('rolle_kurzbz', 'berechtigung_kurzbz'); + } +} diff --git a/application/models/system/Server_model.php b/application/models/system/Server_model.php new file mode 100644 index 000000000..4521e1fd4 --- /dev/null +++ b/application/models/system/Server_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_server'; + $this->pk = 'server_kurzbz'; + } +} \ No newline at end of file diff --git a/application/models/system/Tag_model.php b/application/models/system/Tag_model.php new file mode 100644 index 000000000..94434da45 --- /dev/null +++ b/application/models/system/Tag_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_tag'; + $this->pk = 'tag'; + } +} diff --git a/application/models/system/Variable_model.php b/application/models/system/Variable_model.php new file mode 100644 index 000000000..9800999fe --- /dev/null +++ b/application/models/system/Variable_model.php @@ -0,0 +1,14 @@ +dbTable = 'public.tbl_variable'; + $this->pk = array('uid', 'name'); + } +} diff --git a/application/models/system/Webservicelog_model.php b/application/models/system/Webservicelog_model.php new file mode 100644 index 000000000..dc45b13a7 --- /dev/null +++ b/application/models/system/Webservicelog_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicelog'; + $this->pk = 'webservicelog_id'; + } +} diff --git a/application/models/system/Webservicerecht_model.php b/application/models/system/Webservicerecht_model.php new file mode 100644 index 000000000..a5bd036f0 --- /dev/null +++ b/application/models/system/Webservicerecht_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicerecht'; + $this->pk = 'webservicerecht_id'; + } +} diff --git a/application/models/system/Webservicetyp_model.php b/application/models/system/Webservicetyp_model.php new file mode 100644 index 000000000..5d989de2a --- /dev/null +++ b/application/models/system/Webservicetyp_model.php @@ -0,0 +1,14 @@ +dbTable = 'system.tbl_webservicetyp'; + $this->pk = 'webservicetyp_kurzbz'; + } +} diff --git a/application/models/testtool/Ablauf_model.php b/application/models/testtool/Ablauf_model.php new file mode 100644 index 000000000..748926658 --- /dev/null +++ b/application/models/testtool/Ablauf_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_ablauf'; + $this->pk = 'ablauf_id'; + } +} diff --git a/application/models/testtool/Antwort_model.php b/application/models/testtool/Antwort_model.php new file mode 100644 index 000000000..1594be6c3 --- /dev/null +++ b/application/models/testtool/Antwort_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_antwort'; + $this->pk = 'antwort_id'; + } +} diff --git a/application/models/testtool/Frage_model.php b/application/models/testtool/Frage_model.php new file mode 100644 index 000000000..de64c303b --- /dev/null +++ b/application/models/testtool/Frage_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_frage'; + $this->pk = 'frage_id'; + } +} diff --git a/application/models/testtool/Gebiet_model.php b/application/models/testtool/Gebiet_model.php new file mode 100644 index 000000000..202d6a4aa --- /dev/null +++ b/application/models/testtool/Gebiet_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_gebiet'; + $this->pk = 'gebiet_id'; + } +} diff --git a/application/models/testtool/Kategorie_model.php b/application/models/testtool/Kategorie_model.php new file mode 100644 index 000000000..10e450651 --- /dev/null +++ b/application/models/testtool/Kategorie_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_kategorie'; + $this->pk = 'kategorie_kurzbz'; + } +} diff --git a/application/models/testtool/Kriterien_model.php b/application/models/testtool/Kriterien_model.php new file mode 100644 index 000000000..83d0fb97c --- /dev/null +++ b/application/models/testtool/Kriterien_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_kriterien'; + $this->pk = 'kategorie_kurzbz'; + } +} diff --git a/application/models/testtool/Pruefling_model.php b/application/models/testtool/Pruefling_model.php new file mode 100644 index 000000000..da131ba4a --- /dev/null +++ b/application/models/testtool/Pruefling_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_pruefling'; + $this->pk = 'pruefling_id'; + } +} diff --git a/application/models/testtool/Vorschlag_model.php b/application/models/testtool/Vorschlag_model.php new file mode 100644 index 000000000..853852da2 --- /dev/null +++ b/application/models/testtool/Vorschlag_model.php @@ -0,0 +1,14 @@ +dbTable = 'testtool.tbl_vorschlag'; + $this->pk = 'vorschlag_id'; + } +} diff --git a/application/widgets/Nation_widget.php b/application/widgets/Nation_widget.php index 79059c84f..c99ac9fef 100644 --- a/application/widgets/Nation_widget.php +++ b/application/widgets/Nation_widget.php @@ -5,7 +5,7 @@ class Nation_widget extends DropdownWidget public function display($widgetData) { // Nation - $this->load->model('codex/nation_model', 'NationModel'); + $this->load->model('codex/Nation_model', 'NationModel'); $this->NationModel->addOrder('nation_code'); $this->addSelectToModel($this->NationModel, 'nation_code', 'kurztext'); @@ -18,4 +18,4 @@ class Nation_widget extends DropdownWidget $this->loadDropDownView($widgetData); } -} \ No newline at end of file +} diff --git a/application/widgets/Zgv_widget.php b/application/widgets/Zgv_widget.php index b34bb27b6..f0af7b256 100644 --- a/application/widgets/Zgv_widget.php +++ b/application/widgets/Zgv_widget.php @@ -5,7 +5,7 @@ class Zgv_widget extends DropdownWidget public function display($widgetData) { // Zgv - $this->load->model('codex/zgv_model', 'ZgvModel'); + $this->load->model('codex/Zgv_model', 'ZgvModel'); $this->ZgvModel->addOrder('zgv_bez'); $this->addSelectToModel($this->ZgvModel, 'zgv_code', 'zgv_bez'); @@ -18,4 +18,4 @@ class Zgv_widget extends DropdownWidget $this->loadDropDownView($widgetData); } -} \ No newline at end of file +} From e1ed8b55f52ce61b2e39163297c6e49a33f119c8 Mon Sep 17 00:00:00 2001 From: Paolo Date: Fri, 26 Apr 2019 12:51:02 +0200 Subject: [PATCH 14/14] Fixed models --- application/models/CL/Messages_model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/CL/Messages_model.php b/application/models/CL/Messages_model.php index 5a0a77a31..5f3f40e6d 100644 --- a/application/models/CL/Messages_model.php +++ b/application/models/CL/Messages_model.php @@ -1,10 +1,10 @@