namespace for types
This commit is contained in:
parent
f16a0286f7
commit
97be076bba
|
@ -33,11 +33,11 @@ $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// generate help entry for translated list attributes
|
// generate help entry for translated list attributes
|
||||||
$types = getTypes();
|
$types = LAM\TYPES\getTypes();
|
||||||
$entry206Example = "";
|
$entry206Example = "";
|
||||||
for ($i = 0; $i < sizeof($types); $i++) {
|
for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
$entry206Example .= "<b>" . getTypeAlias($types[$i]) . ":</b><br>\n";
|
$entry206Example .= "<b>" . LAM\TYPES\getTypeAlias($types[$i]) . ":</b><br>\n";
|
||||||
$descriptions = getListAttributeDescriptions($types[$i]);
|
$descriptions = LAM\TYPES\getListAttributeDescriptions($types[$i]);
|
||||||
$attributes = array_keys($descriptions);
|
$attributes = array_keys($descriptions);
|
||||||
for ($a = 0; $a < sizeof($attributes); $a++) {
|
for ($a = 0; $a < sizeof($attributes); $a++) {
|
||||||
$entry206Example .= "#" . $attributes[$a] . ": " . $descriptions[$attributes[$a]];
|
$entry206Example .= "#" . $attributes[$a] . ": " . $descriptions[$attributes[$a]];
|
||||||
|
|
|
@ -657,7 +657,7 @@ class LAMConfig {
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
// check types
|
// check types
|
||||||
$allTypes = getTypes();
|
$allTypes = LAM\TYPES\getTypes();
|
||||||
$activeTypes = $this->get_ActiveTypes();
|
$activeTypes = $this->get_ActiveTypes();
|
||||||
for ($i = 0; $i < sizeof($activeTypes); $i++) {
|
for ($i = 0; $i < sizeof($activeTypes); $i++) {
|
||||||
if (!in_array($activeTypes[$i], $allTypes)) {
|
if (!in_array($activeTypes[$i], $allTypes)) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2015 Roland Gruber
|
Copyright (C) 2003 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -865,7 +865,7 @@ class lamList {
|
||||||
$ret = array();
|
$ret = array();
|
||||||
$attr_string = $_SESSION["config"]->get_listAttributes($this->type);
|
$attr_string = $_SESSION["config"]->get_listAttributes($this->type);
|
||||||
$temp_array = explode(";", $attr_string);
|
$temp_array = explode(";", $attr_string);
|
||||||
$hash_table = getListAttributeDescriptions($this->type);
|
$hash_table = LAM\TYPES\getListAttributeDescriptions($this->type);
|
||||||
$hash_table = array_change_key_case($hash_table, CASE_LOWER);
|
$hash_table = array_change_key_case($hash_table, CASE_LOWER);
|
||||||
// generate column attributes and descriptions
|
// generate column attributes and descriptions
|
||||||
for ($i = 0; $i < sizeof($temp_array); $i++) {
|
for ($i = 0; $i < sizeof($temp_array); $i++) {
|
||||||
|
|
|
@ -40,7 +40,7 @@ class generalInformation extends baseModule {
|
||||||
* @return boolean true if module fits
|
* @return boolean true if module fits
|
||||||
*/
|
*/
|
||||||
public function can_manage() {
|
public function can_manage() {
|
||||||
return in_array($this->get_scope(), getTypes());
|
return in_array($this->get_scope(), LAM\TYPES\getTypes());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Tilo Lutz
|
Copyright (C) 2003 - 2006 Tilo Lutz
|
||||||
2007 - 2015 Roland Gruber
|
2007 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -495,7 +495,7 @@ class sambaGroupMapping extends baseModule {
|
||||||
$options = array();
|
$options = array();
|
||||||
$optionsSelected = array();
|
$optionsSelected = array();
|
||||||
for ($i = 0; $i < sizeof($types); $i++) {
|
for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
$options[getTypeAlias($types[$i])] = $types[$i];
|
$options[LAM\TYPES\getTypeAlias($types[$i])] = $types[$i];
|
||||||
if ($types[$i] == 'group') {
|
if ($types[$i] == 'group') {
|
||||||
$optionsSelected[] = $types[$i];
|
$optionsSelected[] = $types[$i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -720,7 +720,7 @@ class windowsGroup extends baseModule {
|
||||||
$options = array();
|
$options = array();
|
||||||
$optionsSelected = array();
|
$optionsSelected = array();
|
||||||
for ($i = 0; $i < sizeof($types); $i++) {
|
for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
$options[getTypeAlias($types[$i])] = $types[$i];
|
$options[LAM\TYPES\getTypeAlias($types[$i])] = $types[$i];
|
||||||
if ($types[$i] == 'user') {
|
if ($types[$i] == 'user') {
|
||||||
$optionsSelected[] = $types[$i];
|
$optionsSelected[] = $types[$i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Michael Duergner
|
Copyright (C) 2003 - 2006 Michael Duergner
|
||||||
2011 - 2013 Roland Gruber
|
2011 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -184,7 +184,7 @@ function getAvailableLogos() {
|
||||||
$dirPath = dirname(__FILE__) . '/../config/pdf/' . $_SESSION['config']->getName() . '/logos/';
|
$dirPath = dirname(__FILE__) . '/../config/pdf/' . $_SESSION['config']->getName() . '/logos/';
|
||||||
$dirHandle = opendir($dirPath);
|
$dirHandle = opendir($dirPath);
|
||||||
while($file = readdir($dirHandle)) {
|
while($file = readdir($dirHandle)) {
|
||||||
if(!is_dir($file) && $file != '.' && $file != '..' && preg_match('/\\.(jpg|png)$/',$file)) {
|
if(!is_dir($file) && $file != '.' && $file != '..' && preg_match('/\\.(jpg|png)$/i',$file)) {
|
||||||
$infos = getimagesize($dirPath . $file);
|
$infos = getimagesize($dirPath . $file);
|
||||||
if($infos[0] <= 2000 && $infos[1] <= 300) {
|
if($infos[0] <= 2000 && $infos[1] <= 300) {
|
||||||
array_push($return, array('filename' => $file, 'infos' => $infos));
|
array_push($return, array('filename' => $file, 'infos' => $infos));
|
||||||
|
@ -245,7 +245,7 @@ function copyPdfProfiles($pdfProfiles, $scope, $dests = array()) {
|
||||||
* @return StatusMessage status message to display
|
* @return StatusMessage status message to display
|
||||||
*/
|
*/
|
||||||
function uploadPDFLogo($file, $name) {
|
function uploadPDFLogo($file, $name) {
|
||||||
if (!preg_match('/[a-zA-Z0-9_-]+\\.(png)|(jpg)/', $name)) {
|
if (!preg_match('/[a-zA-Z0-9_-]+\\.(png)|(jpg)/i', $name)) {
|
||||||
return new htmlStatusMessage('ERROR', _('Unable to upload logo file.'), _('The file name must end with ".png" or ".jpg".'));
|
return new htmlStatusMessage('ERROR', _('Unable to upload logo file.'), _('The file name must end with ".png" or ".jpg".'));
|
||||||
}
|
}
|
||||||
$infos = getimagesize($file);
|
$infos = getimagesize($file);
|
||||||
|
@ -289,7 +289,7 @@ function deletePDFLogo($name) {
|
||||||
$data = loadPDFStructureDefinitions($type, $structure);
|
$data = loadPDFStructureDefinitions($type, $structure);
|
||||||
if ($data['page_definitions']['filename'] == $name) {
|
if ($data['page_definitions']['filename'] == $name) {
|
||||||
return new htmlStatusMessage('ERROR', _('Unable to delete logo file.'),
|
return new htmlStatusMessage('ERROR', _('Unable to delete logo file.'),
|
||||||
sprintf(_('Logo is still in use by PDF structure "%s" in account type "%s".'), $structure, getTypeAlias($type)));
|
sprintf(_('Logo is still in use by PDF structure "%s" in account type "%s".'), $structure, LAM\TYPES\getTypeAlias($type)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2006 - 2015 Roland Gruber
|
Copyright (C) 2006 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -154,7 +154,7 @@ function checkSelfServiceOptions($scope, $fields, $attributes, $passwordChangeOn
|
||||||
* @return array profile names (array(<account type> => array(<profile1>, <profile2>, ...)))
|
* @return array profile names (array(<account type> => array(<profile1>, <profile2>, ...)))
|
||||||
*/
|
*/
|
||||||
function getSelfServiceProfiles() {
|
function getSelfServiceProfiles() {
|
||||||
$types = getTypes();
|
$types = LAM\TYPES\getTypes();
|
||||||
$dir = dir(substr(__FILE__, 0, strlen(__FILE__) - 20) . "/config/selfService");
|
$dir = dir(substr(__FILE__, 0, strlen(__FILE__) - 20) . "/config/selfService");
|
||||||
$ret = array();
|
$ret = array();
|
||||||
while ($entry = $dir->read()){
|
while ($entry = $dir->read()){
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TYPES;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2005 - 2013 Roland Gruber
|
Copyright (C) 2005 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2004 - 2014 Roland Gruber
|
Copyright (C) 2004 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -212,7 +212,7 @@ jQuery(document).ready(function() {
|
||||||
|
|
||||||
$account_list = array();
|
$account_list = array();
|
||||||
for ($i = 0; $i < sizeof($types); $i++) {
|
for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
$account_list[] = array($types[$i], getTypeAlias($types[$i]));
|
$account_list[] = array($types[$i], LAM\TYPES\getTypeAlias($types[$i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$container = new htmlTable();
|
$container = new htmlTable();
|
||||||
|
@ -412,7 +412,7 @@ function checkInput() {
|
||||||
$depends = check_module_depends($selected, getModulesDependencies($scope));
|
$depends = check_module_depends($selected, getModulesDependencies($scope));
|
||||||
if ($depends != false) {
|
if ($depends != false) {
|
||||||
for ($i = 0; $i < sizeof($depends); $i++) {
|
for ($i = 0; $i < sizeof($depends); $i++) {
|
||||||
$errors[] = array('ERROR', getTypeAlias($scope), _("Unsolved dependency:") . ' ' .
|
$errors[] = array('ERROR', LAM\TYPES\getTypeAlias($scope), _("Unsolved dependency:") . ' ' .
|
||||||
$depends[$i][0] . " (" . $depends[$i][1] . ")");
|
$depends[$i][0] . " (" . $depends[$i][1] . ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,7 @@ function checkInput() {
|
||||||
$conflicts = check_module_conflicts($selected, getModulesDependencies($scope));
|
$conflicts = check_module_conflicts($selected, getModulesDependencies($scope));
|
||||||
if ($conflicts != false) {
|
if ($conflicts != false) {
|
||||||
for ($i = 0; $i < sizeof($conflicts); $i++) {
|
for ($i = 0; $i < sizeof($conflicts); $i++) {
|
||||||
$errors[] = array('ERROR', getTypeAlias($scope), _("Conflicting module:") . ' ' .
|
$errors[] = array('ERROR', LAM\TYPES\getTypeAlias($scope), _("Conflicting module:") . ' ' .
|
||||||
$conflicts[$i][0] . " (" . $conflicts[$i][1] . ")");
|
$conflicts[$i][0] . " (" . $conflicts[$i][1] . ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -432,7 +432,7 @@ function checkInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($baseCount != 1) {
|
if ($baseCount != 1) {
|
||||||
$errors[] = array('ERROR', getTypeAlias($scope), _("No or more than one base module selected!"));
|
$errors[] = array('ERROR', LAM\TYPES\getTypeAlias($scope), _("No or more than one base module selected!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$conf->set_typeSettings($typeSettings);
|
$conf->set_typeSettings($typeSettings);
|
||||||
|
|
|
@ -105,12 +105,12 @@ if (isset($_POST['saveSettings']) || isset($_POST['editmodules'])
|
||||||
}
|
}
|
||||||
|
|
||||||
$typeSettings = $conf->get_typeSettings();
|
$typeSettings = $conf->get_typeSettings();
|
||||||
$allTypes = getTypes();
|
$allTypes = LAM\TYPES\getTypes();
|
||||||
$activeTypes = $conf->get_ActiveTypes();
|
$activeTypes = $conf->get_ActiveTypes();
|
||||||
$availableTypes = array();
|
$availableTypes = array();
|
||||||
for ($i = 0; $i < sizeof($allTypes); $i++) {
|
for ($i = 0; $i < sizeof($allTypes); $i++) {
|
||||||
if (!in_array($allTypes[$i], $activeTypes)) {
|
if (!in_array($allTypes[$i], $activeTypes)) {
|
||||||
$availableTypes[$allTypes[$i]] = getTypeAlias($allTypes[$i]);
|
$availableTypes[$allTypes[$i]] = LAM\TYPES\getTypeAlias($allTypes[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
natcasesort($availableTypes);
|
natcasesort($availableTypes);
|
||||||
|
@ -230,7 +230,7 @@ if (sizeof($availableTypes) > 0) {
|
||||||
$availableContainer->addElement(new htmlImage('../../graphics/' . $key . '.png'));
|
$availableContainer->addElement(new htmlImage('../../graphics/' . $key . '.png'));
|
||||||
$availableContainer->addElement(new htmlOutputText($value));
|
$availableContainer->addElement(new htmlOutputText($value));
|
||||||
$availableContainer->addElement(new htmlSpacer('10px', null));
|
$availableContainer->addElement(new htmlSpacer('10px', null));
|
||||||
$availableContainer->addElement(new htmlOutputText(getTypeDescription($key)));
|
$availableContainer->addElement(new htmlOutputText(LAM\TYPES\getTypeDescription($key)));
|
||||||
$button = new htmlButton('add_' . $key, 'add.png', true);
|
$button = new htmlButton('add_' . $key, 'add.png', true);
|
||||||
$button->setTitle(_("Add"));
|
$button->setTitle(_("Add"));
|
||||||
$availableContainer->addElement($button, true);
|
$availableContainer->addElement($button, true);
|
||||||
|
@ -249,11 +249,11 @@ if (sizeof($activeTypes) > 0) {
|
||||||
$titleGroup = new htmlGroup();
|
$titleGroup = new htmlGroup();
|
||||||
$titleGroup->colspan = 6;
|
$titleGroup->colspan = 6;
|
||||||
$titleGroup->addElement(new htmlImage('../../graphics/' . $activeTypes[$i] . '.png'));
|
$titleGroup->addElement(new htmlImage('../../graphics/' . $activeTypes[$i] . '.png'));
|
||||||
$titleText = new htmlOutputText(getTypeAlias($activeTypes[$i]));
|
$titleText = new htmlOutputText(LAM\TYPES\getTypeAlias($activeTypes[$i]));
|
||||||
$titleText->setIsBold(true);
|
$titleText->setIsBold(true);
|
||||||
$titleGroup->addElement($titleText);
|
$titleGroup->addElement($titleText);
|
||||||
$titleGroup->addElement(new htmlSpacer('10px', null));
|
$titleGroup->addElement(new htmlSpacer('10px', null));
|
||||||
$titleGroup->addElement(new htmlOutputText(getTypeDescription($activeTypes[$i])));
|
$titleGroup->addElement(new htmlOutputText(LAM\TYPES\getTypeDescription($activeTypes[$i])));
|
||||||
$activeContainer->addElement($titleGroup);
|
$activeContainer->addElement($titleGroup);
|
||||||
// delete button
|
// delete button
|
||||||
$delButton = new htmlButton('rem_'. $activeTypes[$i], 'del.png', true);
|
$delButton = new htmlButton('rem_'. $activeTypes[$i], 'del.png', true);
|
||||||
|
@ -271,7 +271,7 @@ if (sizeof($activeTypes) > 0) {
|
||||||
$attributes = $typeSettings['attr_' . $activeTypes[$i]];
|
$attributes = $typeSettings['attr_' . $activeTypes[$i]];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$attributes = getDefaultListAttributes($activeTypes[$i]);
|
$attributes = LAM\TYPES\getDefaultListAttributes($activeTypes[$i]);
|
||||||
}
|
}
|
||||||
$attrsInput = new htmlTableExtendedInputField(_("List attributes"), 'attr_' . $activeTypes[$i], $attributes, '206');
|
$attrsInput = new htmlTableExtendedInputField(_("List attributes"), 'attr_' . $activeTypes[$i], $attributes, '206');
|
||||||
$attrsInput->setFieldSize(40);
|
$attrsInput->setFieldSize(40);
|
||||||
|
@ -414,7 +414,7 @@ function checkInput() {
|
||||||
$typeSettings[$key] = trim($_POST[$key]);
|
$typeSettings[$key] = trim($_POST[$key]);
|
||||||
$type = substr($postKeys[$i], 7);
|
$type = substr($postKeys[$i], 7);
|
||||||
if (strlen($_POST[$key]) < 1) {
|
if (strlen($_POST[$key]) < 1) {
|
||||||
$errors[] = array("ERROR", _("LDAP Suffix is invalid!"), getTypeAlias($type));
|
$errors[] = array("ERROR", _("LDAP Suffix is invalid!"), LAM\TYPES\getTypeAlias($type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// set attributes
|
// set attributes
|
||||||
|
@ -422,7 +422,7 @@ function checkInput() {
|
||||||
$typeSettings[$key] = $_POST[$key];
|
$typeSettings[$key] = $_POST[$key];
|
||||||
$type = substr($postKeys[$i], 5);
|
$type = substr($postKeys[$i], 5);
|
||||||
if (!is_string($_POST[$key]) || !preg_match("/^((#[^:;]+)|([^:;]*:[^:;]+))(;((#[^:;]+)|([^:;]*:[^:;]+)))*$/", $_POST[$key])) {
|
if (!is_string($_POST[$key]) || !preg_match("/^((#[^:;]+)|([^:;]*:[^:;]+))(;((#[^:;]+)|([^:;]*:[^:;]+)))*$/", $_POST[$key])) {
|
||||||
$errors[] = array("ERROR", _("List attributes are invalid!"), getTypeAlias($type));
|
$errors[] = array("ERROR", _("List attributes are invalid!"), LAM\TYPES\getTypeAlias($type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// set filter
|
// set filter
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2013 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -94,7 +94,7 @@ if (isset($_POST['saveSettings']) || isset($_POST['editmodules'])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$allTypes = getTypes();
|
$allTypes = LAM\TYPES\getTypes();
|
||||||
|
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2012 Roland Gruber
|
Copyright (C) 2003 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -50,7 +50,7 @@ if (isAccountTypeHidden($type)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// create list object if needed
|
// create list object if needed
|
||||||
$listClass = getListClassName($type);
|
$listClass = LAM\TYPES\getListClassName($type);
|
||||||
if (!isset($_SESSION['list_' . $type])) {
|
if (!isset($_SESSION['list_' . $type])) {
|
||||||
$list = new $listClass($type);
|
$list = new $listClass($type);
|
||||||
$_SESSION['list_' . $type] = $list;
|
$_SESSION['list_' . $type] = $list;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2014 Roland Gruber
|
Copyright (C) 2003 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -208,7 +208,7 @@ jQuery(document).ready(function() {
|
||||||
$link = '<a href="' . $headerPrefix . 'lists/list.php?type=' . $types[$i] .
|
$link = '<a href="' . $headerPrefix . 'lists/list.php?type=' . $types[$i] .
|
||||||
'" onmouseover="jQuery(this).addClass(\'tabs-hover\');" onmouseout="jQuery(this).removeClass(\'tabs-hover\');">' .
|
'" onmouseover="jQuery(this).addClass(\'tabs-hover\');" onmouseout="jQuery(this).removeClass(\'tabs-hover\');">' .
|
||||||
'<img height="16" width="16" alt="' . $types[$i] . '" src="' . $headerPrefix . '../graphics/' . $types[$i] . '.png"> ' .
|
'<img height="16" width="16" alt="' . $types[$i] . '" src="' . $headerPrefix . '../graphics/' . $types[$i] . '.png"> ' .
|
||||||
getTypeAlias($types[$i]) . '</a>';
|
LAM\TYPES\getTypeAlias($types[$i]) . '</a>';
|
||||||
echo '<li id="tab_' . $types[$i] . '" class="ui-state-default ui-corner-top">';
|
echo '<li id="tab_' . $types[$i] . '" class="ui-state-default ui-corner-top">';
|
||||||
echo $link;
|
echo $link;
|
||||||
echo "</li>\n";
|
echo "</li>\n";
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2013 - 2015 Roland Gruber
|
Copyright (C) 2013 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -88,7 +88,7 @@ function displayStartPage() {
|
||||||
$types = $_SESSION['config']->get_ActiveTypes();
|
$types = $_SESSION['config']->get_ActiveTypes();
|
||||||
$suffixes = array();
|
$suffixes = array();
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$suffixes[getTypeAlias($type)] = $_SESSION['config']->get_Suffix($type);
|
$suffixes[LAM\TYPES\getTypeAlias($type)] = $_SESSION['config']->get_Suffix($type);
|
||||||
$hideRules[$_SESSION['config']->get_Suffix($type)] = array('otherSuffix');
|
$hideRules[$_SESSION['config']->get_Suffix($type)] = array('otherSuffix');
|
||||||
}
|
}
|
||||||
$treeSuffix = $_SESSION['config']->get_Suffix('tree');
|
$treeSuffix = $_SESSION['config']->get_Suffix('tree');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2015 Roland Gruber
|
Copyright (C) 2003 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -172,7 +172,7 @@ function display_main($message, $error) {
|
||||||
if (isAccountTypeHidden($typeList[$i]) || !checkIfWriteAccessIsAllowed($typeList[$i])) {
|
if (isAccountTypeHidden($typeList[$i]) || !checkIfWriteAccessIsAllowed($typeList[$i])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$types[$typeList[$i]] = getTypeAlias($typeList[$i]);
|
$types[$typeList[$i]] = LAM\TYPES\getTypeAlias($typeList[$i]);
|
||||||
}
|
}
|
||||||
natcasesort($types);
|
natcasesort($types);
|
||||||
$options = array();
|
$options = array();
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2006 Michael Duergner
|
Copyright (C) 2003 - 2006 Michael Duergner
|
||||||
2005 - 2015 Roland Gruber
|
2005 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -80,7 +80,7 @@ for ($i = 0; $i < sizeof($scopes); $i++) {
|
||||||
if (isAccountTypeHidden($scopes[$i]) || !checkIfWriteAccessIsAllowed($scopes[$i])) {
|
if (isAccountTypeHidden($scopes[$i]) || !checkIfWriteAccessIsAllowed($scopes[$i])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$sortedScopes[$scopes[$i]] = getTypeAlias($scopes[$i]);
|
$sortedScopes[$scopes[$i]] = LAM\TYPES\getTypeAlias($scopes[$i]);
|
||||||
}
|
}
|
||||||
natcasesort($sortedScopes);
|
natcasesort($sortedScopes);
|
||||||
|
|
||||||
|
@ -90,12 +90,12 @@ $container->addElement(new htmlTitle(_('PDF editor')), true);
|
||||||
if (isset($_POST['deleteProfile']) && ($_POST['deleteProfile'] == 'true')) {
|
if (isset($_POST['deleteProfile']) && ($_POST['deleteProfile'] == 'true')) {
|
||||||
// delete structure
|
// delete structure
|
||||||
if (deletePDFStructureDefinition($_POST['profileDeleteType'], $_POST['profileDeleteName'])) {
|
if (deletePDFStructureDefinition($_POST['profileDeleteType'], $_POST['profileDeleteName'])) {
|
||||||
$message = new htmlStatusMessage('INFO', _('Deleted PDF structure.'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
$message = new htmlStatusMessage('INFO', _('Deleted PDF structure.'), LAM\TYPES\getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
||||||
$message->colspan = 10;
|
$message->colspan = 10;
|
||||||
$container->addElement($message, true);
|
$container->addElement($message, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = new htmlStatusMessage('ERROR', _('Unable to delete PDF structure!'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
$message = new htmlStatusMessage('ERROR', _('Unable to delete PDF structure!'), LAM\TYPES\getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
||||||
$message->colspan = 10;
|
$message->colspan = 10;
|
||||||
$container->addElement($message, true);
|
$container->addElement($message, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2003 - 2015 Roland Gruber
|
Copyright (C) 2003 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -58,9 +58,9 @@ for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
if (isAccountTypeHidden($types[$i]) || !checkIfWriteAccessIsAllowed($types[$i])) {
|
if (isAccountTypeHidden($types[$i]) || !checkIfWriteAccessIsAllowed($types[$i])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$profileClassesTemp[getTypeAlias($types[$i])] = array(
|
$profileClassesTemp[LAM\TYPES\getTypeAlias($types[$i])] = array(
|
||||||
'scope' => $types[$i],
|
'scope' => $types[$i],
|
||||||
'title' => getTypeAlias($types[$i]),
|
'title' => LAM\TYPES\getTypeAlias($types[$i]),
|
||||||
'profiles' => "");
|
'profiles' => "");
|
||||||
}
|
}
|
||||||
$profileClassesKeys = array_keys($profileClassesTemp);
|
$profileClassesKeys = array_keys($profileClassesTemp);
|
||||||
|
@ -105,12 +105,12 @@ if (isset($_POST['deleteProfile']) && ($_POST['deleteProfile'] == 'true')) {
|
||||||
}
|
}
|
||||||
// delete profile
|
// delete profile
|
||||||
if (delAccountProfile($_POST['profileDeleteName'], $_POST['profileDeleteType'])) {
|
if (delAccountProfile($_POST['profileDeleteName'], $_POST['profileDeleteType'])) {
|
||||||
$message = new htmlStatusMessage('INFO', _('Deleted profile.'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
$message = new htmlStatusMessage('INFO', _('Deleted profile.'), LAM\TYPES\getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
||||||
$message->colspan = 10;
|
$message->colspan = 10;
|
||||||
$container->addElement($message, true);
|
$container->addElement($message, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$message = new htmlStatusMessage('ERROR', _('Unable to delete profile!'), getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
$message = new htmlStatusMessage('ERROR', _('Unable to delete profile!'), LAM\TYPES\getTypeAlias($_POST['profileDeleteType']) . ': ' . htmlspecialchars($_POST['profileDeleteName']));
|
||||||
$message->colspan = 10;
|
$message->colspan = 10;
|
||||||
$container->addElement($message, true);
|
$container->addElement($message, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2007 - 2013 Roland Gruber
|
Copyright (C) 2007 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -64,7 +64,7 @@ else {
|
||||||
// loop for active account types
|
// loop for active account types
|
||||||
for ($t = 0; $t < sizeof($types); $t++) {
|
for ($t = 0; $t < sizeof($types); $t++) {
|
||||||
$modules = $_SESSION['config']->get_AccountModules($types[$t]);
|
$modules = $_SESSION['config']->get_AccountModules($types[$t]);
|
||||||
$container->addElement(new htmlSubTitle(getTypeAlias($types[$t])), true);
|
$container->addElement(new htmlSubTitle(LAM\TYPES\getTypeAlias($types[$t])), true);
|
||||||
for ($m = 0; $m < sizeof($modules); $m++) {
|
for ($m = 0; $m < sizeof($modules); $m++) {
|
||||||
$error = checkSchemaForModule($modules[$m], $types[$t]);
|
$error = checkSchemaForModule($modules[$m], $types[$t]);
|
||||||
$message = _("No problems found.");
|
$message = _("No problems found.");
|
||||||
|
|
|
@ -142,7 +142,7 @@ $table = new htmlTable();
|
||||||
// account type
|
// account type
|
||||||
$typeList = array();
|
$typeList = array();
|
||||||
for ($i = 0; $i < sizeof($types); $i++) {
|
for ($i = 0; $i < sizeof($types); $i++) {
|
||||||
$typeList[getTypeAlias($types[$i])] = $types[$i];
|
$typeList[LAM\TYPES\getTypeAlias($types[$i])] = $types[$i];
|
||||||
}
|
}
|
||||||
$selectedType = array();
|
$selectedType = array();
|
||||||
if (isset($_REQUEST['type'])) {
|
if (isset($_REQUEST['type'])) {
|
||||||
|
|
Loading…
Reference in New Issue