Eliminate redundant &obsolete get_mime_type() function

Bug #1301096 reported by Aaron Wells on 2014-04-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Aaron Wells

Bug Description

In htdocs/lib/file.php, right above file_mime_type(), there's another method called get_mime_type() that uses the Unix "file" utility. It's only used one place in the code, which is in an upgrade to the file artefact type from 2008.

I'd like to eliminate this redundant function to prevent other people from accidentally using it. Since the function is only used one place, we can make the upgrade script continue to work by just copying the whole text of the function inline into the upgrade.php

Aaron Wells (u-aaronw) on 2014-04-02
Changed in mahara:
importance: Undecided → Low
assignee: nobody → Aaron Wells (u-aaronw)
milestone: none → 1.9.0
status: New → In Progress
Aaron Wells (u-aaronw) wrote :
summary: - Eliminate redundant &obsolete get_mime_type() file
+ Eliminate redundant &obsolete get_mime_type() function

Reviewed: https://reviews.mahara.org/3166
Committed: http://gitorious.org/mahara/mahara/commit/f3021641a24bf49e461d1409c82694d8e2c5f307
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit f3021641a24bf49e461d1409c82694d8e2c5f307
Author: Aaron Wells <email address hidden>
Date: Wed Apr 2 14:32:29 2014 +1300

Get rid of the obsolete and redundant get_mime_type() method

Bug 1301096

Change-Id: I3d3f200da83ca94232c5da46c91211f7634b4a91

Aaron Wells (u-aaronw) on 2014-04-02
Changed in mahara:
status: In Progress → Fix Committed

Reviewed: https://reviews.mahara.org/3191
Committed: http://gitorious.org/mahara/mahara/commit/afdae5c6e08ea6f0a8da9cc7117d8f0ef84e79bc
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.9_STABLE

commit afdae5c6e08ea6f0a8da9cc7117d8f0ef84e79bc
Author: Aaron Wells <email address hidden>
Date: Wed Apr 2 14:32:29 2014 +1300

Get rid of the obsolete and redundant get_mime_type() method

Bug 1301096

Change-Id: I3d3f200da83ca94232c5da46c91211f7634b4a91

Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers