00001 <?php 00002 00016 class SMWAsk { 00017 00025 public static function render( Parser &$parser ) { 00026 global $smwgQEnabled, $smwgIQRunningNumber, $wgTitle; 00027 00028 if ( $smwgQEnabled ) { 00029 $smwgIQRunningNumber++; 00030 00031 $params = func_get_args(); 00032 array_shift( $params ); // We already know the $parser ... 00033 00034 $result = SMWQueryProcessor::getResultFromFunctionParams( $params, SMW_OUTPUT_WIKI ); 00035 } else { 00036 $result = smwfEncodeMessages( array( wfMsgForContent( 'smw_iq_disabled' ) ) ); 00037 } 00038 00039 if ( !is_null( $wgTitle ) && $wgTitle->isSpecialPage() ) { 00040 global $wgOut; 00041 SMWOutputs::commitToOutputPage( $wgOut ); 00042 } 00043 else { 00044 SMWOutputs::commitToParser( $parser ); 00045 } 00046 00047 return $result; 00048 } 00049 00050 }
1.5.6