summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c830308)
raw | patch | inline | side by side (parent: c830308)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Jan 2008 12:24:57 +0000 (12:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 7 Jan 2008 12:24:57 +0000 (12:24 +0000) |
-sess_dell session::un_set
-session_register session::set
-is_global session::is_set
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8235 594d385d-05f5-0310-b6e9-bd551577e9d8
-session_register session::set
-is_global session::is_set
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8235 594d385d-05f5-0310-b6e9-bd551577e9d8
41 files changed:
index e459b6599bf03ba3f3b2ff9c2d271501013dbe56..33da6744814e1b0fbb3be9d18e4481188afb2a7d 100644 (file)
--- a/gosa-core/html/main.php
+++ b/gosa-core/html/main.php
$_POST[$name] = $value;
}
}
- sess_del ('dn');
+ session::un_set ('dn');
}
index 91b89f79ce25a8034518fe2aed6818c99371e70a..f4f58977b195928c452878c7cce999dc5a0a21a0 100644 (file)
}
/* Objects */
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
$cats = array();
if (isset($this->parent) && $this->parent !== NULL){
/* Call parent execute */
plugin::execute();
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
/* Handle posts */
function sort_by_priority($list)
{
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
asort($plist);
$newSort = array();
{
$display= "<input type='hidden' name='acl_dummy_0_0_0' value='1'>";
$cols= 3;
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
asort($plist);
index dc447c3a212c34356dc023f88205bc110b37162b..5c4af16790a22ca831c3791a6bea121b08271f27 100644 (file)
/* Debug level action */
function DEBUG($level, $line, $function, $file, $data, $info="")
{
- if (get_global('DEBUGLEVEL') & $level){
+ if (session::get('DEBUGLEVEL') & $level){
$output= "DEBUG[$level] ";
if ($function != ""){
$output.= "($file:$function():$line) - $info: ";
/* Rewrite ui object to another dn */
function change_ui_dn($dn, $newdn)
{
- $ui= get_global('ui');
+ $ui= session::get('ui');
if ($ui->dn == $dn){
$ui->dn= $newdn;
- register_global('ui',$ui);
+ session::set('ui',$ui);
}
}
/* Return plugin dir or root directory? */
if ($plugin){
if ($path == ""){
- $nf= preg_replace("!^".$BASE_DIR."/!", "", get_global('plugin_dir'));
+ $nf= preg_replace("!^".$BASE_DIR."/!", "", session::get('plugin_dir'));
} else {
$nf= preg_replace("!^".$BASE_DIR."/!", "", $path);
}
return ("$BASE_DIR/ihtml/themes/default/$nf/$filename");
}
if ($path == ""){
- return (get_global('plugin_dir')."/$filename");
+ return (session::get('plugin_dir')."/$filename");
} else {
return ($path."/$filename");
}
msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
- echo "<body>".get_global('errors')."</body></html>";
+ echo "<body>".session::get('errors')."</body></html>";
exit();
}
$ldap->search("(&(objectClass=gosaAccount)(|(uid=$username)(userPassword={$mode}$username)))", array("uid"));
msg_dialog::display(_("LDAP error"), sprintf(_('User login failed.').'<br><br>'._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
- echo "<body>".get_global('errors')."</body></html>";
+ echo "<body>".session::get('errors')."</body></html>";
exit();
}
$ldap->search("(&(objectClass=gosaAccount)(uid=$username))", array("uid"));
msg_dialog::display(_("LDAP error"), sprintf(_("User login failed.")."<br><br>"._('LDAP server returned: %s'), "<br><br><i>".$ldap->get_error()."</i>"), ERROR_DIALOG);
$smarty= get_smarty();
$smarty->display(get_template_path('headers.tpl'));
- echo "<body>".get_global('errors')."</body></html>";
+ echo "<body>".session::get('errors')."</body></html>";
exit();
}
$ldap->cd($config->current['BASE']);
@@ -776,7 +776,7 @@ function get_sub_list($filter, $category,$sub_base, $base= "", $attributes= arra
/* Check for size limit exceeded messages for GUI feedback */
if (preg_match("/size limit/i", $ldap->error)){
- register_global('limit_exceeded', TRUE);
+ session::set('limit_exceeded', TRUE);
$limit_exceeded = TRUE;
}
@@ -834,7 +834,7 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G
/* Check for size limit exceeded messages for GUI feedback */
if (preg_match("/size limit/i", $ldap->error)){
- register_global('limit_exceeded', TRUE);
+ session::set('limit_exceeded', TRUE);
}
/* Crawl through reslut entries and perform the migration to the
@@ -879,16 +879,16 @@ function get_list($filter, $category, $base= "", $attributes= array(), $flags= G
function check_sizelimit()
{
/* Ignore dialog? */
- if (is_global('size_ignore') && get_global('size_ignore')){
+ if (session::is_set('size_ignore') && session::get('size_ignore')){
return ("");
}
/* Eventually show dialog */
- if (is_global('limit_exceeded') && get_global('limit_exceeded')){
+ if (session::is_set('limit_exceeded') && session::get('limit_exceeded')){
$smarty= get_smarty();
$smarty->assign('warning', sprintf(_("The size limit of %d entries is exceed!"),
- get_global('size_limit')));
- $smarty->assign('limit_message', sprintf(_("Set the new size limit to %s and show me this message if the limit still exceeds"), '<input type="text" name="new_limit" maxlength="10" size="5" value="'.(get_global('size_limit') +100).'">'));
+ session::get('size_limit')));
+ $smarty->assign('limit_message', sprintf(_("Set the new size limit to %s and show me this message if the limit still exceeds"), '<input type="text" name="new_limit" maxlength="10" size="5" value="'.(session::get('size_limit') +100).'">'));
return($smarty->fetch(get_template_path('sizelimit.tpl')));
}
function print_sizelimit_warning()
{
- if (is_global('size_limit') && get_global('size_limit') >= 10000000 ||
- (is_global('limit_exceeded') && get_global('limit_exceeded'))){
+ if (session::is_set('size_limit') && session::get('size_limit') >= 10000000 ||
+ (session::is_set('limit_exceeded') && session::get('limit_exceeded'))){
$config= "<input type='submit' name='edit_sizelimit' value="._("Configure").">";
} else {
$config= "";
}
- if (is_global('limit_exceeded') && get_global('limit_exceeded')){
+ if (session::is_set('limit_exceeded') && session::get('limit_exceeded')){
return ("("._("incomplete").") $config");
}
return ("");
if (is_id($_POST['new_limit']) &&
isset($_POST['action']) && $_POST['action']=="newlimit"){
- register_global('size_limit', validate($_POST['new_limit']));
- register_global('size_ignore', FALSE);
+ session::set('size_limit', validate($_POST['new_limit']));
+ session::set('size_ignore', FALSE);
}
/* User wants no limits? */
if (isset($_POST['action']) && $_POST['action']=="ignore"){
- register_global('size_limit', 0);
- register_global('size_ignore', TRUE);
+ session::set('size_limit', 0);
+ session::set('size_ignore', TRUE);
}
/* User wants incomplete results */
if (isset($_POST['action']) && $_POST['action']=="limited"){
- register_global('size_ignore', TRUE);
+ session::set('size_ignore', TRUE);
}
}
getMenuCache();
/* Allow fallback to dialog */
if (isset($_POST['edit_sizelimit'])){
- register_global('size_ignore',FALSE);
+ session::set('size_ignore',FALSE);
}
}
$str.= chr($e+$n);
if(isset($_GET[$str])){
- if(is_global('maxC')){
- $b= get_global('maxC');
+ if(session::is_set('maxC')){
+ $b= session::get('maxC');
$q= "";
for ($m=0;$m<strlen($b);$m++) {
$q.= $b[$m++];
{
global $plug, $config;
- register_global('dn', $dn);
+ session::set('dn', $dn);
$remove= false;
/* Save variables from LOCK_VARS_TO_USE in session - for further editing */
- if( is_global('LOCK_VARS_TO_USE') && count(get_global('LOCK_VARS_TO_USE'))){
+ if( session::is_set('LOCK_VARS_TO_USE') && count(session::get('LOCK_VARS_TO_USE'))){
$LOCK_VARS_USED = array();
- $LOCK_VARS_TO_USE = get_global('LOCK_VARS_TO_USE');
+ $LOCK_VARS_TO_USE = session::get('LOCK_VARS_TO_USE');
foreach($LOCK_VARS_TO_USE as $name){
}
}
}
- register_global('LOCK_VARS_TO_USE',array());
- register_global('LOCK_VARS_USED' , $LOCK_VARS_USED);
+ session::set('LOCK_VARS_TO_USE',array());
+ session::set('LOCK_VARS_USED' , $LOCK_VARS_USED);
}
/* Prepare and show template */
}
-function sess_del ($var)
-{
- session::un_set($var);
-}
-
-
function show_errors($message)
{
$complete= "";
}
-function register_global($name, $object)
-{
- session::set($name,$object);
-}
-
-
-function is_global($name)
-{
- return(session::is_set($name));
-}
-
-
-function get_global($name)
-{
- return(session::get($name));
-}
-
-
function range_selector($dcnt,$start,$range=25,$post_var=false)
{
// Get all available encryption Methods
// NON STATIC CALL :)
- $tmp = new passwordMethod(get_global('config'));
+ $tmp = new passwordMethod(session::get('config'));
$available = $tmp->get_available_methods();
// read current password entry for $dn, to detect the encryption Method
diff --git a/gosa-core/plugins/addons/addressbook/class_addressbook.inc b/gosa-core/plugins/addons/addressbook/class_addressbook.inc
index 0f41b3097999d4af5764805bd9fdf60d91c4e35f..1933228b9fb648ec47c6b4abb27413faa5456178 100644 (file)
}
/* Get global filter config */
- if (!is_global("phonefilter")){
+ if (!session::is_set("phonefilter")){
$ui = get_userinfo();
$base = get_base_from_people($ui->dn);
$phonefilter= array(
"global" => "checked",
"search_for" => "*",
"object_type" => "*");
- register_global("phonefilter", $phonefilter);
+ session::set("phonefilter", $phonefilter);
}
$this->ui = get_userinfo();
}
/* Save formular information */
- $phonefilter= get_global("phonefilter");
+ $phonefilter= session::get("phonefilter");
foreach( array("search_for", "search_base", "object_type") as $type){
if (isset($_POST[$type])){
$phonefilter[$type]= $_POST[$type];
$this->search_for= $s;
$phonefilter['search_for']= $s;
}
- register_global("phonefilter", $phonefilter);
+ session::set("phonefilter", $phonefilter);
/* Assign create acl */
$acl = $this->get_entry_acls($this->abobjectclass.",".$phonefilter['search_base']);
index 9ecd1fc8b89ba0a4ec63091f3137adcc5bdd49b3..2c9994e964e65d8a1db428faf85dbef770a5291b 100644 (file)
$dfsManagment = session::get('dfsManagment');
$dfsManagment->remove_lock();
del_lock($ui->dn);
- sess_del('dfsManagment');
+ session::un_set('dfsManagment');
}
} else {
# create dfsManagment object
# do we have to reset
if (isset($_GET['reset']) && $_GET['reset'] == 1) {
del_lock ($ui->dn);
- sess_del('dfsManagment');
+ session::un_set('dfsManagment');
}
# create page header
diff --git a/gosa-core/plugins/addons/logview/class_logview.inc b/gosa-core/plugins/addons/logview/class_logview.inc
index 8716ee7e9bb749d0f72f46c6c3f69b8dfa72a434..df0f667bed690bc5be212ef0041bbaedbc95d5e7 100644 (file)
$this->config= &$config;
/* Get global filter config */
- if (!is_global("logfilter")){
+ if (!session::is_set("logfilter")){
$logfilter= array(
"time" => "1",
"log_level" => "!All",
"host" => "!All",
"regex" => "*");
- register_global("logfilter", $logfilter);
+ session::set("logfilter", $logfilter);
}
$this->ui = get_userinfo();
new log("view","logview/".get_class($this),$this->dn);
}
- $logfilter= get_global("logfilter");
+ $logfilter= session::get("logfilter");
$smarty= get_smarty();
$smarty->assign("search_result", "");
$smarty->assign("plug", "?plug=".validate($_GET['plug']));
}
/* Save data */
- $logfilter= get_global("logfilter");
+ $logfilter= session::get("logfilter");
/* Get actual select boxe values */
$logfilter_changed = 0;
}
/* Store filter values */
- register_global("logfilter", $logfilter);
+ session::set("logfilter", $logfilter);
/* Set start value */
if (isset($_GET['start'])){
diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc
index 545c0ea730aeb95288b4b92b564ea37060cb1362..9c72d0ab5269af16f55e89ebf34349dabed69eed 100644 (file)
ksort($this->gosaAclTemplate);
/* Extract available categories from plugin info list */
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
$oc = array();
foreach ($plist as $class => $acls){
}
}
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
/* Handle posts */
function sort_by_priority($list)
{
- $tmp= get_global('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
asort($plist);
$newSort = array();
index abdbb345159cdfe27db2da24f4abfabca36026ca..d4653258d7e0150c02bf9052fea5e6edc2c72292 100644 (file)
$macl = session::get('macl');
$macl->remove_lock();
del_lock ($ui->dn);
- sess_del ('macl');
+ session::un_set ('macl');
}
} else {
$display= "No headpage yet for this module";
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('macl');
+ session::un_set ('macl');
}
$display.= $output;
diff --git a/gosa-core/plugins/admin/applications/main.inc b/gosa-core/plugins/admin/applications/main.inc
index 992020d5361cb2cf64fd30fe69aad1e2969fa814..7b748386a7530479c02ba89490713f839487840d 100644 (file)
$applicationManagement = session::get('applicationManagement');
$applicationManagement->remove_lock();
del_lock ($ui->dn);
- sess_del ('applicationManagement');
+ session::un_set ('applicationManagement');
}
} else {
/* Create applicationManagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('applicationManagement');
+ session::un_set ('applicationManagement');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/admin/departments/main.inc b/gosa-core/plugins/admin/departments/main.inc
index c53038453fa00e73ada2e5ab9983c2d9322c470f..e99f53825102060db8bd573030ce44eb694e3599 100644 (file)
$department = session::get('department');
$department->remove_lock();
del_lock ($ui->dn);
- sess_del ('department');
+ session::un_set ('department');
}
} else {
/* Create usermanagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('department');
+ session::un_set ('department');
}
$display.= $output;
index 51cf4d6a2d5c64370b4462dec58c2061c77c543d..45209ca642c2deecc1400b30becfaf5dea3a38db 100755 (executable)
$DeviceManagement = session::get('DeviceManagement');
$DeviceManagement->remove_lock();
del_lock ($ui->dn);
- sess_del ('DeviceManagement');
+ session::un_set ('DeviceManagement');
}
} else {
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('DeviceManagement');
+ session::un_set ('DeviceManagement');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc b/gosa-core/plugins/admin/fai/class_faiProfileEntry.inc
index 3b51823b6dc4e615948308e5d694f4af808f1c00..81c781cfdf50e3a09d01377a6238fec94b34c992 100644 (file)
$this->FAIAllclasses = $tmp;
/* If no search filter is set, create one */
- if (!is_global("SUBfaifilter")){
+ if (!session::is_set("SUBfaifilter")){
$SUBfaifilter= array("base" => get_ou('faiou').session::get('CurrentMainBase'), "Sregex" => "*");
$SUBfaifilter['SShowTemplates'] = true;
$SUBfaifilter['SShowScripts'] = true;
$SUBfaifilter['SShowVariables'] = true;
$SUBfaifilter['SShowPackages'] = true;
$SUBfaifilter['SShowPartitions']= true;
- register_global("SUBfaifilter", $SUBfaifilter);
+ session::set("SUBfaifilter", $SUBfaifilter);
}
}
index 23ef50cd6356637e2173a430ee5848d3f4407a64..b482e32480eae3410003720288964a9e0c685b41 100644 (file)
$FAI = session::get('FAI');
$FAI->remove_lock();
del_lock ($ui->dn);
- sess_del ('FAI');
+ session::un_set ('FAI');
}
} else {
/* Create usermanagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('FAI');
+ session::un_set ('FAI');
}
/* Page header*/
if (session::is_set('objectinfo')){
diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc
index 1d9007401823af649e51534f7d6142f1213d897b..7bfb231379cebd73ea8ff919ae3206dfc0c609cf 100644 (file)
}
/* Get global filter config */
- if (!is_global("gufilter")){
+ if (!session::is_set("gufilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$gufilter= array( "dselect" => $base,
"regex" => "*");
- register_global("gufilter", $gufilter);
+ session::set("gufilter", $gufilter);
}
$gufilter= session::get('gufilter');
$gufilter['SubSearchGroup'] = false;
if ($this->group_dialog){
/* Save data */
- $gufilter= get_global("gufilter");
+ $gufilter= session::get("gufilter");
foreach( array("dselect", "regex") as $type){
if (isset($_POST[$type])){
$gufilter[$type]= $_POST[$type];
}
$gufilter['regex']= $s;
}
- register_global("gufilter", $gufilter);
+ session::set("gufilter", $gufilter);
$this->reload();
/* Show dialog */
function reload()
{
/* Fix regex string */
- $gufilter = get_global("gufilter");
+ $gufilter = session::get("gufilter");
$regex = normalizeLdap($gufilter['regex']);
$MaxUser = $this->OnlyShowFirstEntries;
diff --git a/gosa-core/plugins/admin/groups/class_groupMail.inc b/gosa-core/plugins/admin/groups/class_groupMail.inc
index cf8bb77da54914f51dae28397642e764953e0f1c..7d65c74acb7714aabef315dd28fcc3f5e317ec10 100644 (file)
/* Get global filter config */
- if (!is_global("gmailfilter")){
+ if (!session::is_set("gmailfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$gmailfilter= array( "depselect" => $base,
"muser" => "",
"regex" => "*");
- register_global("gmailfilter", $gmailfilter);
+ session::set("gmailfilter", $gmailfilter);
}
/* Load permissions */
$ldap= $this->config->get_ldap_link();
/* Save data */
- $gmailfilter= get_global("gmailfilter");
+ $gmailfilter= session::get("gmailfilter");
foreach( array("depselect", "muser", "regex") as $type){
if (isset($_POST[$type])){
$gmailfilter[$type]= $_POST[$type];
}
$gmailfilter['regex']= $s;
}
- register_global("gmailfilter", $gmailfilter);
+ session::set("gmailfilter", $gmailfilter);
/* Get actual list */
$mailusers= array ();
index c4635a8247a0df5b00aa19835e4f55335a1b3061..aac19f86cb2c568a4733cf48c0df2df625e0602d 100644 (file)
$groupManagement = session::get('groupManagement');
$groupManagement->remove_lock();
del_lock ($ui->dn);
- sess_del ('groupManagement');
+ session::un_set ('groupManagement');
}
} else {
/* Create groupManagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('groupManagement');
+ session::un_set ('groupManagement');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/admin/mimetypes/main.inc b/gosa-core/plugins/admin/mimetypes/main.inc
index 5d7aed1f962e2533930811967199f371bf9af1cb..de92142541a8e853fb0fecfe0c62031761a75af4 100755 (executable)
$MimeTypeManagement = session::get('MimeTypeManagement');
$MimeTypeManagement->remove_lock();
del_lock ($ui->dn);
- sess_del ('MimeTypeManagement');
+ session::un_set ('MimeTypeManagement');
}
} else {
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('MimeTypeManagement');
+ session::un_set ('MimeTypeManagement');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroup.inc b/gosa-core/plugins/admin/ogroups/class_ogroup.inc
index 65019ac6cf73c00cce62228109ce1a2baca5e272..83d1efb7dcbf823757fc88cfe30ddfad06e16839 100644 (file)
$this->is_account= TRUE;
/* Get global filter config */
- if (!is_global("ogfilter")){
+ if (!session::is_set("ogfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$ogfilter= array( "dselect" => $base,
"regex" => "*");
- register_global("ogfilter", $ogfilter);
+ session::set("ogfilter", $ogfilter);
}
- $ogfilter= get_global('ogfilter');
+ $ogfilter= session::get('ogfilter');
/* Adjust flags */
foreach( array( "U" => "accounts",
$ogfilter[$val]= "";
}
}
- register_global("ogfilter", $ogfilter);
+ session::set("ogfilter", $ogfilter);
if(session::is_set('CurrentMainBase')){
$this->base = session::get('CurrentMainBase');
if ($this->group_dialog){
/* Save data */
- $ogfilter= get_global("ogfilter");
+ $ogfilter= session::get("ogfilter");
foreach( array("dselect", "regex") as $type){
if (isset($_POST[$type])){
$ogfilter[$type]= $_POST[$type];
}
$ogfilter['regex']= $s;
}
- register_global("ogfilter", $ogfilter);
+ session::set("ogfilter", $ogfilter);
$this->reload();
/* Calculate actual groups */
$filter = "";
$objectClasses = array();
- $ogfilter = get_global("ogfilter");
+ $ogfilter = session::get("ogfilter");
$regex = $ogfilter['regex'];
$ldap= $this->config->get_ldap_link();
index 98793774809fdd19b83fbccefae74f2c862dc47b..a43df0999be575b5cc0d28a3644cfa852203bfe6 100644 (file)
$systems = session::get('systems');
$systems->remove_lock();
del_lock ($ui->dn);
- sess_del ('systems');
+ session::un_set ('systems');
}
} else {
/* Create usermanagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('systems');
+ session::un_set ('systems');
}
/* Page header*/
index 89fb0f17cdd7856ddd63e12cd21ae32b6e535f4e..d2ab00aa94a433e77ae67158e60050b5fcad7f48 100644 (file)
$userManagement = session::get('userManagement');
$userManagement->remove_lock();
del_lock ($ui->dn);
- sess_del ('userManagement');
+ session::un_set ('userManagement');
}
} else {
/* Create usermanagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('userManagement');
+ session::un_set ('userManagement');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/gofax/blocklists/main.inc b/gosa-core/plugins/gofax/blocklists/main.inc
index 2f0fd686353968602b8400f65bf828fd78655842..4a0f3c561e6a2bee2795608cf9f4ebbafbf5f1a7 100644 (file)
if(session::is_set('blocklist')){
$blocklist = session::get('blocklist');
del_lock ($ui->dn);
- sess_del ('blocklist');
+ session::un_set ('blocklist');
}
} else {
/* Create blocklist object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('blocklist');
+ session::un_set ('blocklist');
}
/* Page header*/
diff --git a/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc b/gosa-core/plugins/gofax/faxaccount/class_gofaxAccount.inc
index 28c308ce8a16dc2395863ffe9d9ad63096ccc9f7..f1b18145ad90dcef625b47744632128b4254b267 100644 (file)
}
/* Get global filter config */
- if (!is_global("faxfilter")){
+ if (!session::is_set("faxfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$faxfilter= array( "depselect" => $base,
"fuser" => "*",
"regex" => "");
- register_global("faxfilter", $faxfilter);
+ session::set("faxfilter", $faxfilter);
}
}
if ($this->locals_dialog){
/* Save data */
- $faxfilter= get_global("faxfilter");
+ $faxfilter= session::get("faxfilter");
foreach( array("depselect", "fuser", "regex") as $type){
if (isset($_POST[$type])){
$faxfilter[$type]= $_POST[$type];
diff --git a/gosa-core/plugins/gofax/faxaccount/main.inc b/gosa-core/plugins/gofax/faxaccount/main.inc
index fb9aef32051498f6c231b1e58e4327cfbcf3a711..54a7bda92ed3adde22c396b5e8eeb58688d62976 100644 (file)
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('gofaxAccount');
+ session::un_set ('edit');
+ session::un_set ('gofaxAccount');
}
/* Create gofaxAccount object on demand */
if (count ($message) == 0){
$gofaxAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
} else {
/* Errors found, show message */
diff --git a/gosa-core/plugins/gofax/faxreports/class_faxreport.inc b/gosa-core/plugins/gofax/faxreports/class_faxreport.inc
index 80054352422a165a3899ee99a5694ab6f9c2c01b..1292b1abad401384511c12135944f2fa659a1a89 100644 (file)
/* Get global filter config and set class vars ,
or create a filter */
- if (!is_global("faxreportfilter")){
+ if (!session::is_set("faxreportfilter")){
$faxreportfilter = array();
foreach($this->attributes_SO as $name){
$faxreportfilter[$name] = $this->$name;
}
- register_global("faxreportfilter",$faxreportfilter);
+ session::set("faxreportfilter",$faxreportfilter);
}else{
- $faxreportfilter = get_global("faxreportfilter");
+ $faxreportfilter = session::get("faxreportfilter");
foreach($this->attributes_SO as $name){
$this->$name = $faxreportfilter[$name];
}
to remember last search next time*/
function save_object()
{
- $faxreportfilter = get_global("faxreportfilter");
+ $faxreportfilter = session::get("faxreportfilter");
if(isset($_POST['EntriesPerPage'])){
$this->range = $_POST['EntriesPerPage'];
}
foreach($this->attributes_SO as $name){
$faxreportfilter[$name] = $this->$name;
}
- register_global("faxreportfilter",$faxreportfilter);
+ session::set("faxreportfilter",$faxreportfilter);
}
diff --git a/gosa-core/plugins/gofon/conference/main.inc b/gosa-core/plugins/gofon/conference/main.inc
index 54293d992d9156e827defc59d5aa0f1797dcc152..06362450951f0221121c60f96f0d24cae7d656a8 100644 (file)
$conference = session::get('conference');
$conference->remove_lock();
del_lock ($ui->dn);
- sess_del ('conference');
+ session::un_set ('conference');
}
} else {
/* Create usermanagement object on demand */
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('conference');
+ session::un_set ('conference');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/gofon/fonreports/class_fonreport.inc b/gosa-core/plugins/gofon/fonreports/class_fonreport.inc
index a63a78f3e8ef23aa1f9dfe88d31a094978a4a57e..0c256bbeba33c853c63b8f6ce093eafcae1cff18 100644 (file)
$this->year = date("Y");
/* Use filter settings if we have already searched */
- if (!is_global("fonfilter")){
+ if (!session::is_set("fonfilter")){
$fonfilter = array();
foreach($this->attributes_SO as $name){
$fonfilter[$name]=$this->$name;
}
- register_global("fonfilter", $fonfilter);
+ session::set("fonfilter", $fonfilter);
}else{
- $fonfilter = get_global("fonfilter");
+ $fonfilter = session::get("fonfilter");
foreach($this->attributes_SO as $name){
$this->$name = $fonfilter[$name];
}
to remember settings */
function save_object()
{
- $fonfilter= get_global("fonfilter");
+ $fonfilter= session::get("fonfilter");
if(isset($_POST['EntryPerPage'])){
$this->range = $_POST['EntryPerPage'];
}
foreach($this->attributes_SO as $name){
$fonfilter[$name] = $this->$name;
}
- register_global("fonfilter", $fonfilter);
+ session::set("fonfilter", $fonfilter);
}
index 4cd62bf9eecd5af80c6db801828a58406d83158e..4d438b211435b1253efe2f9771bf72f2674ed20d 100755 (executable)
$macroManagment = session::get('macroManagment');
$macroManagment->remove_lock();
del_lock ($ui->dn);
- sess_del ('macroManagment');
+ session::un_set ('macroManagment');
}
} else {
/* Reset requested? */
if (isset($_GET['reset']) && $_GET['reset'] == 1){
del_lock ($ui->dn);
- sess_del ('macroManagment');
+ session::un_set ('macroManagment');
}
/* Show and save dialog */
diff --git a/gosa-core/plugins/gofon/phoneaccount/main.inc b/gosa-core/plugins/gofon/phoneaccount/main.inc
index 687399f2ff3e34ac50d26d9f911e100e4c848161..b8cc5ac60eb99ba9aaa9578848f9fabb227c041b 100644 (file)
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('phoneAccount');
+ session::un_set ('edit');
+ session::un_set ('phoneAccount');
}
/* Create phoneAccount object on demand */
$phoneAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Write back to session */
session::set('phoneAccount',$phoneAccount);
diff --git a/gosa-core/plugins/personal/connectivity/main.inc b/gosa-core/plugins/personal/connectivity/main.inc
index 4de04fcf5f24fdf7bd2a974753d67210b5481f40..76c0de2cfaa5faf3a456f0cfdd49de832ebe7b57 100644 (file)
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('connectivity');
+ session::un_set ('edit');
+ session::un_set ('connectivity');
}
/* Create connectivity object on demand */
if (count ($message) == 0){
$connectivity->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove from session */
- sess_del ('connectivity');
+ session::un_set ('connectivity');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/environment/main.inc b/gosa-core/plugins/personal/environment/main.inc
index d6b7021cee430d1fb7729ddeea775e5f642da6bb..4a31aef587f93eee70eadf32e001f5810c915d17 100644 (file)
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
# del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('environment');
+ session::un_set ('edit');
+ session::un_set ('environment');
}
/* Create mail object on demand */
if (count ($message) == 0){
$environment->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove object */
- sess_del ('environment');
+ session::un_set ('environment');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/generic/main.inc b/gosa-core/plugins/personal/generic/main.inc
index 508d27441a42a7b7c7b64ba3ee42539e9c50c1ec..aeec45657a8c667767e17e8c67ac02e23ebce896 100644 (file)
if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('user');
+ session::un_set ('edit');
+ session::un_set ('user');
}
/* Create user object on demand */
}
del_lock ($ui->dn);
- sess_del ('user');
+ session::un_set ('user');
}
/* save changes to LDAP and disable edit mode */
if (count ($message) == 0){
$user->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Need to reset the password? */
if($user->password_change_needed()){
$display.= $smarty->fetch(get_template_path('password.tpl', TRUE));
return ($display);
} else {
- sess_del ('user');
+ session::un_set ('user');
}
} else {
diff --git a/gosa-core/plugins/personal/mail/class_mailAccount.inc b/gosa-core/plugins/personal/mail/class_mailAccount.inc
index d4d7681608d808b46f4dd70bf640d1bf38e9cce2..6df2ca7112e4f45f9726a7659783ef167b4a1683 100644 (file)
$this->sieve_management = new sieveManagement($this->config,$this->dn,$this,$id);
/* Get global filter config */
- if (!is_global("mailfilter")){
+ if (!session::is_set("mailfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$mailfilter= array( "depselect" => $base,
"muser" => "",
"regex" => "*");
- register_global("mailfilter", $mailfilter);
+ session::set("mailfilter", $mailfilter);
}
}
$ldap= $this->config->get_ldap_link();
/* Save data */
- $mailfilter= get_global("mailfilter");
+ $mailfilter= session::get("mailfilter");
foreach( array("depselect", "muser", "regex") as $type){
if (isset($_POST[$type])){
$mailfilter[$type]= $_POST[$type];
}
$mailfilter['regex']= $s;
}
- register_global("mailfilter", $mailfilter);
+ session::set("mailfilter", $mailfilter);
/* Get actual list */
$mailusers= array ();
index ea37ea22effe64b5fc4a31bd9d24cd1ee32bfe38..7a5516e26b55f3d682c49961323791203bb4320f 100644 (file)
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('mailAccount');
+ session::un_set ('edit');
+ session::un_set ('mailAccount');
}
/* Create mail object on demand */
if (count ($message) == 0){
$mailAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove object */
- sess_del ('mailAccount');
+ session::un_set ('mailAccount');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/nagios/main.inc b/gosa-core/plugins/personal/nagios/main.inc
index dc4be7c5318201ae2ca78d1eb0e9adb4d77f474c..8414b1643e3d8219d65407b1078b7c5cd927200c 100644 (file)
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('nagiosAccount');
+ session::un_set ('edit');
+ session::un_set ('nagiosAccount');
}
/* Create mail object on demand */
if (count ($message) == 0){
$nagiosAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove object */
- sess_del ('nagiosAccount');
+ session::un_set ('nagiosAccount');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/netatalk/main.inc b/gosa-core/plugins/personal/netatalk/main.inc
index a73cd7bce916bbef93ab3ec112ab0c5af2263f8b..4cbf0a3269b8dc3e3e79ae9ab2a4eeb5b7119310 100644 (file)
/* Reset requested? */
if (isset ($_POST['edit_cancel']) || (isset ($_GET['reset']) && $_GET['reset'] == 1)) {
del_lock($ui->dn);
- sess_del('edit');
- sess_del('netatalk');
+ session::un_set('edit');
+ session::un_set('netatalk');
}
/* Create netatalk object on demand */
if (count($message) == 0) {
$netatalk->save();
del_lock($ui->dn);
- sess_del('edit');
+ session::un_set('edit');
/* Remove object */
- sess_del('netatalk');
+ session::un_set('netatalk');
} else {
/* Errors found, show message */
show_errors($message);
diff --git a/gosa-core/plugins/personal/password/main.inc b/gosa-core/plugins/personal/password/main.inc
index 37ce0593e677e4ea57180102506f5f2c941e3fbf..5b3f029786f416d0be3d8d7be8e365d1a953c3a4 100644 (file)
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('password');
+ session::un_set ('edit');
+ session::un_set ('password');
}
/* Create password object on demand */
diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc
index a836759b3cf889a055ae837ea461a44e27c0b67f..63fabf0019ad5e7c08ccc9a66fc376568e54e8ad 100644 (file)
asort ($this->secondaryGroups);
/* Get global filter config */
- if (!is_global("sysfilter")){
+ if (!session::is_set("sysfilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$sysfilter= array( "depselect" => $base,
"regex" => "*");
- register_global("sysfilter", $sysfilter);
+ session::set("sysfilter", $sysfilter);
}
$this->ui = get_userinfo();
}
/* Show ws dialog */
if ($this->show_ws_dialog){
/* Save data */
- $sysfilter= get_global("sysfilter");
+ $sysfilter= session::get("sysfilter");
foreach( array("depselect", "regex") as $type){
if (isset($_POST[$type])){
$sysfilter[$type]= $_POST[$type];
}
$sysfilter['regex']= $s;
}
- register_global("sysfilter", $sysfilter);
+ session::set("sysfilter", $sysfilter);
/* Get workstation list */
$exclude= "";
index eb111d17b61ec78a36e4d9060a08586cebb2673d..dbfb33484c9138814c3842128b275dd1f60e83d9 100644 (file)
/* Reset requested? */
if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('posixAccount');
+ session::un_set ('edit');
+ session::un_set ('posixAccount');
}
/* Create posixAccount object on demand */
if (count ($message) == 0){
$posixAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove from session */
- sess_del ('posixAccount');
+ session::un_set ('posixAccount');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/samba/class_sambaAccount.inc b/gosa-core/plugins/personal/samba/class_sambaAccount.inc
index b6be2b8f6c2120008e3b3a3261ad8db1d9b40f5e..1ca0fc5c184fc050444a8cf0cfa6f7dde4c647be 100644 (file)
}
/* Get global filter config */
- if (!is_global("sambafilter")){
+ if (!session::is_set("sambafilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$sambafilter= array( "depselect" => $base, "regex" => "*");
- register_global("sambafilter", $sambafilter);
+ session::set("sambafilter", $sambafilter);
}
/* Save initial account state */
if ($this->show_ws_dialog){
/* Save data */
- $sambafilter= get_global("sambafilter");
+ $sambafilter= session::get("sambafilter");
foreach( array("depselect", "regex") as $type){
if (isset($_POST[$type])){
$sambafilter[$type]= $_POST[$type];
}
$sambafilter['regex']= $s;
}
- register_global("sambafilter", $sambafilter);
+ session::set("sambafilter", $sambafilter);
/* Get workstation list */
$exclude= "";
}
/* Get global filter config */
- if (!is_global("sambafilter")){
+ if (!session::is_set("sambafilter")){
$ui= get_userinfo();
$base= get_base_from_people($ui->dn);
$sambafilter= array( "depselect" => $base, "regex" => "*");
- register_global("sambafilter", $sambafilter);
+ session::set("sambafilter", $sambafilter);
}
}
index 0d983df9623fc707bff646d372634aa4f64dd6ab..556d033d07d762c3d862716cd6e0ffb81ed0dbec 100644 (file)
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('sambaAccount');
+ session::un_set ('edit');
+ session::un_set ('sambaAccount');
}
/* Create sambaAccount object on demand */
if (count ($message) == 0){
$sambaAccount->save ();
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove from session */
- sess_del ('sambaAccount');
+ session::un_set ('sambaAccount');
} else {
/* Errors found, show message */
show_errors ($message);
diff --git a/gosa-core/plugins/personal/scalix/main.inc b/gosa-core/plugins/personal/scalix/main.inc
index afcc1e9b4b3f28137b96effcdb2246f3a3f34b29..b20418f80a10769f38d0955dbbb9e64ef5896c75 100644 (file)
if (isset($_POST['edit_cancel']) ||
(isset($_GET['reset']) && $_GET['reset'] == 1)){
del_lock ($ui->dn);
- sess_del ('edit');
- sess_del ('scalixAccount');
+ session::un_set ('edit');
+ session::un_set ('scalixAccount');
}
/* Create mail object on demand */
gosa_log ("User/scalix object'".$ui->dn."' has been saved");
$scalixAccount->acl= "#none#";
del_lock ($ui->dn);
- sess_del ('edit');
+ session::un_set ('edit');
/* Remove object */
- sess_del ('scalixAccount');
+ session::un_set ('scalixAccount');
} else {
/* Errors found, show message */
show_errors ($message);