Add a hidden stub Special:Search to hand search requests to; this fixes
[lhc/web/wiklou.git] / includes / SkinPHPTal.php
index 1f29302..cddc753 100644 (file)
@@ -64,7 +64,7 @@
                        global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
                        global $wgScript, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage;
                        global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
-                       global $wgDisableCounters, $wgLogo, $action;
+                       global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses;
                        
                        extract( $wgRequest->getValues( 'oldid', 'diff' ) );
 
@@ -84,7 +84,7 @@
                        #}
 
                        $tpl->setRef( "title", &$this->titletxt ); // ?
-                       if(!empty($action) {
+                       if(!empty($action)) {
                                $taction =  $this->getPageTitleActionText();
                                $taction = !empty($taction)?' - '.$taction:'';
                        } else { $taction = ''; }
                        $tpl->setRef( "thispage", &$this->thispage );
                        $tpl->set( "subtitle", $out->getSubtitle() );
                        $tpl->set( 'catlinks', getCategories());
+                       if( $wgOut->isSyndicated() ) {
+                               $feeds = array();
+                               foreach( $wgFeedClasses as $format => $class ) {
+                                       $feeds[$format] = array(
+                                               'text' => $format,
+                                               'href' => $wgRequest->appendQuery( "feed=$format" ),
+                                               'ttip' => wfMsg('tooltip-'.$format)
+                                       );
+                               }
+                               $tpl->setRef( 'feeds', &$feeds );
+                       }
                        $tpl->setRef( 'mimetype', &$wgMimeType );
                        $tpl->setRef( 'charset', &$wgOutputEncoding );
                        $tpl->set( 'headlinks', $out->getHeadLinks() );
                        $tpl->set( "helppage", wfMsg('helppage'));
                        $tpl->set( "sysop", $wgUser->isSysop() );
                        */
-                       $tpl->setRef( "searchaction", &$wgScript );
+                       $tpl->set( "searchaction", $this->escapeSearchLink() );
                        $tpl->setRef( "stylepath", &$wgStyleSheetPath );
                        $tpl->setRef( "logopath", &$wgLogo );
                        $tpl->setRef( "lang", &$wgLanguageCode );
                                        return wfMsg('watch');
                                case 'unwatch':
                                        return wfMsg('unwatch');
+                               case 'submit':
+                                       return wfMsg('preview');
                                default:
                                        return '';
                        }