Author: jfthomps
Date: Wed May  6 17:25:55 2009
New Revision: 772378

URL: http://svn.apache.org/viewvc?rev=772378&view=rev
Log:
VCL-3

removed all references to user.middlename (and any usage of a middle name at 
all), curriculum table, dept table, and schedule.start0/end0-start6/end6
removed getAppId, getDepartmentID, and getDepartments functions
added comments that support for API version 1 should be removed in VCL 2.2

Modified:
    incubator/vcl/trunk/web/.ht-inc/authmethods/itecsauth.php
    incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php
    incubator/vcl/trunk/web/.ht-inc/computers.php
    incubator/vcl/trunk/web/.ht-inc/conf.php
    incubator/vcl/trunk/web/.ht-inc/errors.php
    incubator/vcl/trunk/web/.ht-inc/images.php
    incubator/vcl/trunk/web/.ht-inc/privileges.php
    incubator/vcl/trunk/web/.ht-inc/schedules.php
    incubator/vcl/trunk/web/.ht-inc/userpreferences.php
    incubator/vcl/trunk/web/.ht-inc/utils.php
    incubator/vcl/trunk/web/.ht-inc/xmlrpcWrappers.php

Modified: incubator/vcl/trunk/web/.ht-inc/authmethods/itecsauth.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authmethods/itecsauth.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authmethods/itecsauth.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authmethods/itecsauth.php Wed May  6 
17:25:55 2009
@@ -38,7 +38,6 @@
                return NULL;
        $query = "SELECT id AS uid, "
               .        "first, " 
-              .        "middle, "
               .        "last, "
               .        "email, "
               .        "created, "
@@ -51,7 +50,6 @@
                // FIXME test replacing ''s
                // FIXME do we care if the account is active?
                $first = ereg_replace("'", "\'", $row['first']);
-               $middle = ereg_replace("'", "\'", $row['middle']);
                $last = ereg_replace("'", "\'", $row['last']);
                $loweruser = strtolower($row['email']);
                $query = "INSERT INTO user ("
@@ -59,7 +57,6 @@
                       .        "unityid, "
                       .        "affiliationid, "
                       .        "firstname, "
-                      .        "middlename, "
                       .        "lastname, "
                       .        "email, "
                       .        "emailnotices, "
@@ -69,7 +66,6 @@
                       .        "'$loweruser', "
                       .        "2, "
                       .        "'$first', "
-                      .        "'$middle', "
                       .        "'$last', "
                       .        "'{$row['email']}', "
                       .        "0, "
@@ -125,10 +121,8 @@
 /// \b unityid - unity ID for the user\n
 /// \b affiliation - user's affiliation\n
 /// \b affiliationid - user's affiliation id\n
-/// \b curriculum - curriculum user is in\n
 /// \b firstname - user's first name\n
 /// \b preferredname - user's preferred name\n
-/// \b middlename - user's middle name\n
 /// \b lastname - user's last name\n
 /// \b email - user's preferred email address\n
 /// \b IMtype - user's preferred IM protocol\n
@@ -155,7 +149,6 @@
                return NULL;
        $query = "SELECT id AS uid, "
               .        "first, " 
-              .        "middle, "
               .        "last, "
               .        "email, "
               .        "created "
@@ -168,8 +161,7 @@
        $now = unixToDatetime(time());
 
        // select desired data from db
-       $query = "SELECT c.name AS curriculum, "
-              .        "i.name AS IMtype, "
+       $query = "SELECT i.name AS IMtype, "
               .        "u.IMid AS IMid, "
               .        "u.affiliationid, "
               .        "af.name AS affiliation, "
@@ -187,12 +179,10 @@
               .        "u.mapserial AS mapserial, "
               .        "u.showallgroups "
               . "FROM user u, "
-              .      "curriculum c, "
               .      "IMtype i, "
               .      "affiliation af, "
               .      "adminlevel a "
-              . "WHERE u.curriculumid = c.id AND "
-              .       "u.IMtypeid = i.id AND "
+              . "WHERE u.IMtypeid = i.id AND "
               .       "u.adminlevelid = a.id AND "
               .       "u.affiliationid = af.id AND "
                    .       "u.uid = " . $userData["uid"];
