#34 Status admin: status types not displaying properly

release-1.1.0
closed
nobody
Program (21)
5
2006-10-28
2006-09-20
No

Hi,

On the status admin page(s), the status type field was
not showing up properly when viewing, creating, or
editing new statuses, this patch fixes the issue.

bash-2.05$ php --version
PHP 4.4.2 (cli) (built: Aug 2 2006 21:31:03)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend
Technologies

OS: Solaris, 5.9

--- modules/admin/statuses.admin.php.orig
2006-09-20 12:12:24.388790000 +0
000
+++ modules/admin/statuses.admin.php 2006-09-20
12:19:44.530117000 +0000
@@ -6,6 +6,11 @@
exit;
}

+
+include('conf/const.php');
+
+global $status_types;
+
// Used to make sure only 1 "Registered" status is defined
$registered = fetch_status(TYPE_REGISTERED);
$smarty->assign('status_types',$status_types);
@@ -96,7 +101,8 @@
$statuses = $dbi->fetch_all($sql,"array");
$num_statuses = count($statuses);
for ($x = 0;$x < $num_statuses;$x++) {
- $statuses[$x]['status_type'] =
$status_types[$statuses[$x]['status_type']
];
+ $idx = $statuses[$x]['status_type'];
+ $statuses[$x]['status_type'] = $status_types[$idx];
}
$smarty->assign('statuses',$statuses);
$smarty->display("admin/statuses.tpl");

Discussion

  • Max Schubert

    Max Schubert - 2006-09-20
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • Dustin J. Mitchell

    • status: closed --> open
     
  • Dustin J. Mitchell

    Logged In: YES
    user_id=7446

    huh -- I've never seen teh sf-robot change a ticket before. I also wasn't
    notified.

    Anyway, I think the include and global definitions were red herrings, but I'm
    willing to believe that PHP's parser couldn't handle the nested array
    references. Can you see if just the attached patch (basically the last hunk of
    yours) works for you?

     
  • Dustin J. Mitchell

    Dustin's updated patch.

     
  • Dustin J. Mitchell

    Logged In: YES
    user_id=7446

    I just got the notification now. Looks like SF's email is massively backlogged.

     
  • Dustin J. Mitchell

    Logged In: YES
    user_id=7446

    Fixed in revision 173.

     
  • Dustin J. Mitchell

    • status: open --> closed
     

Log in to post a comment.