X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fmedia%2FIPTC.php;h=441c515f89c6e06f60b11f3115c82fcc6c70bb71;hp=343adc20882752de26a82c67817362bcc85f99e4;hb=a2c8c2969420a0f150c03f76e3a0bf9028fcda43;hpb=64b83bdb3afd0ee4f8fc1893a865409c198e601e diff --git a/includes/media/IPTC.php b/includes/media/IPTC.php index 343adc2088..441c515f89 100644 --- a/includes/media/IPTC.php +++ b/includes/media/IPTC.php @@ -75,7 +75,7 @@ class IPTC { * Title, person. Not sure if this is best * approach since we no longer have the two fields * separate. each byline title entry corresponds to a - * specific byline. */ + * specific byline. */ $bylines = self::convIPTC( $val, $c ); if ( isset( $parsed['2#085'] ) ) { @@ -353,20 +353,20 @@ class IPTC { * @todo Potentially this should also capture the timezone offset. * @param array $date The date tag * @param array $time The time tag - * @param string $c The charset + * @param string $charset * @return string Date in EXIF format. */ - private static function timeHelper( $date, $time, $c ) { + private static function timeHelper( $date, $time, $charset ) { if ( count( $date ) === 1 ) { // the standard says this should always be 1 // just double checking. - list( $date ) = self::convIPTC( $date, $c ); + list( $date ) = self::convIPTC( $date, $charset ); } else { return null; } if ( count( $time ) === 1 ) { - list( $time ) = self::convIPTC( $time, $c ); + list( $time ) = self::convIPTC( $time, $charset ); $dateOnly = false; } else { $time = '000000+0000'; // placeholder @@ -420,7 +420,7 @@ class IPTC { /** * Helper function to convert charset for iptc values. * @param string|array $data The iptc string - * @param string $charset The charset + * @param string $charset * * @return string|array */ @@ -439,15 +439,15 @@ class IPTC { /** * Helper function of a helper function to convert charset for iptc values. * @param string|array $data The IPTC string - * @param string $charset The charset + * @param string $charset * * @return string */ private static function convIPTCHelper( $data, $charset ) { if ( $charset ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $data = iconv( $charset, "UTF-8//IGNORE", $data ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( $data === false ) { $data = ""; wfDebugLog( 'iptc', __METHOD__ . " Error converting iptc data charset $charset to utf-8" );