Group data queried too many times on group pages

Bug #887002 reported by Richard Mansfield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Richard Mansfield

Bug Description

The group_current_group() function fails to use its static variable, and queries the db every time it's called, resulting in several pointless queries on some group pages.

Changed in mahara:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Richard Mansfield (richard-mansfield)
milestone: none → 1.5.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/834
Committed: http://gitorious.org/mahara/mahara/commit/79cf0eb22fae7a6e9abbde041bac15e525933cfe
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit 79cf0eb22fae7a6e9abbde041bac15e525933cfe
Author: Richard Mansfield <email address hidden>
Date: Mon Nov 7 18:26:44 2011 +1300

    Check value of static variable in group_current_group (bug #887002)

    The $dying variable mentioned in the comment being deleted in this
    patch is not necessary because checking the value of $group stops
    a 2nd exception being thrown.

    The return value of group_current_group is only checked in the smarty
    function to stop a "Trying to get property of non-object" warning
    from being logged.

    Change-Id: Ic78458bbe6ebe52fc4cb82cc661949d97ed450b4
    Signed-off-by: Richard Mansfield <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Melissa Draper (melissa) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPjqY0AAoJECXBtiziiXdcrpMIAKO5qOyhN9AQn9fCr32yAEba
wyQwhMOm1wS5eB4Qa29Hbr3c0xgXcwgsIFHfe0SCL92Gt2W3UjB8klrrRYssj5iu
o7DlmKBJhXo7i/AC005KeMTQZfY7ZX/tI8Lqux3FjfhSpRhCPatLLPr/hZHTbB4X
XXI47L8e304a6AwmDgsa9UUejDIjOwmOF7fFTeul8OgS4zSg3GUDQ1tTMW3+7Sns
YNmS3iU2+e0Z1CQlg5BqKwHVzCByuPPXuotvUkBkcLP53k1gUOn3OnMODTfbbrvf
UOVYo510SEKrkMCi0B4rLQHg8Ck2cUc1wS4GhxCOMrAcYDokjgTM98AerGB2sGE=
=uHSn
-----END PGP SIGNATURE-----

Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.