From 7e58b7744f932ccff251573512122331b004f5eb Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@osticket.com>
Date: Fri, 17 Jan 2014 04:22:32 +0000
Subject: [PATCH] Lint and misc. fixes

---
 include/class.nav.php          | 2 +-
 include/client/open.inc.php    | 2 +-
 include/client/tickets.inc.php | 2 +-
 include/client/view.inc.php    | 4 ++--
 login.php                      | 2 +-
 tickets.php                    | 2 +-
 view.php                       | 4 ++--
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/class.nav.php b/include/class.nav.php
index 4fd2e189f..164833294 100644
--- a/include/class.nav.php
+++ b/include/class.nav.php
@@ -287,7 +287,7 @@ class UserNav {
                                             'title'=>'Show all tickets');
                 } else {
                     $navs['tickets']=array('desc'=>'View&nbsp;Ticket&nbsp;Thread',
-                                           'href'=>sprintf('tickets.php?id=%d',$user->getTicketID()),
+                                           'href'=>sprintf('tickets.php?id=%d',$user->getTicketId()),
                                            'title'=>'View ticket status');
                 }
             } else {
diff --git a/include/client/open.inc.php b/include/client/open.inc.php
index 75211c098..3f070c703 100644
--- a/include/client/open.inc.php
+++ b/include/client/open.inc.php
@@ -4,7 +4,7 @@ $info=array();
 if($thisclient && $thisclient->isValid()) {
     $info=array('name'=>$thisclient->getName(),
                 'email'=>$thisclient->getEmail(),
-                'phone'=>$thisclient->getPhone());
+                'phone'=>$thisclient->getPhoneNumber());
 }
 
 $info=($_POST && $errors)?Format::htmlchars($_POST):$info;
diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php
index f9774f54a..1c227ba4c 100644
--- a/include/client/tickets.inc.php
+++ b/include/client/tickets.inc.php
@@ -101,7 +101,7 @@ if($search)
 $negorder=$order=='DESC'?'ASC':'DESC'; //Negate the sorting
 
 ?>
-<h1>My Tickets</h1>
+<h1>Tickets</h1>
 <br>
 <form action="tickets.php" method="get" id="ticketSearchForm">
     <input type="hidden" name="a"  value="search">
diff --git a/include/client/view.inc.php b/include/client/view.inc.php
index 9011a6da0..bcd64b4ae 100644
--- a/include/client/view.inc.php
+++ b/include/client/view.inc.php
@@ -13,8 +13,8 @@ if(!$dept || !$dept->isPublic())
     <tr>
         <td colspan="2" width="100%">
             <h1>
-                Ticket #<?php echo $ticket->getExtId(); ?> &nbsp;
-                <a href="view.php?id=<?php echo $ticket->getExtId(); ?>" title="Reload"><span class="Icon refresh">&nbsp;</span></a>
+                Ticket #<?php echo $ticket->getNumber(); ?> &nbsp;
+                <a href="view.php?id=<?php echo $ticket->getId(); ?>" title="Reload"><span class="Icon refresh">&nbsp;</span></a>
             </h1>
         </td>
     </tr>
diff --git a/login.php b/login.php
index feee86956..435eebd93 100644
--- a/login.php
+++ b/login.php
@@ -25,7 +25,7 @@ if ($_POST) {
     if (($user = UserAuthenticationBackend::process($_POST['lemail'],
                     $_POST['lticket'], $errors))) {
         //XXX: Ticket owner is assumed.
-        @header('Location: tickets.php?id='.$user->getTicketID());
+        @header('Location: tickets.php?id='.$user->getTicketId());
         require_once('tickets.php'); //Just in case of 'header already sent' error.
         exit;
     } elseif(!$errors['err']) {
diff --git a/tickets.php b/tickets.php
index 6444b9cf4..78d185579 100644
--- a/tickets.php
+++ b/tickets.php
@@ -23,7 +23,7 @@ if($_REQUEST['id']) {
     if (!($ticket = Ticket::lookup($_REQUEST['id']))) {
         $errors['err']='Unknown or invalid ticket ID.';
     } elseif(!$ticket->checkUserAccess($thisclient)) {
-        $errors['err']='Unknown or invalid ticket ID.'; //Using generic message on purpose!
+        $errors['err']='Unknown or invalid ticket.'; //Using generic message on purpose!
         $ticket=null;
     }
 }
diff --git a/view.php b/view.php
index c7b7eaab7..28caa2023 100644
--- a/view.php
+++ b/view.php
@@ -23,8 +23,8 @@ if (!$thisclient || !$thisclient->isValid()) {
     // Authenticated user can be of type ticket owner or collaborator
     $errors = array();
     $user =  UserAuthenticationBackend::singleSignOn($errors);
-    if ($user && $user->getTicketID())
-        @header('Location: tickets.php?id='.$user->getTicketID());
+    if ($user && $user->getTicketId())
+        @header('Location: tickets.php?id='.$user->getTicketId());
 }
 //Simply redirecting to tickets.php until multiview is implemented.
 require('tickets.php');
-- 
GitLab