mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
- Added constant DOC_ROOT in system.config-default.inc.php
- Using DOC_ROOT in dbupdate_3.2.php to be compatible with checksystem.php and DBTools.php - Rolled back all classes in the include directory from CI to basis_db
This commit is contained in:
+11
-18
@@ -23,16 +23,10 @@
|
||||
* Klasse funktion (FAS-Online)
|
||||
* @create 14-03-2006
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/datum.class.php');
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
// CI
|
||||
require_once(dirname(__FILE__).'/../ci_hack.php');
|
||||
require_once(dirname(__FILE__).'/../application/models/ressource/Funktion_model.php');
|
||||
|
||||
class funktion extends Funktion_model
|
||||
class funktion extends basis_db
|
||||
{
|
||||
use db_extra; //CI Hack
|
||||
|
||||
public $new; // boolean
|
||||
public $result = array(); // fachbereich Objekt
|
||||
|
||||
@@ -109,27 +103,26 @@ class funktion extends Funktion_model
|
||||
* @param $funktion_kurzbz ID der zu ladenden Funktion
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($funktion_kurzbz = null)
|
||||
public function load($funktion_kurzbz)
|
||||
{
|
||||
|
||||
if (empty($funktion_kurzbz) || $funktion_kurzbz == '')
|
||||
if ($funktion_kurzbz == '')
|
||||
{
|
||||
$this->errormsg = 'funktion_bz darf nicht leer sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = parent::load($funktion_kurzbz);
|
||||
|
||||
if (!is_object($result) || (is_object($result) && $result->error != EXIT_SUCCESS))
|
||||
$qry = "SELECT *
|
||||
FROM public.tbl_funktion
|
||||
WHERE funktion_kurzbz = " . $this->db_add_param($funktion_kurzbz) . ";";
|
||||
|
||||
if (!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden des Datensatzes';
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array($result->retval) && count($result->retval) == 1)
|
||||
if ($row = $this->db_fetch_object())
|
||||
{
|
||||
$row = $result->retval[0];
|
||||
|
||||
$this->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$this->beschreibung = $row->beschreibung;
|
||||
$this->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
@@ -219,4 +212,4 @@ class funktion extends Funktion_model
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user