← Back to team overview

mahara-contributors team mailing list archive

[Bug 1605419] Re: Remove unused & obsolete methods of the "View" class

 

** Changed in: mahara
       Status: In Progress => Fix Committed

-- 
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/1605419

Title:
  Remove unused & obsolete methods of the "View" class

Status in Mahara:
  Fix Committed

Bug description:
  The method View::find_artefact_children() was added in 2007, and was
  only ever used in the method View::get_artefact_hierarchy(). The
  function View::get_artefact_hierarchy() was then removed later in 2007
  due to errors, but View::find_artefact_children() was left behind by
  apparent oversight.

  In its current form it's not very useful, and it's more or less
  redundant with artefact_get_descendants() in artefact/lib.php.

  Likewise there are several other "orphan" methods in the View class,
  which it would be good to remove because:

  1. The class is already huge, and removing unnecessary methods will
  make it easier for developers to find the useful methods in it.

  2. These unused methods often contain bugs, because they're not
  updated when Mahara's internal data structures change.

  I'm going to remove several of these unused methods, and refactor away
  a few single-use methods that don't provide any real API value.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1605419/+subscriptions


References