encryptSession == 'true')) {
diff --git a/lam/templates/pdfedit/pdfmain.php b/lam/templates/pdfedit/pdfmain.php
index cb7b2aa1..5baa6c7e 100644
--- a/lam/templates/pdfedit/pdfmain.php
+++ b/lam/templates/pdfedit/pdfmain.php
@@ -15,6 +15,7 @@ use \htmlInputFileUpload;
use \htmlHelpLink;
use \htmlInputField;
use \htmlHiddenInput;
+use \LAM\TYPES\TypeManager;
/*
$Id$
@@ -89,7 +90,7 @@ if(isset($_POST['createNewTemplate'])) {
exit();
}
-$typeManager = new \LAM\TYPES\TypeManager();
+$typeManager = new TypeManager();
$types = $typeManager->getConfiguredTypes();
$sortedTypes = array();
foreach ($types as $type) {
@@ -319,7 +320,7 @@ include '../main_header.php';
$scope = $templateClasses[$i]['scope'];
$importOptions = array();
foreach ($configProfiles as $profile) {
- $typeManagerImport = new \LAM\TYPES\TypeManager($serverProfiles[$profile]);
+ $typeManagerImport = new TypeManager($serverProfiles[$profile]);
$typesImport = $typeManagerImport->getConfiguredTypesForScope($scope);
foreach ($typesImport as $typeImport) {
if (($profile != $_SESSION['config']->getName()) || ($typeImport->getId() != $typeId)) {
@@ -374,7 +375,7 @@ include '../main_header.php';
$container->addElement(new htmlOutputText(_("Target server profile")), true);
$exportOptions = array();
foreach ($configProfiles as $profile) {
- $typeManagerExport = new \LAM\TYPES\TypeManager($serverProfiles[$profile]);
+ $typeManagerExport = new TypeManager($serverProfiles[$profile]);
$typesExport = $typeManagerExport->getConfiguredTypesForScope($scope);
foreach ($typesExport as $typeExport) {
if (($profile != $_SESSION['config']->getName()) || ($typeExport->getId() != $typeId)) {
@@ -430,15 +431,15 @@ include '../main_footer.php';
* @param string $typeId type id
* @param array $options options
* @param \LAMConfig[] $serverProfiles server profiles (name => profile object)
- * @param \LAM\TYPES\TypeManager $typeManager type manager
+ * @param TypeManager $typeManager type manager
* @return \htmlStatusMessage message or null
*/
-function importStructures($typeId, $options, &$serverProfiles, &$typeManager) {
+function importStructures($typeId, $options, &$serverProfiles, TypeManager &$typeManager) {
foreach ($options as $option) {
$sourceConfName = $option['conf'];
$sourceTypeId = $option['typeId'];
$sourceName = $option['name'];
- $sourceTypeManager = new \LAM\TYPES\TypeManager($serverProfiles[$sourceConfName]);
+ $sourceTypeManager = new TypeManager($serverProfiles[$sourceConfName]);
$sourceType = $sourceTypeManager->getConfiguredType($sourceTypeId);
$targetType = $typeManager->getConfiguredType($typeId);
if (($sourceType != null) && ($targetType != null)) {
@@ -460,10 +461,10 @@ function importStructures($typeId, $options, &$serverProfiles, &$typeManager) {
* @param string $name profile name
* @param array $options options
* @param \LAMConfig[] $serverProfiles server profiles (name => profile object)
- * @param \LAM\TYPES\TypeManager $typeManager type manager
+ * @param TypeManager $typeManager type manager
* @return \htmlStatusMessage message or null
*/
-function exportStructures($typeId, $name, $options, &$serverProfiles, &$typeManager) {
+function exportStructures($typeId, $name, $options, &$serverProfiles, TypeManager &$typeManager) {
$sourceType = $typeManager->getConfiguredType($typeId);
if ($sourceType == null) {
return null;
@@ -480,7 +481,7 @@ function exportStructures($typeId, $name, $options, &$serverProfiles, &$typeMana
}
else {
$targetTypeId = $option['typeId'];
- $targetTypeManager = new \LAM\TYPES\TypeManager($serverProfiles[$targetConfName]);
+ $targetTypeManager = new TypeManager($serverProfiles[$targetConfName]);
$targetType = $targetTypeManager->getConfiguredType($targetTypeId);
if ($targetType != null) {
try {
diff --git a/lam/templates/pdfedit/pdfpage.php b/lam/templates/pdfedit/pdfpage.php
index eb1c8b31..d38e9be8 100644
--- a/lam/templates/pdfedit/pdfpage.php
+++ b/lam/templates/pdfedit/pdfpage.php
@@ -496,7 +496,7 @@ function translateFieldIDToName($id, $scope, $availablePDFFields) {
*
* @param PDFStructure $structure
*/
-function updateBasicSettings(&$structure) {
+function updateBasicSettings(PDFStructure &$structure) {
// set headline
if (isset($_POST['headline'])) {
$structure->setTitle(str_replace('<', '', str_replace('>', '', $_POST['headline'])));
@@ -516,7 +516,7 @@ function updateBasicSettings(&$structure) {
*
* @param PDFStructure $structure
*/
-function updateSectionTitles(&$structure) {
+function updateSectionTitles(PDFStructure &$structure) {
$sections = $structure->getSections();
foreach ($_POST as $key => $value) {
if (strpos($key, 'section_') === 0) {
@@ -531,7 +531,7 @@ function updateSectionTitles(&$structure) {
*
* @param PDFStructure $structure
*/
-function addSection(&$structure) {
+function addSection(PDFStructure &$structure) {
$sections = $structure->getSections();
// add a new text field
if(isset($_POST['add_text'])) {
@@ -570,7 +570,7 @@ function addSection(&$structure) {
*
* @param PDFStructure $structure
*/
-function addSectionEntry(&$structure) {
+function addSectionEntry(PDFStructure &$structure) {
if(isset($_POST['add_new_field'])) {
$field = new PDFSectionEntry($_POST['new_field']);
$sections = $structure->getSections();
@@ -587,7 +587,7 @@ function addSectionEntry(&$structure) {
*
* @param PDFStructure $structure
*/
-function removeItem(&$structure) {
+function removeItem(PDFStructure &$structure) {
$sections = $structure->getSections();
foreach ($_POST as $key => $value) {
// remove section
@@ -617,7 +617,7 @@ function removeItem(&$structure) {
*
* @param PDFStructure $structure
*/
-function moveUp(&$structure) {
+function moveUp(PDFStructure &$structure) {
$sections = $structure->getSections();
foreach ($_POST as $key => $value) {
// move section
@@ -649,7 +649,7 @@ function moveUp(&$structure) {
*
* @param PDFStructure $structure
*/
-function moveDown(&$structure) {
+function moveDown(PDFStructure &$structure) {
$sections = $structure->getSections();
foreach ($_POST as $key => $value) {
// move section
diff --git a/lam/templates/profedit/profilemain.php b/lam/templates/profedit/profilemain.php
index 46a1e81e..cb7d41ad 100644
--- a/lam/templates/profedit/profilemain.php
+++ b/lam/templates/profedit/profilemain.php
@@ -14,6 +14,7 @@ use \htmlOutputText;
use \htmlHelpLink;
use \htmlHiddenInput;
use \htmlInputField;
+use \LAM\TYPES\TypeManager;
/*
$Id$
@@ -67,7 +68,7 @@ if (!empty($_POST)) {
validateSecurityToken();
}
-$typeManager = new \LAM\TYPES\TypeManager();
+$typeManager = new TypeManager();
$types = $typeManager->getConfiguredTypes();
$profileClasses = array();
$profileClassesTemp = array();
@@ -274,7 +275,7 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) {
$scope = $profileClasses[$i]['scope'];
$importOptions = array();
foreach ($configProfiles as $profile) {
- $typeManagerImport = new \LAM\TYPES\TypeManager($serverProfiles[$profile]);
+ $typeManagerImport = new TypeManager($serverProfiles[$profile]);
$typesImport = $typeManagerImport->getConfiguredTypesForScope($scope);
foreach ($typesImport as $typeImport) {
if (($profile != $_SESSION['config']->getName()) || ($typeImport->getId() != $typeId)) {
@@ -329,7 +330,7 @@ for ($i = 0; $i < sizeof($profileClasses); $i++) {
$container->addElement(new htmlOutputText(_("Target server profile")), true);
$exportOptions = array();
foreach ($configProfiles as $profile) {
- $typeManagerExport = new \LAM\TYPES\TypeManager($serverProfiles[$profile]);
+ $typeManagerExport = new TypeManager($serverProfiles[$profile]);
$typesExport = $typeManagerExport->getConfiguredTypesForScope($scope);
foreach ($typesExport as $typeExport) {
if (($profile != $_SESSION['config']->getName()) || ($typeExport->getId() != $typeId)) {
@@ -385,15 +386,15 @@ include '../main_footer.php';
* @param string $typeId type id
* @param array $options options
* @param \LAMConfig[] $serverProfiles server profiles (name => profile object)
- * @param \LAM\TYPES\TypeManager $typeManager type manager
+ * @param TypeManager $typeManager type manager
* @return \htmlStatusMessage message or null
*/
-function importProfiles($typeId, $options, &$serverProfiles, &$typeManager) {
+function importProfiles($typeId, $options, &$serverProfiles, TypeManager &$typeManager) {
foreach ($options as $option) {
$sourceConfName = $option['conf'];
$sourceTypeId = $option['typeId'];
$sourceName = $option['name'];
- $sourceTypeManager = new \LAM\TYPES\TypeManager($serverProfiles[$sourceConfName]);
+ $sourceTypeManager = new TypeManager($serverProfiles[$sourceConfName]);
$sourceType = $sourceTypeManager->getConfiguredType($sourceTypeId);
$targetType = $typeManager->getConfiguredType($typeId);
if (($sourceType != null) && ($targetType != null)) {
@@ -415,10 +416,10 @@ function importProfiles($typeId, $options, &$serverProfiles, &$typeManager) {
* @param string $name profile name
* @param array $options options
* @param \LAMConfig[] $serverProfiles server profiles (name => profile object)
- * @param \LAM\TYPES\TypeManager $typeManager type manager
+ * @param TypeManager $typeManager type manager
* @return \htmlStatusMessage message or null
*/
-function exportProfiles($typeId, $name, $options, &$serverProfiles, &$typeManager) {
+function exportProfiles($typeId, $name, $options, &$serverProfiles, TypeManager &$typeManager) {
$sourceType = $typeManager->getConfiguredType($typeId);
if ($sourceType == null) {
return null;
@@ -435,7 +436,7 @@ function exportProfiles($typeId, $name, $options, &$serverProfiles, &$typeManage
}
else {
$targetTypeId = $option['typeId'];
- $targetTypeManager = new \LAM\TYPES\TypeManager($serverProfiles[$targetConfName]);
+ $targetTypeManager = new TypeManager($serverProfiles[$targetConfName]);
$targetType = $targetTypeManager->getConfiguredType($targetTypeId);
if ($targetType != null) {
try {
diff --git a/lam/templates/upload/massBuildAccounts.php b/lam/templates/upload/massBuildAccounts.php
index 0123b2a1..82c4e089 100644
--- a/lam/templates/upload/massBuildAccounts.php
+++ b/lam/templates/upload/massBuildAccounts.php
@@ -282,7 +282,7 @@ include '../main_footer.php';
* @param array $selectedModules selected modules for upload
* @param htmlTable $container table container
*/
-function massPrintBackButton($typeId, $selectedModules, &$container) {
+function massPrintBackButton($typeId, $selectedModules, htmlTable &$container) {
$backButton = new htmlButton('submit', _('Back'));
$backButton->setIconClass('backButton');
$container->addElement($backButton);
diff --git a/lam/templates/upload/masscreate.php b/lam/templates/upload/masscreate.php
index 96505966..60c69448 100644
--- a/lam/templates/upload/masscreate.php
+++ b/lam/templates/upload/masscreate.php
@@ -256,7 +256,7 @@ include '../main_footer.php';
* @param \LAM\TYPES\ConfiguredType $type account type
* @param array $selectedModules list of selected account modules
*/
-function showMainPage($type, $selectedModules) {
+function showMainPage(\LAM\TYPES\ConfiguredType $type, $selectedModules) {
$scope = $type->getScope();
echo '';
// get input fields from modules