Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086, r11408...
[lhc/web/wiklou.git] / languages / Language.php
index 1bad3fe..854a9f1 100644 (file)
@@ -1909,52 +1909,6 @@ class Language {
                return $this->sprintfDate( $df, $ts );
        }
 
-       /**
-        * Takes a number of seconds and turns it into a text using values such as hours and minutes.
-        *
-        * @since 1.20
-        *
-        * @param integer $seconds The amount of seconds.
-        * @param array $chosenIntervals The intervals to enable.
-        *
-        * @return string
-        */
-       public function formatDuration( $seconds, array $chosenIntervals = array() ) {
-               $intervals = array(
-                       'millennia' => 1000 * 31557600,
-                       'centuries' => 100 * 31557600,
-                       'decades' => 10 * 31557600,
-                       'years' => 31557600, // 86400 * 365.25
-                       'weeks' => 604800,
-                       'days' => 86400,
-                       'hours' => 3600,
-                       'minutes' => 60,
-                       'seconds' => 1,
-               );
-
-               if ( empty( $chosenIntervals ) ) {
-                       $chosenIntervals = array( 'millennia', 'centuries', 'decades', 'years', 'days', 'hours', 'minutes', 'seconds' );
-               }
-
-               $intervals = array_intersect_key( $intervals, array_flip( $chosenIntervals ) );
-               $sortedNames = array_keys( $intervals );
-               $smallestInterval = array_pop( $sortedNames );
-
-               $segments = array();
-
-               foreach ( $intervals as $name => $length ) {
-                       $value = floor( $seconds / $length );
-
-                       if ( $value > 0 || ( $name == $smallestInterval && empty( $segments ) ) ) {
-                               $seconds -= $value * $length;
-                               $message = new Message( 'duration-' . $name, array( $value ) );
-                               $segments[] = $message->inLanguage( $this )->escaped();
-                       }
-               }
-
-               return $this->listToText( $segments );
-       }
-
        /**
         * Internal helper function for userDate(), userTime() and userTimeAndDate()
         *
@@ -3804,7 +3758,7 @@ class Language {
 
        /**
         * Decode an expiry (block, protection, etc) which has come from the DB
-        *
+        * 
         * @FIXME: why are we returnings DBMS-dependent strings???
         *
         * @param $expiry String: Database expiry String