Merge "Rebuilt PHPVersionCheck to be an own class"
[lhc/web/wiklou.git] / includes / skins / BaseTemplate.php
index 71ca57b..65eb9b7 100644 (file)
@@ -29,10 +29,11 @@ abstract class BaseTemplate extends QuickTemplate {
         * Get a Message object with its context set
         *
         * @param string $name Message name
+        * @param ... $params Message params
         * @return Message
         */
-       public function getMsg( $name ) {
-               return $this->getSkin()->msg( $name );
+       public function getMsg( $name /* ... */ ) {
+               return call_user_func_array( [ $this->getSkin(), 'msg' ], func_get_args() );
        }
 
        function msg( $str ) {
@@ -55,7 +56,6 @@ abstract class BaseTemplate extends QuickTemplate {
         * @return array
         */
        function getToolbox() {
-
                $toolbox = [];
                if ( isset( $this->data['nav_urls']['whatlinkshere'] )
                        && $this->data['nav_urls']['whatlinkshere']
@@ -69,6 +69,7 @@ abstract class BaseTemplate extends QuickTemplate {
                        $toolbox['recentchangeslinked'] = $this->data['nav_urls']['recentchangeslinked'];
                        $toolbox['recentchangeslinked']['msg'] = 'recentchangeslinked-toolbox';
                        $toolbox['recentchangeslinked']['id'] = 't-recentchangeslinked';
+                       $toolbox['recentchangeslinked']['rel'] = 'nofollow';
                }
                if ( isset( $this->data['feeds'] ) && $this->data['feeds'] ) {
                        $toolbox['feeds']['id'] = 'feedlinks';
@@ -288,7 +289,6 @@ abstract class BaseTemplate extends QuickTemplate {
                if ( $content !== '' ) {
                        echo "<div class='after-portlet after-portlet-$name'>$content</div>";
                }
-
        }
 
        /**
@@ -320,10 +320,10 @@ abstract class BaseTemplate extends QuickTemplate {
         *
         * If a "data" key is present, it must be an array, where the keys represent
         * the data-xxx properties with their provided values. For example,
-        *  $item['data'] = array(
+        *  $item['data'] = [
         *       'foo' => 1,
         *       'bar' => 'baz',
-        *  );
+        *  ];
         * will render as element properties:
         *  data-foo='1' data-bar='baz'
         *
@@ -333,7 +333,7 @@ abstract class BaseTemplate extends QuickTemplate {
         *   a link in. This should be an array of arrays containing a 'tag' and
         *   optionally an 'attributes' key. If you only have one element you don't
         *   need to wrap it in another array. eg: To use <a><span>...</span></a>
-        *   in all links use array( 'text-wrapper' => array( 'tag' => 'span' ) )
+        *   in all links use [ 'text-wrapper' => [ 'tag' => 'span' ] ]
         *   for your options.
         *   - 'link-class' key can be used to specify additional classes to apply
         *   to all links.