r76232 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76231‎ | r76232 | r76233 >
Date:05:27, 7 November 2010
Author:bawolff
Status:deferred
Tags:
Comment:
follow-up to r76231 - For some reason I forgot to test before hitting commit and made some stupid typos.
Modified paths:
  • /branches/img_metadata/phase3/docs/hooks.txt (modified) (history)
  • /branches/img_metadata/phase3/includes/media/XMPInfo.php (modified) (history)

Diff [purge]

Index: branches/img_metadata/phase3/docs/hooks.txt
@@ -1899,11 +1899,11 @@
19001900
19011901 'XMPGetInfo': Called when obtaining the list of XMP tags to extract. Can be used to add
19021902 additional tags to extract.
1903 -$items: Array containing information on which items to extract. See XMPInfo for details on the format.
 1903+&$items: Array containing information on which items to extract. See XMPInfo for details on the format.
19041904
19051905 'XMPGetResults': Called just before returning the results array of parsing xmp data. Can be
19061906 used to post-process the results.
1907 -$data: Array of metadata sections (such as $data['xmp-general']) each section is an array of
 1907+&$data: Array of metadata sections (such as $data['xmp-general']) each section is an array of
19081908 metadata tags returned (each tag is either a value, or an array of values).
19091909
19101910 More hooks might be available but undocumented, you can execute
Index: branches/img_metadata/phase3/includes/media/XMPInfo.php
@@ -10,16 +10,16 @@
1111 * @return Array XMP item configuration array.
1212 */
1313 public static function getItems ( ) {
14 - if( !self::ranHooks ) {
 14+ if( !self::$ranHooks ) {
1515 // This is for if someone makes a custom metadata extension.
1616 // For example, a medical wiki might want to decode DICOM xmp properties.
1717 wfRunHooks('XMPGetInfo', Array(&self::$items));
18 - self::ranHooks = true; // Only want to do this once.
 18+ self::$ranHooks = true; // Only want to do this once.
1919 }
2020 return self::$items;
2121 }
2222
23 - static private ranHooks = false;
 23+ static private $ranHooks = false;
2424
2525 /**
2626 * XMPInfo::$items keeps a list of all the items

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76231Misc. things (fix some messages, add hooks, fix extraction for certain weird ...bawolff05:08, 7 November 2010

Status & tagging log