mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #47914
[Bug 1731807] Re: Remove unused code from lib/view.php that was never used correctly
** Changed in: mahara
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1731807
Title:
Remove unused code from lib/view.php that was never used correctly
Status in Mahara:
Fix Released
Bug description:
I noticed a bug in the
theme/raw/templates/view/blocktypecontainerediting.tpl where there
were two closing </button> tags to the one opening <button> tag (see
lines 37/38)
So I wondered why this didn't cause a problem rendering the page and
found the code would only be rendered if $configure was true.
And that would only happen if a block instance called render_editing
with $configure = true
And I noticed on view/blocks.php that happens when
$blockid = $view->get_blockinstance_currently_being_configured();
But $view->get_blockinstance_currently_being_configured(); always
returns 0 as the set_blockinstance_currently_being_configured() is
never called.
Changing the number from 0 to a valid block number on an edit screen
and then reloading page gives all manner of errors.
Looking at the commit that added the set/get functions
09c73752c11c800dcb2bfbb6606206831f19d439 this was before 1.0 release
and doesn't look to have been implemented fully.
We should clean up this area and remove any/all code that is not
actually being used
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1731807/+subscriptions
References