]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
In lib/sql/group_info.php3 only unset variables if we need to. In lib/sql/defaults...
authorkkalev <kkalev>
Thu, 28 Oct 2004 11:12:10 +0000 (11:12 +0000)
committerkkalev <kkalev>
Thu, 28 Oct 2004 11:12:10 +0000 (11:12 +0000)
only for users

Changelog
lib/sql/defaults.php3
lib/sql/group_info.php3

index 6b8e2c037d7617cc7d89f8fe2a9874e56679b2f8..9945682eac1d2cfc0d1e93f6875ba937e9fdd2ee 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -34,6 +34,8 @@ Ver 1.75:
   change user group membership by changing membership in this group list.
 * On group creation, if member list is empty report that, not that the group was created.
 * In the show groups page, note that we only show groups with members
+* In lib/sql/group_info.php3 only unset variables if we need to. In lib/sql/defaults.php3 don't run for groups
+  only for users
 Ver 1.72:
 * Move the xlat function to a separate file in lib/xlat.php3
 * Add a lib/sql/nas_list.php3 to also get the nas list from sql (naslist.conf still works)
index 5aa331b250d0951675ed8739735b4e46f11f5df2..8ade8a165e10f544d3134800ddca5b011ce43c50 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 require('../lib/sql/attrmap.php3');
-if ($login != ''){
+if ($login != '' && $user_type != 'group'){
        if (is_file("../lib/sql/drivers/$config[sql_type]/functions.php3"))
                include_once("../lib/sql/drivers/$config[sql_type]/functions.php3");
        else{
index 5791b07be2b1b5558716eebe81f48aac53deec2f..58d2261026184624e67a5a081c4fb7b79700f476 100644 (file)
@@ -14,13 +14,11 @@ if ($config[sql_use_operators] == 'true'){
        $use_op = 0;
 }
 $group_exists = 'no';
-unset($item_vals);
-unset($tmp);
-unset($group_members);
-unset($existing_groups);
 $link = @da_sql_pconnect($config);
 if ($link){
        if ($login == ''){
+               unset($existing_groups);
+
                $res = @da_sql_query($link,$config,
                "SELECT COUNT(*) as counter,groupname FROM $config[sql_usergroup_table]
                GROUP BY groupname;");
@@ -36,6 +34,11 @@ if ($link){
                        echo "<b>Database query failed: " . da_sql_error($link,$config) . "</b><br>\n";
        }
        else{
+               unset($item_vals);
+               unset($tmp);
+               unset($group_members);
+               unset($existing_groups);
+
                $res = @da_sql_query($link,$config,
                "SELECT attribute,value $op FROM $config[sql_groupcheck_table] WHERE groupname = '$login';");
                if ($res){