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/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['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/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/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 @@
-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/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/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/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);
- }
-}
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/core/DB_Model.php b/application/core/DB_Model.php
index df072a61c..b1e88e164 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('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;
@@ -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('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;
@@ -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->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;
@@ -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('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 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('The given database table name is not valid', EXIT_MODEL);
// 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('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 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('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 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);
+ // 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 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);
+ // 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 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('The start parameter is not valid', EXIT_MODEL);
if (is_numeric($end) && $end > $start)
{
@@ -472,7 +474,7 @@ class DB_Model extends FHC_Model
$this->db->limit($start);
}
- return success(true);
+ return success();
}
/**
@@ -485,7 +487,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('The table parameter is not valid', EXIT_MODEL);
if (!isEmptyString($alias))
{
@@ -494,7 +496,7 @@ class DB_Model extends FHC_Model
$this->db->from($tmpTable);
- return success(true);
+ return success();
}
/**
@@ -509,12 +511,12 @@ 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('The fields parameter is not valid', EXIT_MODEL);
}
$this->db->group_by($fields);
- return success(true);
+ return success();
}
/**
@@ -772,7 +774,7 @@ class DB_Model extends FHC_Model
}
else
{
- $result = error($this->db->error(), FHC_DB_ERROR);
+ $result = error($this->db->error(), EXIT_DATABASE);
}
}
@@ -827,7 +829,7 @@ class DB_Model extends FHC_Model
*/
private function _manageUDFs(&$data, $schemaAndTable, $id = null)
{
- $manageUDFs = success(true);
+ $manageUDFs = success();
if ($this->hasUDF())
{
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/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');
- }
-}
diff --git a/application/core/FS_Model.php b/application/core/FS_Model.php
index 7e2b2d7e2..4081bf8f4 100644
--- a/application/core/FS_Model.php
+++ b/application/core/FS_Model.php
@@ -1,6 +1,6 @@
filepath = $filepath;
}
- /** ---------------------------------------------------------------
+ /**
* Read data from file system
*
* @return array
@@ -25,10 +25,10 @@ class FS_Model extends FHC_Model
public function read($filename)
{
// Check Class-Attributes
- if (is_null($this->filepath)) return error(FHC_MODEL_ERROR, FHC_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(FHC_MODEL_ERROR, FHC_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 FHC_Model
}
else
{
- return error(FHC_MODEL_ERROR, FHC_ERROR);
+ return error('An error occurred while reading a file', EXIT_ERROR);
}
}
- /** ---------------------------------------------------------------
+ /**
* Writing data to file system
*
* @param string $fileContent File content
@@ -49,23 +49,23 @@ 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('The given filepath in not valid', 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($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)
{
- return success(FHC_SUCCESS);
+ return success();
}
else
{
- return error(FHC_MODEL_ERROR, FHC_ERROR);
+ return error('An error occurred while writing a file', EXIT_ERROR);
}
}
- /** ---------------------------------------------------------------
+ /**
* Append data to a file
*
* @param array $data File content
@@ -74,23 +74,23 @@ 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('The given filepath in not valid', 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('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)
{
- return success(FHC_SUCCESS);
+ return success();
}
else
{
- return error(FHC_MODEL_ERROR, FHC_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,22 +99,22 @@ 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('The given filepath in not valid', EXIT_ERROR);
// Check method parameters
- if (is_null($filename)) return error(FHC_MODEL_ERROR, FHC_ERROR);
+ if (is_null($filename)) return error('The given filename is not valid', 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('An error occurred while removing a file', EXIT_ERROR);
}
}
- /** ---------------------------------------------------------------
+ /**
* Rename a file
*
* @param string $id Primary Key for DELETE
@@ -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('The given filepath in not valid', 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('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)
{
- return success(FHC_SUCCESS);
+ return success();
}
else
{
- return error(FHC_MODEL_ERROR, FHC_ERROR);
+ return error('An error occurred while renaming a file', EXIT_ERROR);
}
}
}
diff --git a/application/core/REST_Controller.php b/application/core/REST_Controller.php
index 062640c49..9cd276556 100644
--- a/application/core/REST_Controller.php
+++ b/application/core/REST_Controller.php
@@ -361,7 +361,10 @@ 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 session to manage the php session
+ $this->load->helper('hlp_session');
// Loads helper with generic utility function
$this->load->helper('hlp_common');
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;
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 @@
-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/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/libraries/MessageLib.php b/application/libraries/MessageLib.php
index 74ccce703..feba96473 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 80552053b..af642fe9e 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/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/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 = 'system.tbl_app';
- $this->pk = 'app';
- }
-
-}
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';");
- }
-}
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 @@
-
-
-
-
-
-
-
-
-
-
-
- Name
- Give Name
- Family Name
-
-
-
-
- primaryTopic();
-?>
-
-
- get('foaf:name') ?>
- = $me->get('foaf:givenName') ?>
- = $me->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 @@
-
-
-
-
-
-
-
-
-
-
-
-
- Label
- Country
-
-
-
-
-
-
-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: = $result->numRows() ?>
-
-
- 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 @@
-
-
-
-
-
-
-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(); ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Known Person
-
- all('foaf:knows') as $friend) {
- $label = $friend->label();
-
- if (!$label) {
- $label = $friend->getUri();
- }
- ?>
-
-
-
-
-
-
-
-
-
- isBNode()): ?>
- = $label ?>
-
-
- ".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 @@
-
-
-
-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();
- }
- }
-?>
-
-
-
-= form_tag(null, array('method' => 'POST')) ?>
-
-
Your Identifier
-= labeled_text_field_tag('uri', 'http://www.example.com/joe#me', array('size'=>40)) ?>
-
-
Your details
-= labeled_text_field_tag('title', 'Mr', array('size'=>8)) ?>
-= labeled_text_field_tag('given_name', 'Joseph') ?>
-= labeled_text_field_tag('family_name', 'Bloggs') ?>
-= labeled_text_field_tag('nickname', 'Joe') ?>
-= labeled_text_field_tag('email', 'joe@example.com') ?>
-= labeled_text_field_tag('homepage', 'http://www.example.com/', array('size'=>40)) ?>
-
-
People you know
-= labeled_text_field_tag('person_1', 'http://www.example.com/dave#me', array('size'=>40)) ?>
-= labeled_text_field_tag('person_2', '', array('size'=>40)) ?>
-= labeled_text_field_tag('person_3', '', array('size'=>40)) ?>
-= labeled_text_field_tag('person_4', '', array('size'=>40)) ?>
-
-
Output
-Enable Arc 2? = check_box_tag('enable_arc') ?>
-Enable Rapper? = check_box_tag('enable_rapper') ?>
-= label_tag('format').select_tag('format', $format_options, 'rdfxml') ?>
-
-= submit_tag() ?>
-= form_end_tag() ?>
-
-
-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 @@
-
-
-
-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();
- }
- }
-?>
-
-
-
-= form_tag(null, array('method' => 'POST')) ?>
-
-
Your Identifier
-= labeled_text_field_tag('uri', 'http://www.example.com/joe#me', array('size'=>40)) ?>
-
-
Your details
-= labeled_text_field_tag('title', 'Mr', array('size'=>8)) ?>
-= labeled_text_field_tag('given_name', 'Joseph') ?>
-= labeled_text_field_tag('family_name', 'Bloggs') ?>
-= labeled_text_field_tag('nickname', 'Joe') ?>
-= labeled_text_field_tag('email', 'joe@example.com') ?>
-= labeled_text_field_tag('homepage', 'http://www.example.com/', array('size'=>40)) ?>
-
-
People you know
-= labeled_text_field_tag('person_1', 'http://www.example.com/dave#me', array('size'=>40)) ?>
-= labeled_text_field_tag('person_2', '', array('size'=>40)) ?>
-= labeled_text_field_tag('person_3', '', array('size'=>40)) ?>
-= labeled_text_field_tag('person_4', '', array('size'=>40)) ?>
-
-
Output
-Enable Arc 2? = check_box_tag('enable_arc') ?>
-Enable Rapper? = check_box_tag('enable_rapper') ?>
-= label_tag('format').select_tag('format', $format_options, 'rdfxml') ?>
-
-= submit_tag() ?>
-= form_end_tag() ?>
-
-
-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)."$name>";
-}
-
-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 "";
-}
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 . ' ';
}
}
}
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
+}