← Back to team overview

mahara-contributors team mailing list archive

[Bug 1867822] [NEW] Tidy up the artefact attachments_from_id_list() function

 

Public bug reported:

There are a bunch of places that call this function and then straight
after do a loop to add a file icon

We should do the adding of the file icon within the call to attachments_from_id_list()
eg:

htdocs/artefact/resume/lib.php:2088
htdocs/artefact/blog/lib.php:1051
htdocs/artefact/comment/lib.php:511
htdocs/artefact/internal/notes.php:167
htdocs/artefact/internal/notes.json.php:167

Also there are a bunch of places where we don't even call the function
and just duplicate it:

htdocs/artefact/resume/composite.json.php:
htdocs/artefact/resume/lib.php
htdocs/artefact/blog/blocktype/recentposts/lib.php:

These should be fixed to use the function we already have

** Affects: mahara
     Importance: Medium
     Assignee: Lisa Seeto (lisaseeto)
         Status: Confirmed


** Tags: code-cleanup

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
       Status: New => Confirmed

** Changed in: mahara
     Assignee: (unassigned) => Lisa Seeto (lisaseeto)

** Tags added: code-cleanup

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

Title:
  Tidy up the artefact attachments_from_id_list() function

Status in Mahara:
  Confirmed

Bug description:
  There are a bunch of places that call this function and then straight
  after do a loop to add a file icon

  We should do the adding of the file icon within the call to attachments_from_id_list()
  eg:

  htdocs/artefact/resume/lib.php:2088
  htdocs/artefact/blog/lib.php:1051
  htdocs/artefact/comment/lib.php:511
  htdocs/artefact/internal/notes.php:167
  htdocs/artefact/internal/notes.json.php:167

  Also there are a bunch of places where we don't even call the function
  and just duplicate it:

  htdocs/artefact/resume/composite.json.php:
  htdocs/artefact/resume/lib.php
  htdocs/artefact/blog/blocktype/recentposts/lib.php:

  These should be fixed to use the function we already have

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


Follow ups