diff --git a/application/config/autoload.php b/application/config/autoload.php
index baf545db6..4916ef0ce 100644
--- a/application/config/autoload.php
+++ b/application/config/autoload.php
@@ -98,7 +98,7 @@ $autoload['helper'] = array('url', 'language');
| config files. Otherwise, leave it blank.
|
*/
-$autoload['config'] = array('fhcomplete');
+$autoload['config'] = array();
/*
| -------------------------------------------------------------------
diff --git a/application/config/config.php b/application/config/config.php
index 152bda403..2602c12cf 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -502,16 +502,3 @@ $config['rewrite_short_tags'] = FALSE;
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
-
-/*
-|--------------------------------------------------------------------------
-| Autoload Custom Controllers
-|--------------------------------------------------------------------------
-|
-| It's working, so don't delete this :D
-*/
-spl_autoload_register(function ($class) {
- if (substr($class,0,3) !== 'CI_' && substr($class,0,4) !== 'FHC_')
- if (file_exists($file = APPPATH . 'core/' . $class . '.php'))
- require_once $file;
-});
diff --git a/application/config/core_includes.php b/application/config/core_includes.php
new file mode 100644
index 000000000..734686471
--- /dev/null
+++ b/application/config/core_includes.php
@@ -0,0 +1,12 @@
+sentInfo separator
diff --git a/application/controllers/Redirect.php b/application/controllers/Redirect.php
index 38b7c6dbe..8a24c590d 100644
--- a/application/controllers/Redirect.php
+++ b/application/controllers/Redirect.php
@@ -58,7 +58,7 @@ class Redirect extends FHC_Controller
show_error('No organisation unit present in the message');
}
- $addonAufnahmeUrls = $this->config->item('addons_aufnahme_url');
+ $addonAufnahmeUrls = $this->config->item('message_redirect_url');
if(!isset($addonAufnahmeUrls[$organisationRoot]))
$organisationRoot = 'fallback';
@@ -73,7 +73,7 @@ class Redirect extends FHC_Controller
}
else
{
- $addonAufnahmeUrls = $this->config->item('addons_aufnahme_url');
+ $addonAufnahmeUrls = $this->config->item('message_redirect_url');
if (isset($token)
&& hasData($msg)
&& is_array($addonAufnahmeUrls)
diff --git a/application/controllers/api/v1/Test.php b/application/controllers/api/v1/Test.php
index fa79f1c1e..010314013 100644
--- a/application/controllers/api/v1/Test.php
+++ b/application/controllers/api/v1/Test.php
@@ -14,7 +14,7 @@ class Test extends REST_Controller
parent::__construct();
// Loads helper message to manage returning messages
- $this->load->helper('fhc_message');
+ $this->load->helper('hlp_message');
}
/**
diff --git a/application/controllers/jobs/AmpelMail.php b/application/controllers/jobs/AmpelMail.php
index b88c5536b..e27bd5f82 100644
--- a/application/controllers/jobs/AmpelMail.php
+++ b/application/controllers/jobs/AmpelMail.php
@@ -44,7 +44,7 @@ class AmpelMail extends FHC_Controller
$this->load->model('person/Person_model', 'PersonModel');
// Load helpers
- $this->load->helper('fhc_sancho');
+ $this->load->helper('hlp_sancho');
}
/**
diff --git a/application/core/APIv1_Controller.php b/application/core/APIv1_Controller.php
index 11ed9fc98..b2cd98051 100644
--- a/application/core/APIv1_Controller.php
+++ b/application/core/APIv1_Controller.php
@@ -12,10 +12,10 @@ class APIv1_Controller extends REST_Controller
parent::__construct();
// Loads helper message to manage returning messages
- $this->load->helper('fhc_message');
+ $this->load->helper('hlp_message');
// Loads helper with generic utility function
- $this->load->helper('fhc_common');
+ $this->load->helper('hlp_common');
// Loads permission lib
$this->load->library('PermissionLib');
diff --git a/application/core/Auth_Controller.php b/application/core/Auth_Controller.php
index 3cdde3e0e..5a3986c90 100644
--- a/application/core/Auth_Controller.php
+++ b/application/core/Auth_Controller.php
@@ -12,7 +12,7 @@ class Auth_Controller extends FHC_Controller
parent::__construct();
// Loads authentication helper
- $this->load->helper('fhc_authentication');
+ $this->load->helper('hlp_authentication');
// Checks if the caller is allowed to access to this content
$this->_isAllowed($requiredPermissions);
diff --git a/application/core/FHC_Controller.php b/application/core/FHC_Controller.php
index 14acc1ca0..5b6901f52 100644
--- a/application/core/FHC_Controller.php
+++ b/application/core/FHC_Controller.php
@@ -21,19 +21,19 @@ 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('fhc_message');
+ $this->load->helper('hlp_message');
// Loads helper with generic utility function
- $this->load->helper('fhc_common');
+ $this->load->helper('hlp_common');
// Loads helper session to manage the php session
- $this->load->helper('fhc_session');
+ $this->load->helper('hlp_session');
// Loads language helper
- $this->load->helper('fhc_language');
+ $this->load->helper('hlp_language');
// Loads header helper
- $this->load->helper('fhc_header');
+ $this->load->helper('hlp_header');
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/application/helpers/fhc_authentication_helper.php b/application/helpers/hlp_authentication_helper.php
similarity index 100%
rename from application/helpers/fhc_authentication_helper.php
rename to application/helpers/hlp_authentication_helper.php
diff --git a/application/helpers/fhc_common_helper.php b/application/helpers/hlp_common_helper.php
similarity index 100%
rename from application/helpers/fhc_common_helper.php
rename to application/helpers/hlp_common_helper.php
diff --git a/application/helpers/fhc_header_helper.php b/application/helpers/hlp_header_helper.php
similarity index 100%
rename from application/helpers/fhc_header_helper.php
rename to application/helpers/hlp_header_helper.php
diff --git a/application/helpers/fhc_language_helper.php b/application/helpers/hlp_language_helper.php
similarity index 100%
rename from application/helpers/fhc_language_helper.php
rename to application/helpers/hlp_language_helper.php
diff --git a/application/helpers/fhc_message_helper.php b/application/helpers/hlp_message_helper.php
similarity index 100%
rename from application/helpers/fhc_message_helper.php
rename to application/helpers/hlp_message_helper.php
diff --git a/application/helpers/fhc_sancho_helper.php b/application/helpers/hlp_sancho_helper.php
similarity index 100%
rename from application/helpers/fhc_sancho_helper.php
rename to application/helpers/hlp_sancho_helper.php
diff --git a/application/helpers/fhc_session_helper.php b/application/helpers/hlp_session_helper.php
similarity index 100%
rename from application/helpers/fhc_session_helper.php
rename to application/helpers/hlp_session_helper.php
diff --git a/application/libraries/FiltersLib.php b/application/libraries/FiltersLib.php
index 22fd77d4b..51c399f29 100644
--- a/application/libraries/FiltersLib.php
+++ b/application/libraries/FiltersLib.php
@@ -87,7 +87,7 @@ class FiltersLib
$this->_ci =& get_instance(); // get code igniter instance
// Loads authentication helper
- $this->_ci->load->helper('fhc_authentication'); // NOTE: needed to load custom filters do not remove!
+ $this->_ci->load->helper('hlp_authentication'); // NOTE: needed to load custom filters do not remove!
$this->_filterUniqueId = $this->_getFilterUniqueId($params); // sets the id for the related filter widget
}
diff --git a/application/models/system/MessageToken_model.php b/application/models/system/MessageToken_model.php
index 04f23382d..64cfe4996 100644
--- a/application/models/system/MessageToken_model.php
+++ b/application/models/system/MessageToken_model.php
@@ -18,7 +18,7 @@ class MessageToken_model extends CI_Model
$this->config->load('message');
// Load return message helper
- $this->load->helper('fhc_message');
+ $this->load->helper('hlp_message');
// Loads the database object
$this->load->database();
diff --git a/index.ci.php b/index.ci.php
index 043acb111..5514d9450 100644
--- a/index.ci.php
+++ b/index.ci.php
@@ -306,5 +306,8 @@ require_once 'config/vilesci.config.inc.php';
// ... and the vendor autoload
include_once 'vendor/autoload.php';
+// Autoload custom controllers, models, etc that are present in the application/core directory
+require_once 'application/config/core_includes.php';
+
// Now the bootstrap file
require_once BASEPATH.'core/CodeIgniter.php';
diff --git a/public/css/NavigationWidget.css b/public/css/NavigationWidget.css
index 0f3f30666..ae63d0e3b 100644
--- a/public/css/NavigationWidget.css
+++ b/public/css/NavigationWidget.css
@@ -36,6 +36,7 @@
.navbar-header {
padding-top: 15px;
+ padding-left: 15px;
height: 50px;
}
diff --git a/vilesci/inventar/inventarliste.php b/vilesci/inventar/inventarliste.php
index d330165ae..3166c4afb 100644
--- a/vilesci/inventar/inventarliste.php
+++ b/vilesci/inventar/inventarliste.php
@@ -26,7 +26,7 @@ require_once('../../include/benutzerberechtigung.class.php');
require_once('../../include/mitarbeiter.class.php');
require_once('../../include/ort.class.php');
require_once('../../include/organisationseinheit.class.php');
-require_once('../../include/person.class.php');
+require_once('../../include/person.class.php');
require_once('../../include/betriebsmittel.class.php');
require_once('../../include/betriebsmittelperson.class.php');
require_once('../../include/betriebsmitteltyp.class.php');
@@ -38,6 +38,11 @@ require_once('../../include/Excel/excel.php');
if (!$uid = get_uid())
die('Keine UID gefunden ! Zurück');
+$rechte = new benutzerberechtigung();
+$rechte->getBerechtigungen($uid);
+
+if(!$rechte->isBerechtigt('wawi/inventar:begrenzt'))
+ die($rechte->errormsg);
$inventarnummer=trim((isset($_REQUEST['inventarnummer']) ? $_REQUEST['inventarnummer']:''));
$seriennummer=trim((isset($_REQUEST['seriennummer']) ? $_REQUEST['seriennummer']:''));
@@ -67,7 +72,7 @@ $default_status_vorhanden='vorhanden';
$oBetriebsmittelstatus = new betriebsmittelstatus();
$oBetriebsmittelstatus->result=array();
-
+
$resultBetriebsmittelstatus=$oBetriebsmittelstatus->result;
$oBetriebsmittel = new betriebsmittel();
@@ -104,7 +109,7 @@ $format_right->setAlign('right');
$spalte=0;
$zeile=0;
-
+
if (is_null($resultBetriebsmittel) || !is_array($resultBetriebsmittel) || count($resultBetriebsmittel)<1)
return false;
@@ -132,6 +137,8 @@ $worksheet->write($zeile,++$spalte,'Anschaffungsdatum',$format_bold);
$maxlength[$spalte]=17;
$worksheet->write($zeile,++$spalte,'Anschaffungswert',$format_bold);
$maxlength[$spalte]=16;
+$worksheet->write($zeile,++$spalte,'Status',$format_bold);
+$maxlength[$spalte]=16;
$worksheet->write($zeile,++$spalte,'Person',$format_bold);
$maxlength[$spalte]=20;
@@ -139,7 +146,7 @@ for ($pos=0;$posoe_kurzbz=trim($resultBetriebsmittel[$pos]->oe_kurzbz);
if (empty($resultBetriebsmittel[$pos]->oe_kurzbz))
{
@@ -147,11 +154,11 @@ for ($pos=0;$posload_betriebsmittel_oe($resultBetriebsmittel[$pos]->betriebsmittel_id))
$resultBetriebsmittel[$pos]->oe_kurzbz=$oBetriebsmittelOrganisationseinheit->oe_kurzbz;
- else if ($oBetriebsmittelOrganisationseinheit->errormsg)
+ else if ($oBetriebsmittelOrganisationseinheit->errormsg)
$resultBetriebsmittel[$pos]->oe_kurzbz=$oBetriebsmittelOrganisationseinheit->errormsg;
}
-
-
+
+
$oOrganisationseinheit = new organisationseinheit($resultBetriebsmittel[$pos]->oe_kurzbz);
//$oOrganisationseinheit->bezeichnung='';
// String - Daten Leerzeichen am Ende entfernen
@@ -163,7 +170,7 @@ for ($pos=0;$posfirma_id=trim($resultBetriebsmittel[$pos]->firma_id);
$resultBetriebsmittel[$pos]->firmenname=trim($resultBetriebsmittel[$pos]->firmenname);
-
+
InsertCell($zeile,$spalte,$resultBetriebsmittel[$pos]->inventarnummer);
InsertCell($zeile,++$spalte,mb_str_replace("\r\n"," ",$resultBetriebsmittel[$pos]->beschreibung));
InsertCell($zeile,++$spalte,mb_str_replace("\r\n"," ",$resultBetriebsmittel[$pos]->verwendung));
@@ -174,9 +181,10 @@ for ($pos=0;$posformatDatum($resultBetriebsmittel[$pos]->betriebsmittelstatus_datum,'d.m.Y'),$format_date);
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->inventuramum,'d.m.Y'),$format_date);
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->leasing_bis,'d.m.Y'),$format_date);
-
+
InsertCell($zeile,++$spalte,$datum_obj->formatDatum($resultBetriebsmittel[$pos]->anschaffungsdatum,'d.m.Y'),$format_date);
InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->anschaffungswert, $format_number);
+ InsertCell($zeile,++$spalte,$resultBetriebsmittel[$pos]->betriebsmittelstatus_kurzbz);
$bmp = new betriebsmittelperson();
$bmp->load_betriebsmittelpersonen($resultBetriebsmittel[$pos]->betriebsmittel_id);
@@ -190,12 +198,12 @@ $maxlength[2]=30;
foreach($maxlength as $i=>$breite)
$worksheet->setColumn(0, $i, $breite+2);
$workbook->close();
-
+
function InsertCell($zeile, $spalte, $value, $format=null)
{
global $maxlength, $worksheet;
-
+
if(!is_null($format))
{
if($format=='string')
@@ -205,7 +213,7 @@ function InsertCell($zeile, $spalte, $value, $format=null)
}
else
$worksheet->write($zeile,$spalte,$value);
-
+
if(mb_strlen($value)>$maxlength[$spalte])
$maxlength[$spalte]=mb_strlen($value);
}