bug 1138: changed function se_write_log to write_se_log, changed ticket no handling
authorINOPIAE <inopiae@cacert.org>
Sun, 19 Jan 2014 17:45:35 +0000 (18:45 +0100)
committerINOPIAE <inopiae@cacert.org>
Sun, 19 Jan 2014 17:45:35 +0000 (18:45 +0100)
includes/account.php
includes/notary.inc.php
pages/account/43.php

index 162d8d9..5544bdb 100644 (file)
        }
 
        //check if ticket number was entered
-       if ( $id== 43) {
-               $ticketno=mysql_real_escape_string($_REQUEST['ticketno']);
-               $ticketvalidation=valid_ticket_number($ticketno);
+       if ( $id== 43 or $oldid==43) {
+               $ticketno = 0;
+               $ticketvalidation = FALSE;
+               if ($_REQUEST['ticketno']) {
+                       $ticketno = mysql_real_escape_string(trim($_REQUEST['ticketno']));
+                       $ticketvalidation = valid_ticket_number($ticketno);
+               }
+
                $_SESSION['ticketno']=$ticketno;
        }
 
                $userid = intval($_REQUEST['userid']);
                $query = "update `users` set `fname`='$fname',`mname`='$mname',`lname`='$lname',`suffix`='$suffix',`dob`='$year-$month-$day' where `id`='$userid'";
                mysql_query($query);
-               write_se_log($userid,$_SESSION[''], $_SESSION['profile']['id'],'AD Name/DOB Change',$ticketno);
+               write_se_log($userid, $_SESSION['profile']['id'],'AD Name/DOB Change',$ticketno);
        }else{
                $_SESSION['ticketmsg']='No action taken. Ticket number is missing!';
        }
  */
        if($id == 59){
                if ($oldid==43) {
-                       se_write_log($_REQUEST['userid'], $_SESSION['profile']['id'], 'View account history', $_REQUEST['ticketno']);
+                       write_se_log($_REQUEST['userid'], $_SESSION['profile']['id'], 'View account history', $_REQUEST['ticketno']);
                        $support=1;
                }ELSEIF ($oldid==13){
                        $support=0;
index a0eb793..83709c1 100644 (file)
@@ -1123,7 +1123,7 @@ function get_user_agreement($memid){
        }
 
 /**
- * se_write_log()
+ * write_se_log()
  *  writes an information to the adminlog
  *
  * @param mixed $uid - id of the user account
@@ -1132,7 +1132,7 @@ function get_user_agreement($memid){
  * @param mixed $info - the ticket / arbitration no or other information
  * @return
  */
-function se_write_log($uid, $adminid, $type, $info){
+function write_se_log($uid, $adminid, $type, $info){
        //records all support engineer actions changing a user account
        $uid = intval($uid);
        $adminid = intval($adminid);
index ec82b5a..686a61b 100644 (file)
@@ -243,6 +243,7 @@ if(intval($_REQUEST['userid']) > 0) {
                         </select>
                         <input type="text" name="year" value="<?=$year?>" size="4">
                         <input type="submit" value="Go">
+                        <input type="hidden" name="ticketno" value="<?=$ticketno?>"/>
                     </form>
                 </nobr>
             </td>