@@ -203,14 +193,12 @@
        if($user = mysql_fetch_assoc($qh)) {
                $user["unityid"] = $userid;
                $user["firstname"] = $userData['first'];
-               $user["middlename"] = $userData['middle'];
                $user["lastname"] = $userData["last"];
                $user["email"] = $userData["email"];
                $user["lastupdated"] = $now;
                $query = "UPDATE user "
                       . "SET unityid = '$userid', "
                       .     "firstname = '{$userData['first']}', "
-                      .     "middlename = '{$userData['middle']}', "
                       .     "lastname = '{$userData['last']}', "
                       .     "email = '{$userData['email']}', "
                       .     "lastupdated = '$now' "
@@ -223,9 +211,7 @@
                $query = "SELECT u.unityid AS unityid, "
                       .        "u.affiliationid, "
                       .        "af.name AS affiliation, "
-                      .        "c.name AS curriculum, "
                       .        "u.firstname AS firstname, "
-                      .        "u.middlename AS middlename, "
                       .        "u.lastname AS lastname, "
                       .        "u.preferredname AS preferredname, "
                       .        "u.email AS email, "
@@ -245,12 +231,10 @@
                       .        "u.showallgroups, "
                       .        "u.lastupdated AS lastupdated "
                       . "FROM user u, "
-                      .      "curriculum c, "
                       .      "IMtype i, "
                       .      "affiliation af, "
                       .      "adminlevel a "
-                      . "WHERE u.curriculumid = c.id AND "
-                      .       "u.IMtypeid = i.id AND "
+                      . "WHERE u.IMtypeid = i.id AND "
                       .       "u.adminlevelid = a.id AND "
                       .       "u.affiliationid = af.id AND "
                       .       "u.id = $id";

Modified: incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php Wed May  6 
17:25:55 2009
@@ -78,10 +78,8 @@
                $query .=    "uid, ";
        $query .=       "unityid, "
               .        "affiliationid, "
-              .        "firstname, ";
-       if(array_key_exists('middle', $data))
-               $query .=    "middlename, ";
-       $query .=       "lastname, "
+              .        "firstname, "
+              .        "lastname, "
               .        "email, "
               .        "emailnotices, "
               .        "lastupdated) "
@@ -90,10 +88,8 @@
                $query .=    "{$data['numericid']}, ";
        $query .=       "'$loweruserid', "
               .        "{$authMechs[$authtype]['affiliationid']}, "
-              .        "'{$data['first']}', ";
-       if(array_key_exists('middle', $data))
-               $query .=    "'{$data['middle']}', ";
-       $query .=       "'{$data['last']}', "
+              .        "'{$data['first']}', "
+              .        "'{$data['last']}', "
               .        "'{$data['email']}', "
               .        "'{$data['emailnotices']}', "
               .        "NOW())";
@@ -171,14 +167,11 @@
        $userData = getLDAPUserData($authtype, $userid);
        if(is_null($userData))
                return NULL;
-       if(! array_key_exists('middle', $userData))
-               $userData['middle'] = '';
        $affilid = $authMechs[$authtype]['affiliationid'];
        $now = unixToDatetime(time());
 
        // select desired data from db
-       $query = "SELECT c.name AS curriculum, "
-              .        "i.name AS IMtype, "
+       $query = "SELECT i.name AS IMtype, "
               .        "u.IMid AS IMid, "
               .        "u.affiliationid, "
               .        "af.name AS affiliation, "
@@ -198,12 +191,10 @@
               .        "u.mapserial AS mapserial, "
               .        "u.showallgroups "
               . "FROM user u, "
-              .      "curriculum c, "
               .      "IMtype i, "
               .      "adminlevel a, "
               .      "affiliation af "
-              . "WHERE u.curriculumid = c.id AND "
-              .       "u.IMtypeid = i.id AND "
+              . "WHERE u.IMtypeid = i.id AND "
               .       "u.adminlevelid = a.id AND "
               .       "af.id = $affilid AND ";
        if(array_key_exists('numericid', $userData))
@@ -219,14 +210,12 @@
        if($user = mysql_fetch_assoc($qh)) {
                $user["unityid"] = $userid;
                $user["firstname"] = $userData['first'];
-               $user["middlename"] = $userData['middle'];
                $user["lastname"] = $userData["last"];
                $user["email"] = $userData["email"];
                $user["lastupdated"] = $now;
                $query = "UPDATE user "
                       . "SET unityid = '$userid', "
                       .     "firstname = '{$userData['first']}', "
-                      .     "middlename = '{$userData['middle']}', "
                       .     "lastname = '{$userData['last']}', "
                       .     "email = '{$userData['email']}', "
                       .     "lastupdated = '$now' ";
@@ -243,9 +232,7 @@
                $query = "SELECT u.unityid AS unityid, "
                       .        "u.affiliationid, "
                       .        "af.name AS affiliation, "
-                      .        "c.name AS curriculum, "
                       .        "u.firstname AS firstname, "
-                      .        "u.middlename AS middlename, "
                       .        "u.lastname AS lastname, "
                       .        "u.preferredname AS preferredname, "
                       .        "u.email AS email, "
@@ -265,12 +252,10 @@
                       .        "u.showallgroups, "
                       .        "u.lastupdated AS lastupdated "
                       . "FROM user u, "
-                      .      "curriculum c, "
                       .      "IMtype i, "
                       .      "affiliation af, "
                       .      "adminlevel a "
-                      . "WHERE u.curriculumid = c.id AND "
-                      .       "u.IMtypeid = i.id AND "
+                      . "WHERE u.IMtypeid = i.id AND "
                       .       "u.adminlevelid = a.id AND "
                       .       "u.affiliationid = af.id AND "
                       .       "u.id = $id";
@@ -311,10 +296,7 @@
 function getLDAPUserData($authtype, $userid) {
        global $authMechs, $mysql_link_vcl;
        $auth = $authMechs[$authtype];
-       $domiddle = 0;
        $donumericid = 0;
-       if(array_key_exists('middlename', $auth))
-               $domiddle = 1;
        if(array_key_exists('numericid', $auth))
                $donumericid = 1;
 
@@ -333,8 +315,6 @@
        $ldapsearch = array($auth['firstname'],
                            $auth['lastname'],
                            $auth['email']);
-       if($domiddle)
-               array_push($ldapsearch, $auth['middlename']);
        if($donumericid)
                array_push($ldapsearch, $auth['numericid']);
        # FIXME hack
@@ -365,24 +345,19 @@
                                $tmpArr = explode(' ', $data['gecos']);
                                if(count($tmpArr) == 3) {
                                        $data[strtolower($auth['firstname'])] = 
$tmpArr[0];
-                                       $data[strtolower($auth['middlename'])] 
= $tmpArr[1];
                                        $data[strtolower($auth['lastname'])] = 
$tmpArr[2];
                                }
                                elseif(count($tmpArr) == 2) {
                                        $data[strtolower($auth['firstname'])] = 
$tmpArr[0];
-                                       $data[strtolower($auth['middlename'])] 
= '';
                                        $data[strtolower($auth['lastname'])] = 
$tmpArr[1];
                                }
                                elseif(count($tmpArr) == 1) {
                                        $data[strtolower($auth['firstname'])] = 
'';
-                                       $data[strtolower($auth['middlename'])] 
= '';
                                        $data[strtolower($auth['lastname'])] = 
$tmpArr[0];
                                }
                        }
                        else {
                                $data[strtolower($auth['firstname'])] = '';
-                               if($domiddle)
-                                       $data[strtolower($auth['middlename'])] 
= '';
                                $data[strtolower($auth['lastname'])] = '';
                        }
                }
@@ -392,8 +367,6 @@
 
                $return['first'] = ereg_replace("'", "\'", 
$data[strtolower($auth['firstname'])]);
                $return['last'] = ereg_replace("'", "\'", 
$data[strtolower($auth['lastname'])]);
-               if($domiddle && 
array_key_exists(strtolower($auth['middlename']), $data))
-                       $return['middle'] = ereg_replace("'", "\'", 
$data[strtolower($auth['middlename'])]);
                if($donumericid)
                        $return['numericid'] = 
$data[strtolower($auth['numericid'])];
                $return['email'] = $data[strtolower($auth['email'])];

Modified: incubator/vcl/trunk/web/.ht-inc/computers.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/computers.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Wed May  6 17:25:55 2009
@@ -574,7 +574,6 @@
        elseif($nocomps) {
                $data["ipaddress"] = '';
                $data["stateid"] = '';
-               $data["deptid"] = '';
                $data["owner"] = '';
                $data["platformid"] = '';
                $data["scheduleid"] = '';
@@ -594,7 +593,6 @@
                $id = $data["compid"];
                $data["ipaddress"] = $computers[$id]["IPaddress"];
                $data["stateid"] = $computers[$id]["stateid"];
-               $data["deptid"] = $computers[$id]["deptid"];
                $data["owner"] = $computers[$id]["owner"];
                $data["platformid"] = $computers[$id]["platformid"];
                $data["scheduleid"] = $computers[$id]["scheduleid"];
@@ -836,7 +834,6 @@
        print "<H3>$question</H3>\n";
        printComputerInfo($data["ipaddress"],
                          $data["stateid"],
-                         $data["deptid"],
                          $data["owner"],
                          $data["platformid"],
                          $data["scheduleid"],
@@ -1024,7 +1021,6 @@
        print "<H3>$question</H3>\n";
        printComputerInfo($computers[$compid]["IPaddress"],
                          $computers[$compid]["stateid"],
-                         $computers[$compid]["deptid"],
                          $computers[$compid]["owner"],
                          $computers[$compid]["platformid"],
                          $computers[$compid]["scheduleid"],
@@ -2860,7 +2856,7 @@
 /// \param $checks - (optional) 1 to perform validation, 0 not to
 ///
 /// \return an array with the following keys:\n
-/// bulk, ipaddress, stateid, deptid, platformid, scheduleid, currentimgid,
+/// bulk, ipaddress, stateid, platformid, scheduleid, currentimgid,
 /// ram, numprocs, procspeed, network, hostname, compid, type
 ///
 /// \brief validates input from the previous form; if anything was improperly
@@ -2874,7 +2870,6 @@
        $return["bulk"] = getContinuationVar("bulk", processInputVar("bulk", 
ARG_NUMERIC));
        $return["ipaddress"] = getContinuationVar("ipaddress", 
processInputVar("ipaddress", ARG_STRING));
        $return["stateid"] = getContinuationVar("stateid", 
processInputVar("stateid", ARG_NUMERIC));
-       $return["deptid"] = getContinuationVar("deptid", 
processInputVar("deptid", ARG_NUMERIC));
        $return["owner"] = getContinuationVar("owner", processInputVar("owner", 
ARG_STRING));
        $return["platformid"] = getContinuationVar("platformid", 
processInputVar("platformid", ARG_NUMERIC));
        $return["scheduleid"] = getContinuationVar("scheduleid", 
processInputVar("scheduleid", ARG_NUMERIC));
@@ -2940,19 +2935,18 @@
 /// \fn processComputerInput2()
 ///
 /// \return an array with the following keys:\n
-/// depts, platforms, schedules, showhostname, shownextimage, 
-/// showipaddress, showram, showstate, showprocnumber, showdepartment,
-/// showprocspeed, showplatform, shownetwork, showschedule, showcomputerid,
-/// showcurrentimage, showtype, showprovisioning
+/// platforms, schedules, showhostname, shownextimage, showipaddress, showram,
+/// showstate, showprocnumber, showdepartment, showprocspeed, showplatform,
+/// shownetwork, showschedule, showcomputerid, showcurrentimage, showtype,
+/// showprovisioning
 ///
-/// \brief processes depts, platforms, schedules, and all of the flags for
+/// \brief processes platforms, schedules, and all of the flags for
 /// what data to show
 ///
 
////////////////////////////////////////////////////////////////////////////////
 function processComputerInput2() {
        $return = array();
 
-       $return["depts"] = getContinuationVar('depts', processInputVar("depts", 
ARG_MULTINUMERIC));
        $return["platforms"] = getContinuationVar('platforms', 
processInputVar("platforms", ARG_MULTINUMERIC));
        $return["schedules"] = getContinuationVar('schedules', 
processInputVar("schedules", ARG_MULTINUMERIC));
        $return["groups"] = getContinuationVar('groups', 
processInputVar("groups", ARG_MULTINUMERIC));
@@ -3008,7 +3002,7 @@
 /// \param $checks - (optional) 1 to perform validation, 0 not to
 ///
 /// \return an array with the following indexes:\n
-/// startipaddress, endipaddress, starthostval, endhostval, stateid, deptid,
+/// startipaddress, endipaddress, starthostval, endhostval, stateid,
 /// platformid, scheduleid, ram, numprocs, procspeed, network,
 /// hostname, type, count (0 if any errors found)
 ///
@@ -3040,7 +3034,6 @@
        $return["startmac"] = getContinuationVar("startmac", 
processInputVar("startmac", ARG_STRING));
 
        $return["stateid"] = getContinuationVar("stateid", 
processInputVar("stateid", ARG_NUMERIC));
-       $return["deptid"] = getContinuationVar("deptid", 
processInputVar("deptid", ARG_NUMERIC));
        $return["owner"] = getContinuationVar("owner", processInputVar("owner", 
ARG_STRING));
        $return["platformid"] = getContinuationVar("platformid", 
processInputVar("platformid", ARG_NUMERIC));
        $return["scheduleid"] = getContinuationVar("scheduleid", 
processInputVar("scheduleid", ARG_NUMERIC));
@@ -3284,7 +3277,7 @@
 /// \fn updateComputer($data)
 ///
 /// \param $data - an array with the following indexes:\n
-/// ipaddress, stateid, deptid, platformid, scheduleid,
+/// ipaddress, stateid, platformid, scheduleid,
 /// ram, numprocs, procspeed, network, hostname, compid, type
 ///
 /// \return number of rows affected by the update\n
@@ -3298,7 +3291,6 @@
        $ownerid = getUserlistID($data["owner"]);
        $query = "UPDATE computer "
               . "SET stateid = {$data["stateid"]}, "
-              /*.     "deptid = " . $data["deptid"] . ", "*/
               .     "ownerid = $ownerid, "
               .     "platformid = {$data["platformid"]}, "
               .     "scheduleid = {$data["scheduleid"]}, "
@@ -3321,7 +3313,7 @@
 /// \fn addComputer($data)
 ///
 /// \param $data - an array with the following indexes:\n
-/// ipaddress, stateid, deptid, platformid, scheduleid,
+/// ipaddress, stateid, platformid, scheduleid,
 /// ram, numprocs, procspeed, network, hostname, type
 ///
 /// \brief adds a computer to the computer table
@@ -3387,15 +3379,13 @@
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn printComputerInfo($ipaddress, $stateid, $deptid, $owner,
-///                                $platformid, $scheduleid, $currentimgid,
-///                                $ram, $numprocs, $procspeed,
-///                                $network,  $hostname, $compid, $type,
-///                                $provisioningid)
+/// \fn printComputerInfo($ipaddress, $stateid, $owner, $platformid,
+///                       $scheduleid, $currentimgid, $ram, $numprocs,
+///                       $procspeed, $network,  $hostname, $compid, $type,
+///                       $provisioningid)
 ///
 /// \param $ipaddress -  IP address of computer
 /// \param $stateid - stateid of computer
-/// \param $deptid - departmentid of computer
 /// \param $owner - owner of computer
 /// \param $platformid - platformid of computer
 /// \param $scheduleid - scheduleid of computer
@@ -3412,7 +3402,7 @@
 /// \brief prints a table of information about the computer
 ///
 
////////////////////////////////////////////////////////////////////////////////
-function printComputerInfo($ipaddress, $stateid, $deptid, $owner, $platformid,
+function printComputerInfo($ipaddress, $stateid, $owner, $platformid,
                            $scheduleid, $currentimgid, $ram, $numprocs,
                            $procspeed, $network, $hostname, $compid, $type,
                            $provisioningid) {

Modified: incubator/vcl/trunk/web/.ht-inc/conf.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/conf.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/conf.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/conf.php Wed May  6 17:25:55 2009
@@ -91,7 +91,6 @@
                                                                     #        
example3: '%...@ad.example.com'
                                   "unityid" => "samAccountName",    # ldap 
field that contains the user's login id
                                   "firstname" => "givenname",       # ldap 
field that contains the user's first name
-                                  #"middlename" => "middlename",    # ldap 
field that contains the user's middle name (optional)
                                   "lastname" => "sn",               # ldap 
field that contains the user's last name
                                   "email" => "mail",                # ldap 
field that contains the user's email address
                                   "defaultemail" => "@example.com", # if for 
some reason an email address may not be returned for a user, this is what

Modified: incubator/vcl/trunk/web/.ht-inc/errors.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/errors.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/errors.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/errors.php Wed May  6 17:25:55 2009
@@ -73,7 +73,6 @@
        "136" => "Failed to execute query 5 in addRequest",
        "137" => "Failed to execute query 6 in addRequest",
        "138" => "Failed to fetch last insert id in addRequest",
-       "139" => "Failed to execute query 1 in getAppId",
        "140" => "Failed to execute query 1 in getUserlistID",
        "141" => "Failed to execute query 1 in getGroupID",
        "145" => "Failed to execute query 1 in updateRequest",
@@ -92,7 +91,6 @@
        "170" => "Failed to execute query 1 in getImageId",
        "175" => "Failed to execute query 1 in getOSId",
        "176" => "Failed to execute query 1 in getStates",
-       "177" => "Failed to execute query 1 in getDepartments",
        "178" => "Failed to execute query 1 in getPlatforms",
        "179" => "Failed to execute query 1 in getSchedules",
        "180" => "Failed to execute query 1 in listComputers",

Modified: incubator/vcl/trunk/web/.ht-inc/images.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/images.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/images.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/images.php Wed May  6 17:25:55 2009
@@ -124,7 +124,6 @@
        $userImageIDs = array_keys($resources["image"]);
        $platforms = getPlatforms();
        $oslist = getOSList();
-       $depts = getDepartments();
 
        print "<H2>Image Profiles</H2>\n";
        if($mode == "submitDeleteImage") {
@@ -1086,7 +1085,6 @@
        $images = getImages();
        $platforms = getPlatforms();
        $oslist = getOSList();
-       $depts = getDepartments();
        $groups = getUserGroups(0, $user['affiliationid']);
        $groups = array_reverse($groups, TRUE);
        $groups[0] = array("name" => "Any");
@@ -1116,17 +1114,6 @@
                $tmp = getImageNotes($id);
                $data['description'] = $tmp['description'];
                $data['usage'] = $tmp['usage'];
-               # commented out sometime before 9-30-08
-               /*$data["prettyname"] = $images[$id]["prettyname"];
-               $data["deptid"] = $images[$id]["deptid"];
-               $data["owner"] = $images[$id]["owner"];
-               $data["platformid"] = $images[$id]["platformid"];
-               $data["osid"] = $images[$id]["osid"];
-               $data["minram"] = $images[$id]["minram"];
-               $data["minprocnumber"] = $images[$id]["minprocnumber"];
-               $data["minprocspeed"] = $images[$id]["minprocspeed"];
-               $data["minnetwork"] = $images[$id]["minnetwork"];
-               $data["reloadtime"] = $images[$id]["reloadtime"];*/
        }
 
        print "<FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
@@ -1198,8 +1185,8 @@
        print "  </TR>\n";
        print "</TABLE><br>\n";
        print "<div dojoType=\"dijit.TitlePane\" title=\"Advanced Options - 
leave ";
-       print "default values unless you really know what you are doing\" ";
-       print "open=false style=\"width: 500px\">\n";
+       print "default values unless you really know what you are 
doing<br>(click to ";
+       print "expand)\" open=false style=\"width: 500px\">\n";
        print "<TABLE>\n";
        print "  <TR>\n";
        print "    <TD colspan=3 id=hide1><hr></TD>\n";
@@ -1506,7 +1493,6 @@
 
        $platforms = getPlatforms();
        $oslist = getOSList();
-       $depts = getDepartments();
 
        print "<FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
        print "<DIV align=center>\n";
@@ -2222,7 +2208,6 @@
 
        $platforms = getPlatforms();
        $oslist = getOSList();
-       $depts = getDepartments();
 
        print "<FORM action=\"" . BASEURL . SCRIPT . "\" method=post>\n";
        print "<DIV align=center>\n";
@@ -2646,7 +2631,6 @@
        $return['requestid'] = getContinuationVar('requestid');
        #$return["name"] = processInputVar("name", ARG_STRING);
        $return["prettyname"] = processInputVar("prettyname", ARG_STRING);
-       $return["deptid"] = processInputVar("deptid", ARG_NUMERIC);
        $return["owner"] = processInputVar("owner", ARG_STRING, 
"{$user["unityid"]...@{$user['affiliation']}");
        #$return["platformid"] = processInputVar("platformid", ARG_NUMERIC);
        #$return["osid"] = processInputVar("osid", ARG_NUMERIC);

Modified: incubator/vcl/trunk/web/.ht-inc/privileges.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/privileges.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/privileges.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/privileges.php Wed May  6 17:25:55 2009
@@ -1121,10 +1121,6 @@
                print "    <TD>{$userdata["firstname"]}</TD>\n";
                print "  </TR>\n";
                print "  <TR>\n";
-               print "    <TH align=right>Middle Name:</TH>\n";
-               print "    <TD>{$userdata["middlename"]}</TD>\n";
-               print "  </TR>\n";
-               print "  <TR>\n";
                print "    <TH align=right>Last Name:</TH>\n";
                print "    <TD>{$userdata["lastname"]}</TD>\n";
                print "  </TR>\n";

Modified: incubator/vcl/trunk/web/.ht-inc/schedules.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/schedules.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/schedules.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/schedules.php Wed May  6 17:25:55 2009
@@ -659,7 +659,8 @@
 /// \param $checks - (optional) 1 to perform validation, 0 not to
 ///
 /// \return an array with the following indexes:\n
-/// scheduleid, name, owner, start[0] - start[6], end[0] - end[6]
+/// scheduleid, name, owner, submode, selrow, count, startDay, startTime,
+/// endDay, endTime
 ///
 /// \brief validates input from the previous form; if anything was improperly
 /// submitted, sets submitErr and submitErrMsg

Modified: incubator/vcl/trunk/web/.ht-inc/userpreferences.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/userpreferences.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/userpreferences.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/userpreferences.php Wed May  6 17:25:55 2009
@@ -101,11 +101,6 @@
        print "          <TD></TD>\n";
        print "        </TR>\n";
        print "        <TR>\n";
-       print "          <TH align=right>Middle Name<a 
href=#updateinfo>*</a>:</TH>\n";
-       print "          <TD>" . $user["middlename"] . "</TD>\n";
-       print "          <TD></TD>\n";
-       print "        </TR>\n";
-       print "        <TR>\n";
        print "          <TH align=right>Last Name<a 
href=#updateinfo>*</a>:</TH>\n";
        print "          <TD>" . $user["lastname"] . "</TD>\n";
        print "          <TD></TD>\n";

Modified: incubator/vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/utils.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/utils.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/utils.php Wed May  6 17:25:55 2009
@@ -354,6 +354,7 @@
                }
                $xmlpass = processInputData($_SERVER['HTTP_X_PASS'], 
ARG_STRING, 1);
                $apiver = processInputData($_SERVER['HTTP_X_APIVERSION'], 
ARG_NUMERIC, 1);
+               /* code for version 1 should probably be removed in VCL 2.2 */
                if($apiver == 1) {
                        $query = "SELECT x.id "
                               . "FROM xmlrpcKey x, "
@@ -868,7 +869,6 @@
 /// \b sn - surname\n
 /// \b employeeType - SPA/EPA/GRAD/??\n
 /// \b givenName - first name\n
-/// \b ncsuMiddleName - middle name\n
 /// \b initials \n
 /// \b title \n
 /// \b ncsuPreferredName \n
@@ -923,7 +923,6 @@
                          "homeDirectory" => "",
                          "mailHost" => "",
                          "ncsuMUAprotocol" => "",
-                         "ncsuMiddleName" => "",
                          "memberNisNetgroup" => array());
        
        $ldapConnect = ldap_connect("ldaps://ldap.ncsu.edu/");
@@ -1081,7 +1080,6 @@
                        $name = explode(' ', 
$userInfo["info"]["account"]["gecos"]);
                        if(count($name) == 3) {
                                $userInfo["givenName"] = $name[0];
-                               $userInfo["ncsuMiddleName"] = $name[1];
                                $userInfo["sn"] = $name[2];
                        }
                        elseif(count($name) == 2) {
@@ -1320,7 +1318,6 @@
 /// \return $imagelist - array of images with the following elements:\n
 /// \b name - name of image\n
 /// \b prettyname - pretty name of image\n
-/// \b deptid - dept id image belongs to\n
 /// \b ownerid - userid of owner\n
 /// \b owner - unity id of owner\n
 /// \b platformid - platformid for the platform the image if for\n
@@ -1360,7 +1357,6 @@
        $query = "SELECT i.id AS id,"
               .        "i.name AS name, "
               .        "i.prettyname AS prettyname, "
-              .        "i.deptid AS deptid, "
               .        "i.ownerid AS ownerid, "
               .        "CONCAT(u.unityid, '@', a.name) AS owner, "
               .        "i.platformid AS platformid, "
@@ -3082,9 +3078,7 @@
 /// \b affiliationid - affiliation id of user\n
 /// \b affiliation - affiliation of user\n
 /// \b login - login ID for the user (unity ID or part before \...@sign)\n
-/// \b curriculum - curriculum user is in\n
 /// \b firstname - user's first name\n
-/// \b middlename - user's middle name\n
 /// \b lastname - user's last name\n
 /// \b preferredname - user's preferred name\n
 /// \b email - user's preferred email address\n
@@ -3122,9 +3116,7 @@
        $query = "SELECT u.unityid AS unityid, "
               .        "u.affiliationid, "
               .        "af.name AS affiliation, "
-              .        "c.name AS curriculum, "
               .        "u.firstname AS firstname, "
-              .        "u.middlename AS middlename, "
               .        "u.lastname AS lastname, "
               .        "u.preferredname AS preferredname, "
               .        "u.email AS email, "
@@ -3145,12 +3137,10 @@
               .        "u.lastupdated AS lastupdated, "
               .        "af.shibonly "
               . "FROM user u, "
-              .      "curriculum c, "
               .      "IMtype i, "
               .      "affiliation af, "
               .      "adminlevel a "
-              . "WHERE u.curriculumid = c.id AND "
-              .       "u.IMtypeid = i.id AND "
+              . "WHERE u.IMtypeid = i.id AND "
               .       "u.adminlevelid = a.id AND "
               .       "u.affiliationid = af.id AND ";
        if(is_numeric($id))
@@ -3256,9 +3246,7 @@
 /// \b unityid - unity ID for the user\n
 /// \b affiliation - user's affiliation\n
 /// \b affiliationid - user's affiliation id\n
-/// \b curriculum - curriculum user is in\n
 /// \b firstname - user's first name\n
-/// \b middlename - user's middle name\n
 /// \b lastname - user's last name\n
 /// \b email - user's preferred email address\n
 /// \b IMtype - user's preferred IM protocol\n
@@ -5032,49 +5020,6 @@
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn getDepartmentID($dept)
-///
-/// \param $dept - department name
-///
-/// \return id from department table for the department name
-///
-/// \brief gets id field from department table for $dept
-///
-////////////////////////////////////////////////////////////////////////////////
-function getDepartmentID($dept) {
-       $dept = strtolower($dept);
-       $query = "SELECT id FROM department WHERE name = '$dept'";
-       $qh = doQuery($query, 101);
-       if(mysql_num_rows($qh)) {
-               $row = mysql_fetch_row($qh);
-               return $row[0];
-       }
-       else {
-               return 0;
-       }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
-/// \fn getAppId($app)
-///
-/// \param $app - name of an app (must match name in the app table)
-///
-/// \return the id of matching $app in the app table or 0 if lookup fails
-///
-/// \brief looks up the id for $app and returns it
-///
-////////////////////////////////////////////////////////////////////////////////
-function getAppId($app) {
-       $qh = doQuery("SELECT id FROM app WHERE name = '$app'", 139);
-       if($row = mysql_fetch_row($qh)) {
-               return $row[0];
-       }
-       return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
 /// \fn getImageId($image)
 ///
 /// \param $image - name of an image (must match name (not prettyname) in the 
@@ -5132,28 +5077,6 @@
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn getDepartments()
-///
-/// \return array of departments where the index are the id from the dept 
table,
-/// each index has the following elements:\n
-/// \b name - short name of department\n
-/// \b prettyname - nice looking name of department
-///
-/// \brief gets names for departments in dept table
-///
-////////////////////////////////////////////////////////////////////////////////
-function getDepartments() {
-       $qh = doQuery("SELECT id, name, prettyname FROM dept", 177);
-       $depts = array();
-       while($row = mysql_fetch_row($qh)) {
-               $depts[$row[0]]["name"] = $row[1];
-               $depts[$row[0]]["prettyname"] = $row[2];
-       }
-       return $depts;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
 /// \fn getPlatforms()
 ///
 /// \return array of platforms where the index are the id from the platform 
table
@@ -6002,9 +5925,6 @@
 /// items\n
 /// \b state - current state of the computer\n
 /// \b stateid - id of current state\n
-/// \b dept - department owning the computer\n
-/// \b prettydept - pretty name of department owning the computer\n
-/// \b deptid - id of department owning the computer\n
 /// \b owner - unity id of owner\n
 /// \b ownerid - user id of owner\n
 /// \b platform - computer's platform\n
@@ -6038,9 +5958,6 @@
        $query = "SELECT c.id AS id, "
               .        "st.name AS state, "
               .        "c.stateid AS stateid, "
-              .        "d.name AS dept, "
-              .        "d.prettyname AS prettydept, "
-              .        "c.deptid AS deptid, "
               .        "CONCAT(u.unityid, '@', a.name) AS owner, "
               .        "u.id AS ownerid, "
               .        "p.name AS platform, "
@@ -6067,7 +5984,6 @@
               .        "c.provisioningid, "
               .        "pr.prettyname AS provisioning "
               . "FROM state st, "
-              .      "dept d, "
               .      "platform p, "
               .      "schedule sc, "
               .      "image cur, "
@@ -6082,7 +5998,6 @@
               . "LEFT JOIN image next ON (c.nextimageid = next.id) "
               . "LEFT JOIN provisioning pr ON (c.provisioningid = pr.id) "
               . "WHERE c.stateid = st.id AND "
-              .       "c.deptid = d.id AND "
               .       "c.platformid = p.id AND "
               .       "c.scheduleid = sc.id AND "
               .       "c.currentimageid = cur.id AND "
@@ -6110,11 +6025,10 @@
 ///
 /// \fn getUserComputerMetaData()
 ///
-/// \return an array of 3 indices - depts, platforms, schedules - where each
+/// \return an array of 2 indices - platforms, schedules - where each
 /// index's value is an array of user's computer's data
 ///
-/// \brief builds an array of depts, platforms, and schedules for user's 
-/// computers
+/// \brief builds an array of platforms and schedules for user's computers
 ///
 
////////////////////////////////////////////////////////////////////////////////
 function getUserComputerMetaData() {
@@ -6124,15 +6038,11 @@
        $computers = getComputers();
        $resources = getUserResources(array("computerAdmin"), 
                                      array("administer", "manageGroup"), 0, 1);
-       $return = array("depts" => array(),
-                       "platforms" => array(),
+       $return = array("platforms" => array(),
                        "schedules" => array());
        foreach(array_keys($resources["computer"]) as $compid) {
                if(! array_key_exists($compid, $computers))
                        continue;
-               /*if(! in_array($computers[$compid]["prettydept"], 
$return["depts"]))
-                       $return["depts"][$computers[$compid]["deptid"]] = 
-                             $computers[$compid]["prettydept"];*/
                if(! in_array($computers[$compid]["platform"], 
$return["platforms"]))
                        $return["platforms"][$computers[$compid]["platformid"]] 
=
                              $computers[$compid]["platform"];

Modified: incubator/vcl/trunk/web/.ht-inc/xmlrpcWrappers.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/xmlrpcWrappers.php?rev=772378&r1=772377&r2=772378&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/xmlrpcWrappers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/xmlrpcWrappers.php Wed May  6 17:25:55 2009
@@ -48,6 +48,8 @@
  * \b X-APIVERSION - set this to 2\n\n
  * 
  * <h2>API Version 1</h2>
+ * \b NOTICE: API version 1 will probably be removed in VCL 2.2.  If you are
+ * still using API version 1, you need to update your code to use version 
2.\n\n
  * This version is being phased out in favor of version 2. Documentation is
  * provided for those currently using version 1 who are not ready to switch
  * to using version 2.\n\n


Reply via email to