[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [phpGroupWare-users] Re: Re: Re: Trouble Ticket System broken
From: |
Benoit Hamet |
Subject: |
Re: [phpGroupWare-users] Re: Re: Re: Trouble Ticket System broken |
Date: |
Wed, 08 Sep 2010 17:02:29 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.24 (X11/20100329) |
Steven Gilroy a écrit :
> LOL sorry, was early for me, I put in the command correctly and here is the
> result:
>
> Quote:
>> patching file tts/index.php
>> Hunk #4 FAILED at 278.
>> 1 out of 9 hunks FAILED -- saving rejects to file tts/index.php.rej
My fault, I fixed another bug and forget to include it in the patch.
so please do the following :
patch -R -p1 < patch_tts_php53.diff
Then apply the new patch (attached)
patch -p1 < new_patch_tts_php53.diff
Sorry for the mistake :).
Caeies.
>
>
> index.php.rej is attached
>
> I now see the listings of tickets however there are no links to click on for
> the ticket details/editing/updating.Sent from the phpGroupWare forums @
> http://forums.phpGroupWare.org
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> phpGroupWare-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/phpgroupware-users
Index: a/tts/index.php
===================================================================
--- a/tts/index.php (révision 21320)
+++ b/tts/index.php (copie de travail)
@@ -184,9 +184,10 @@
}
*/
- $db2 = $GLOBALS['phpgw']->db;
- $GLOBALS['phpgw']->db->query("select * from phpgw_tts_tickets
$filtermethod $sortmethod",__LINE__,__FILE__);
- $numfound = $GLOBALS['phpgw']->db->num_rows();
+ $db = clone $GLOBALS['phpgw']->db;
+ $db2 = clone $GLOBALS['phpgw']->db;
+ $db->query("select * from phpgw_tts_tickets $filtermethod
$sortmethod",__LINE__,__FILE__);
+ $numfound = $db->num_rows();
if ($filter != '' || $filter == 'viewopen')
{
@@ -233,16 +234,16 @@
}
$GLOBALS['phpgw']->template->set_var('tts_head_subject',
$GLOBALS['phpgw']->nextmatchs->show_sort_order($sort,'ticket_subject',$order,'/tts/index.php',lang('Subject')));
- if ($GLOBALS['phpgw']->db->num_rows() == 0)
+ if ($db->num_rows() == 0)
{
$GLOBALS['phpgw']->template->set_var('rows',
'<p><center>'.lang('No tickets found').'</center>');
}
else
{
- while ($GLOBALS['phpgw']->db->next_record())
+ while ($db->next_record())
{
$GLOBALS['phpgw']->template->set_var('tts_col_status','');
- $priority = $GLOBALS['phpgw']->db->f('ticket_priority');
+ $priority = $db->f('ticket_priority');
switch ($priority)
{
case 1: $tr_color =
$GLOBALS['phpgw_info']['theme']['bg01']; $prio = '1'; break;
@@ -258,12 +259,12 @@
default: $tr_color =
$GLOBALS['phpgw_info']['theme']['bg_color']; $prio = '-';
}
- if ($filter!="viewopen" &&
$GLOBALS['phpgw']->db->f('t_timestamp_closed'))
+ if ($filter!="viewopen" && $db->f('t_timestamp_closed'))
{
$tr_color =
$GLOBALS['phpgw_info']['theme']['th_bg']; /*"#CCCCCC";*/
}
- $db2->query("select count(*) from phpgw_tts_views where
view_id='" . $GLOBALS['phpgw']->db->f('ticket_id')
+ $db2->query("select count(*) from phpgw_tts_views where
view_id='" . $db->f('ticket_id')
. "' and view_account_id='" .
$GLOBALS['phpgw_info']['user']['account_id'] . "'",__LINE__,__FILE__);
$db2->next_record();
@@ -277,9 +278,9 @@
}
$GLOBALS['phpgw']->template->set_var('tts_row_color',
$tr_color );
-
$GLOBALS['phpgw']->template->set_var('tts_ticketdetails_link',
$GLOBALS['phpgw']->link('/tts/viewticket_details.php','ticket_id=' .
$GLOBALS['phpgw']->db->f('ticket_id')));
+
$GLOBALS['phpgw']->template->set_var('tts_ticketdetails_link',
$GLOBALS['phpgw']->link('/tts/viewticket_details.php','ticket_id=' .
$db->f('ticket_id')));
-
$GLOBALS['phpgw']->template->set_var('row_ticket_id','<a href="' .
$GLOBALS['phpgw']->link('/tts/viewticket_details.php','ticket_id=' .
$GLOBALS['phpgw']->db->f('ticket_id')) . '">' .
$GLOBALS['phpgw']->db->f('ticket_id') . '</a>');
+
$GLOBALS['phpgw']->template->set_var('row_ticket_id','<a href="' .
$GLOBALS['phpgw']->link('/tts/viewticket_details.php','ticket_id=' .
$db->f('ticket_id')) . '">' . $db->f('ticket_id') . '</a>');
if (! $ticket_read)
{
@@ -299,22 +300,22 @@
}
$GLOBALS['phpgw']->template->set_var('tts_t_priostr',$priostr);
- $cat_name =
$GLOBALS['phpgw']->categories->id2name($GLOBALS['phpgw']->db->f('ticket_category'));
+ $cat_name =
$GLOBALS['phpgw']->categories->id2name($db->f('ticket_category'));
$GLOBALS['phpgw']->template->set_var('row_category',$cat_name);
- $group_name =
$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('ticket_group'));
+ $group_name =
$GLOBALS['phpgw']->accounts->id2name($db->f('ticket_group'));
$group_name = ($group_name ? $group_name : '--');
$GLOBALS['phpgw']->template->set_var('row_group',$group_name);
-
$GLOBALS['phpgw']->template->set_var('tts_t_assignedto',
$GLOBALS['phpgw']->db->f('ticket_assignedto')?$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('ticket_assignedto')):lang('None'));
-
$GLOBALS['phpgw']->template->set_var('tts_t_user',$GLOBALS['phpgw']->accounts->id2name($GLOBALS['phpgw']->db->f('ticket_owner')));
+
$GLOBALS['phpgw']->template->set_var('tts_t_assignedto',
$db->f('ticket_assignedto')?$GLOBALS['phpgw']->accounts->id2name($db->f('ticket_assignedto')):lang('None'));
+
$GLOBALS['phpgw']->template->set_var('tts_t_user',$GLOBALS['phpgw']->accounts->id2name($db->f('ticket_owner')));
- $history_values =
$GLOBALS['phpgw']->historylog->return_array(array(),array('O'),'history_timestamp','ASC',$GLOBALS['phpgw']->db->f('ticket_id'));
+ $history_values =
$GLOBALS['phpgw']->historylog->return_array(array(),array('O'),'history_timestamp','ASC',$db->f('ticket_id'));
$GLOBALS['phpgw']->template->set_var('tts_t_timestampopened',$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']
- ((60*60) *
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])));
- if ($GLOBALS['phpgw']->db->f('ticket_status') == 'X')
+ if ($db->f('ticket_status') == 'X')
{
- $history_values =
$GLOBALS['phpgw']->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$GLOBALS['phpgw']->db->f('ticket_id'));
+ $history_values =
$GLOBALS['phpgw']->historylog->return_array(array(),array('X'),'history_timestamp','DESC',$db->f('ticket_id'));
$GLOBALS['phpgw']->template->set_var('tts_t_timestampclosed',$GLOBALS['phpgw']->common->show_date($history_values[0]['datetime']
- ((60*60) *
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])));
$GLOBALS['phpgw']->template->parse('tts_col_status','tts_col_ifviewall',False);
}
@@ -332,7 +333,7 @@
$GLOBALS['phpgw']->template->set_var('tts_t_timestampclosed',lang('Open'));
$GLOBALS['phpgw']->template->parse('tts_col_status','tts_col_ifviewall',False);
}
- $GLOBALS['phpgw']->template->set_var('tts_t_subject',
htmlspecialchars(stripslashes($GLOBALS['phpgw']->db->f('ticket_subject'))));
+ $GLOBALS['phpgw']->template->set_var('tts_t_subject',
htmlspecialchars(stripslashes($db->f('ticket_subject'))));
$GLOBALS['phpgw']->template->set_var('tts_t_prio',
$prio);
$GLOBALS['phpgw']->template->parse('rows','tts_row',True);
@@ -376,11 +377,11 @@
$GLOBALS['phpgw']->template->set_var('filter_prio','<select
name=ticket[filter_prio] onChange="document.search.submit()"><option>
</option>'.$sel.'</select>');
- $GLOBALS['phpgw']->db->query("select distinct ticket_owner from
phpgw_tts_tickets order by ticket_owner desc");
+ $db->query("select distinct ticket_owner from phpgw_tts_tickets
order by ticket_owner desc");
$y=0;
- while ($GLOBALS['phpgw']->db->next_record() != 0)
+ while ($db->next_record() != 0)
{
- $dbvalue[$y] = $GLOBALS['phpgw']->db->f('0') ;
+ $dbvalue[$y] = $db->f('0') ;
$db2name[$y] =
$GLOBALS['phpgw']->accounts->id2name($dbvalue[$y]);
++$y;
}
@@ -405,9 +406,9 @@
$GLOBALS['phpgw']->db->query("select distinct ticket_assignedto
from phpgw_tts_tickets order by ticket_assignedto desc");
$y=0;
- while ($GLOBALS['phpgw']->db->next_record() != 0)
+ while ($db->next_record() != 0)
{
- $dbvalue[$y] = $GLOBALS['phpgw']->db->f('0') ;
+ $dbvalue[$y] = $db->f('0') ;
$db2name[$y] =
$GLOBALS['phpgw']->accounts->id2name($dbvalue[$y]);
++$y;
}
@@ -434,9 +435,9 @@
$GLOBALS['phpgw']->db->query("select distinct ticket_category
from phpgw_tts_tickets order by ticket_category");
$y=0;
unset($db2name);
- while ($GLOBALS['phpgw']->db->next_record() != 0)
+ while ($db->next_record() != 0)
{
- $dbvalue[$y] = $GLOBALS['phpgw']->db->f('0');
+ $dbvalue[$y] = $db->f('0');
$db2name[$y] =
$GLOBALS['phpgw']->categories->id2name($dbvalue[$y]);
++$y;
}