summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eecc95b)
raw | patch | inline | side by side (parent: eecc95b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Sep 2005 05:57:44 +0000 (05:57 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 13 Sep 2005 05:57:44 +0000 (05:57 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1348 594d385d-05f5-0310-b6e9-bd551577e9d8
index 7e0433bfb1a8455c5c75f98631940393efcc365f..65cce88d352d32fd1e1d67ce9e68e63242518530 100644 (file)
function execute()
{
/* Fill templating stuff */
- $smarty= get_smarty();
+ $smarty = get_smarty();
$display= "";
/* The faifilter contais
* With a second search detect all object that belong to the different ous.
*/
$ldap = $this->config->get_ldap_link();
- $res= get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $faifilter['base'], array("cn","description","objectClass"),TRUE);
- $used=array();
+ $res = get_list($this->ui->subtreeACL, "(objectClass=organizationalUnit)",FALSE, $faifilter['base'], array("cn","description","objectClass"),TRUE);
+ $used = array();
$delete = array();
foreach($res as $objecttypes){
$res2 = get_list2($this->ui->subtreeACL, "(objectClass=*)",
FALSE, $objecttypes['dn'], array("cn","description","objectClass","FAIclass"),TRUE);
+
foreach($res2 as $object){
-
- /* skip class names with this type of object */
+
+ /* skip class names with this name */
if(in_array($this->objectClass,$object['objectClass'])){
$delete[] = $object['cn'][0];
}
unset($used[$del]);
}
- /* if there is no class name which is missing the type
- * of objectClass wew want to create now, disable selectBox
+ /* if there is no class name which is missing for this type
+ * of objectClass, we only can create a new one, disable selectBox
*/
if(count ($used)==0){
$smarty->assign("ClassNamesAvailable", " disabled ");
/* Check given class name
- * A class name For each object type,
*/
function check()
{
index 662f837e13979399a396bf403aff1d6d8eea1f52..5aa6423b873214c02dee66690426413a52deecba 100644 (file)
/* If "dn==new" we try to create a new entry
* Else we must read all objects from ldap which belong to this entry.
- * First read SubObjects from ldap ... and then the partition definitions for the SubObjects.
*/
if($dn != "new"){
$this->dn =$dn;
/* Save Dialog */
if(isset($_POST['SaveSubObject'])){
+
+ /* Perform post check*/
$this->dialog->save_object();
+
+ /* Get messages */
$msgs = $this->dialog->check();
+
+ /* print errors */
if(count($msgs)>0){
foreach($msgs as $msg){
print_red($msg);
}
}else{
+
+ /* Get return object */
$obj = $this->dialog->save();
if(isset($obj['remove'])){
+
+ /* Depending on status, set new status */
if($this->SubObjects[$obj['remove']['from']]['status']=="edited"){
$this->SubObjects[$obj['remove']['from']]['status'] = "delete";
}elseif($this->SubObjects[$obj['remove']['from']]['status']=="new"){
diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc
index c5fb59f7e3ff720560ef8297eea19773daefac64..058cddade033c248d50af03d5d406aaf4aedeaf7 100644 (file)
}
}
+ @mysql_close($r_con);
return(false);
}
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index 5b77b007519e4c4f6e0cd1454497c962f9f8d68f..fe485e2a922fde56be44ab3aafafb516d4cc6196 100644 (file)
/*
If you want to disable the status pictures, just comment out the next line
*/
- $r_con= @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con= @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
// Check if we are connected correctly
if($r_con){
$r_db = @mysql_select_db($a_SETUP['DB'],$r_con);
$fonac = preg_replace("/%title%/", $connected, $fonac);
}
}
+ mysql_close($r_con);
}
}else{
$fonac=$empty;
}
+
+
// Specify Pics for Extensions
if(in_array("posixAccount" ,$val['objectClass'])){
$posix = preg_replace("/%KEY%/", "$key", $posiximg);
diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc
index a119c495dbdbef6d7e4483f969bfb5c2cb6b0a19..6d306b32b5fc92879dfb7d027165e6d8bbd9be02 100644 (file)
$a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];
// Connect to DB server
- $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
// Check if we are connected correctly
if(!$r_con){
}
-
+ @mysql_close($r_con);
return(true);
}
$a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];
// Connect to DB server
- $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
// Check if we are connected correctly
if(!$r_con){
}
}//ENDE old num availiable ...
+ @mysql_close($r_con);
return(true);
}
index 6ac7d11dc3c330c44ebd3b2d472f29b49be96bb7..a44a489959e716df974fedd3f49428a344f7f09f 100755 (executable)
$a_SETUP = $_SESSION['config']->data['SERVERS']['FON'];
// Connect to DB server
- $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
// Check if we are connected correctly
if(!$r_con){
}
}
}
-
- return true;
-
+ if((isset($r_con))&&($r_con)){
+ @mysql_close($r_con);
+ }
+ return true;
}
diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc
index 73b6d9db229f3fcbdf2304b077474d37d3a2355c..5b88dc73352450402dccd64aa6f4a41fe2bb7bf3 100644 (file)
*/
// Connect to DB server
if((isset($a_SETUP))&&(isset($a_SETUP['SERVER']))&&(isset($a_SETUP['LOGIN']))&&(isset($a_SETUP['PASSWORD']))){
- $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
if($r_con){
$r_db = @mysql_select_db($a_SETUP['DB'],$r_con);
$vp = mysql_fetch_row(mysql_query("SELECT ".$a_SETUP['VOICE_TABLE'].".password FROM ".$a_SETUP['VOICE_TABLE'].", ".$a_SETUP['SIP_TABLE']." WHERE customer_id = sip_users.mailbox AND name='".$this->uid."'"));
if((isset($vp[0]))&&(!empty($vp[0]))){
$this->goFonPINVoice = $vp[0];
}
+ @mysql_close($r_con);
}
+
}
+
+
}
// Connect to DB server
- $r_con = @mysql_connect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
+ $r_con = @mysql_pconnect($a_SETUP['SERVER'],$a_SETUP['LOGIN'],$a_SETUP['PASSWORD']);
// Check if we are connected correctly
if(!$r_con){
foreach($SQL as $query){
if(!@mysql_query($query,$r_con)){
print_red(_("Error while performing query ".mysql_error()));
+ @mysql_close($r_con);
return false;
}
}
}
+ @mysql_close($r_con);
return true;
}
show_ldap_error($ldap->get_error());
/* Optionally execute a command after we're done */
+ @mysql_close($r_con);
$this->handle_post_events('remove');
}