(Follow-up r86169) Fix three minor issues Reedy found.

* Some strings were using double quotes needed the dollar sign escaped.
  (the strings had to do with detecting obscure text encodings for IPTC)
* FormatMetadata::collapseContactInfo should be static (for some reason I never got any E_STRICT on this. I think the api suppresses E_STRICT somehow...)
* Exif::get/makeFormattedMetadata method (which appears to no longer be used, and
  never was used, but kept in for compatability just in case) called
  another function without required argument. Also got changed from public
  to private somehow (which is generally a bad idea, especially when its only
  reason for being there is to preserve back-compat). Marked these functions
  as deprecated while I'm at it since they really should not be used.
This commit is contained in:
Brian Wolff 2011-04-16 02:19:05 +00:00
parent 6a2eb4ff90
commit e596cfcf78
3 changed files with 10 additions and 7 deletions

View file

@ -507,8 +507,10 @@ class Exif {
* Use FormatMetadata to create formatted values for display to user
* (is this ever used?)
*/
private function makeFormattedData( ) {
$this->mFormattedExifData = FormatMetadata::getFormattedData();
function makeFormattedData( ) {
wfDeprecated( __METHOD__ );
$this->mFormattedExifData = FormatMetadata::getFormattedData(
$this->mFilteredExifData );
}
/**#@-*/
@ -536,6 +538,7 @@ class Exif {
* Its unclear if this is ever used.
*/
function getFormattedData() {
wfDeprecated( __METHOD__ );
if (!$this->mFormattedExifData) {
$this->makeFormattedData();
}

View file

@ -1222,7 +1222,7 @@ class FormatMetadata {
*
* @return String of html-ish looking wikitext
*/
public function collapseContactInfo( $vals ) {
public static function collapseContactInfo( $vals ) {
if( ! ( isset( $vals['CiAdrExtadr'] )
|| isset( $vals['CiAdrCity'] )
|| isset( $vals['CiAdrCtry'] )

View file

@ -525,10 +525,10 @@ class IPTC {
case "\x1b(x":
$c = "CSA_Z243.4-1985-2";
break;
case "\x1b$(B":
case "\x1b$B":
case "\x1b&@\x1b$B":
case "\x1b&@\x1b$(B":
case "\x1b\$(B":
case "\x1b\$B":
case "\x1b&@\x1b\$B":
case "\x1b&@\x1b\$(B":
$c = "JIS_C6226-1983";
break;
case "\x1b-A": // iso-8859-1. at least for the high code characters.