- Modified FHC_Model, now it is saving uid in CI session

- Added codeception tests
- Added statistik to dump.sql
- Moved old libraries to CI
This commit is contained in:
paolo
2016-06-06 16:36:23 +02:00
parent dabcf8188b
commit 0dc605df3c
19 changed files with 209 additions and 34 deletions
+2
View File
@@ -32,6 +32,8 @@ require_once(dirname(__FILE__).'/../application/models/content/Dms_model.php');
class dms extends Dms_model
{
use db_extra; //CI Hack
public $new;
public $result=array();
+2
View File
@@ -31,6 +31,8 @@ require_once(dirname(__FILE__).'/../application/models/person/Kontakt_model.php'
class kontakt extends Kontakt_model
{
use db_extra; //CI Hack
public $new; // boolean
public $result = array(); // adresse Objekt
+2
View File
@@ -32,6 +32,8 @@ require_once(dirname(__FILE__).'/../application/models/codex/Orgform_model.php')
class organisationsform extends Orgform_model
{
use db_extra; //CI Hack
public $orgform_kurzbz;
public $code;
public $bezeichnung;
+1 -1
View File
@@ -31,7 +31,7 @@ require_once(dirname(__FILE__).'/../application/models/person/Person_model.php')
class person extends Person_model
{
use db_extra; //CI Hack
public $errormsg; // string
public $new; // boolean
public $personen = array(); // person Objekt
+2
View File
@@ -27,6 +27,8 @@ require_once(dirname(__FILE__).'/../application/models/crm/Preinteressent_model.
class preinteressent extends Preinteressent_model
{
use db_extra; //CI Hack
public $new; // boolean
public $result = array();
+1
View File
@@ -30,6 +30,7 @@ require_once(dirname(__FILE__).'/../application/models/crm/Prestudent_model.php'
class prestudent extends Prestudent_model
{
use db_extra; //CI Hack
public $errormsg; // string
//Tabellenspalten
+33 -24
View File
@@ -19,10 +19,16 @@
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
* Karl Burkhart <burkhart@technikum-wien.at>.
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
require_once(dirname(__FILE__).'/datum.class.php');
class statistik extends basis_db
// CI
require_once(dirname(__FILE__).'/../ci_hack.php');
require_once(dirname(__FILE__).'/../application/models/organisation/Statistik_model.php');
class statistik extends Statistik_model
{
use db_extra; //CI Hack
public $new;
public $statistik_obj=array();
public $result;
@@ -76,17 +82,14 @@ class statistik extends basis_db
*/
public function load($statistik_kurzbz)
{
$qry = "SELECT
*
FROM
public.tbl_statistik
WHERE
statistik_kurzbz = " . $this->db_add_param($statistik_kurzbz);
$result = parent::load($statistik_kurzbz);
if($result = $this->db_query($qry))
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
{
if($row = $this->db_fetch_object($result))
if(count($result->retval) > 0)
{
$row = $result->retval[0];
$this->statistik_kurzbz = $row->statistik_kurzbz;
$this->content_id = $row->content_id;
$this->bezeichnung = $row->bezeichnung;
@@ -125,15 +128,19 @@ class statistik extends basis_db
*/
public function getAll($order = FALSE)
{
$qry = 'SELECT * FROM public.tbl_statistik';
if($order)
$qry .= ' ORDER BY ' . $order;
if($result = $this->db_query($qry))
if ($order)
{
while($row = $this->db_fetch_object($result))
parent::addOrder($order);
}
$result = parent::loadWhole();
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
{
for ($i = 0; $i < count($result->retval); $i++)
{
$row = $result->retval[$i];
$obj = new statistik();
$obj->statistik_kurzbz = $row->statistik_kurzbz;
@@ -328,17 +335,19 @@ class statistik extends basis_db
{
$arr = array();
$qry = "SELECT
*
FROM
public.tbl_statistik
ORDER BY gruppe, bezeichnung, statistik_kurzbz";
parent::addOrder('gruppe');
parent::addOrder('bezeichnung');
parent::addOrder('statistik_kurzbz');
$result = parent::loadWhole();
if($result = $this->db_query($qry))
if (is_object($result) && $result->error == EXIT_SUCCESS && is_array($result->retval))
{
$lastgruppe='';
while($row = $this->db_fetch_object($result))
for ($i = 0; $i < count($result->retval); $i++)
{
$row = $result->retval[$i];
if($row->gruppe!='' && $row->gruppe!=$lastgruppe)
{
$arr[$row->gruppe]=array('name'=>$row->gruppe);
+2
View File
@@ -28,6 +28,8 @@ require_once(dirname(__FILE__).'/../application/models/organisation/Studiensemes
class studiensemester extends Studiensemester_model
{
use db_extra; //CI Hack
public $new; // boolean
public $studiensemester = array(); // studiensemester Objekt