r94127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94126‎ | r94127 | r94128 >
Date:17:07, 9 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
style fix (variable names), follow-up: r94100
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -30,7 +30,7 @@
3131 *
3232 * @var mixed SMWQUeryUI::ENABLE_AUTO_SUGGEST | SMWQUeryUI::DISABLE_AUTO_SUGGEST
3333 */
34 - private $autocompleteenabled = false;
 34+ private $autoCompleteEnabled = false;
3535
3636 const ENABLE_AUTO_SUGGEST = true;
3737 const DISABLE_AUTO_SUGGEST = false;
@@ -143,8 +143,8 @@
144144 protected function enableJQuery() {
145145 global $wgOut, $smwgJQueryIncluded;
146146 if ( !$smwgJQueryIncluded ) {
147 - $realFunction = array( 'OutputPage', 'includeJQuery' );
148 - if ( is_callable( $realFunction ) ) {
 147+ $real_function = array( 'OutputPage', 'includeJQuery' );
 148+ if ( is_callable( $real_function ) ) {
149149 $wgOut->includeJQuery();
150150 } else {
151151 $wgOut->addScriptFile( "$smwgScriptPath/libs/jquery-1.4.2.min.js" );
@@ -188,7 +188,7 @@
189189 */
190190 protected function addAutocompletionJavascriptAndCSS() {
191191 global $wgOut;
192 - if ( $this->autocompleteenabled == false ) {
 192+ if ( $this->autoCompleteEnabled == false ) {
193193 $this->enableJQueryUI();
194194 $javascript_autocomplete_text = <<<END
195195 <script type="text/javascript">
@@ -236,7 +236,7 @@
237237 END;
238238
239239 $wgOut->addScript( $javascript_autocomplete_text );
240 - $this->autocompleteenabled = true;
 240+ $this->autoCompleteEnabled = true;
241241 }
242242 }
243243
@@ -250,13 +250,13 @@
251251 * @global int $smwgQMaxInlineLimit
252252 * @param int $limit
253253 * @param int $offset
254 - * @param boolean $has_further_results
 254+ * @param boolean $hasFurtherResults
255255 *
256256 * @return string
257257 */
258 - public function getNavigationBar( $limit, $offset, $has_further_results ) {
 258+ public function getNavigationBar( $limit, $offset, $hasFurtherResults ) {
259259 global $smwgQMaxInlineLimit;
260 - $urltail = $this->getUrlTail();
 260+ $url_tail = $this->getUrlTail();
261261 // Prepare navigation bar.
262262 if ( $offset > 0 ) {
263263 $navigation = Html::element(
@@ -264,7 +264,7 @@
265265 array(
266266 'href' => $this->getTitle()->getLocalURL(
267267 'offset=' . max( 0, $offset - $limit ) .
268 - '&limit=' . $limit . $urltail
 268+ '&limit=' . $limit . $url_tail
269269 ),
270270 'rel' => 'nofollow'
271271 ),
@@ -282,13 +282,13 @@
283283 ( $offset + $this->uiCore->getResultCount() ) .
284284 '</b>&#160;&#160;&#160;&#160;';
285285
286 - if ( $has_further_results ) {
 286+ if ( $hasFurtherResults ) {
287287 $navigation .= Html::element(
288288 'a',
289289 array(
290290 'href' => $this->getTitle()->getLocalURL(
291291 'offset=' . ( $offset + $limit ) .
292 - '&limit=' . $limit . $urltail
 292+ '&limit=' . $limit . $url_tail
293293 ),
294294 'rel' => 'nofollow'
295295 ),
@@ -316,7 +316,7 @@
317317 array(
318318 'href' => $this->getTitle()->getLocalURL(
319319 'offset=' . $offset .
320 - '&limit=' . $l . $urltail
 320+ '&limit=' . $l . $url_tail
321321 ),
322322 'rel' => 'nofollow'
323323 ),
@@ -821,7 +821,7 @@
822822 */
823823 protected function processPOFormBox( WebRequest $wgRequest ) {
824824 $postring = $wgRequest->getText( 'po' );
825 - $poarray = array();
 825+ $po_array = array();
826826
827827 if ( $postring != '' ) { // parameters from HTML input fields
828828 $ps = explode( "\n", $postring ); // params separated by newlines here (compatible with text-input for printouts)
@@ -833,11 +833,11 @@
834834 $param = '?' . $param;
835835 }
836836
837 - $poarray[] = $param;
 837+ $po_array[] = $param;
838838 }
839839 }
840840
841 - return $poarray;
 841+ return $po_array;
842842 }
843843
844844 /**
@@ -848,7 +848,7 @@
849849 * @return string An url-encoded string.
850850 */
851851 protected function getUrlTail() {
852 - $urltail = '&q=' . urlencode( $this->uiCore->getQuerystring() );
 852+ $url_tail = '&q=' . urlencode( $this->uiCore->getQuerystring() );
853853
854854 $tmp_parray = array();
855855 $params = $this->uiCore->getParameters();
@@ -857,24 +857,24 @@
858858 $tmp_parray[$key] = $value;
859859 }
860860 }
861 - $urltail .= '&p=' . urlencode( SMWInfolink::encodeParameters( $tmp_parray ) );
 861+ $url_tail .= '&p=' . urlencode( SMWInfolink::encodeParameters( $tmp_parray ) );
862862
863 - $printoutstring = '';
 863+ $print_out_string = '';
864864 foreach ( $this->uiCore->getPrintOuts() as $printout ) {
865 - $printoutstring .= $printout->getSerialisation() . "\n";
 865+ $print_out_string .= $printout->getSerialisation() . "\n";
866866 }
867867
868 - if ( $printoutstring != '' ) {
869 - $urltail .= '&po=' . urlencode( $printoutstring );
 868+ if ( $print_out_string != '' ) {
 869+ $url_tail .= '&po=' . urlencode( $print_out_string );
870870 }
871871 if ( array_key_exists( 'sort', $params ) ) {
872 - $urltail .= '&sort=' . $params['sort'];
 872+ $url_tail .= '&sort=' . $params['sort'];
873873 }
874874 if ( array_key_exists( 'order', $params ) ) {
875 - $urltail .= '&order=' . $params['order'];
 875+ $url_tail .= '&order=' . $params['order'];
876876 }
877877
878 - return $urltail;
 878+ return $url_tail;
879879 }
880880
881881 /**
@@ -883,62 +883,62 @@
884884 *
885885 * @param string $format
886886 * @param array $paramValues The current values for the parameters (name => value)
887 - * @param array $ignoredattribs Attributes which should not be generated by this method.
 887+ * @param array $ignoredAttribs Attributes which should not be generated by this method.
888888 *
889889 * @return string
890890 */
891 - protected function showFormatOptions( $format, array $paramValues, $ignoredattribs = array() ) {
 891+ protected function showFormatOptions( $format, array $paramValues, array $ignoredAttribs = array() ) {
892892 $printer = SMWQueryProcessor::getResultPrinter( $format, SMWQueryProcessor::SPECIAL_PAGE );
893893
894894 $params = method_exists( $printer, 'getValidatorParameters' ) ? $printer->getValidatorParameters() : array();
895895
896 - $optionsHtml = array();
 896+ $options_html = array();
897897
898898 foreach ( $params as $param ) {
899899 // Ignore the parameters for which we have a special control in the GUI already.
900 - if ( in_array( $param->getName(), $ignoredattribs ) ) {
 900+ if ( in_array( $param->getName(), $ignoredAttribs ) ) {
901901 continue;
902902 }
903903
904 - $currentValue = array_key_exists( $param->getName(), $paramValues ) ? $paramValues[$param->getName()] : false;
 904+ $current_value = array_key_exists( $param->getName(), $paramValues ) ? $paramValues[$param->getName()] : false;
905905
906 - $optionsHtml[] =
 906+ $options_html[] =
907907 Html::rawElement(
908908 'div',
909909 array(
910910 'style' => 'width: 30%; padding: 5px; float: left;'
911911 ),
912912 '<label for="p[' . htmlspecialchars( $param->getName() ) . ']">' . htmlspecialchars( $param->getName() ) . ': </label>' .
913 - $this->showFormatOption( $param, $currentValue ) .
 913+ $this->showFormatOption( $param, $current_value ) .
914914 '<br />' .
915915 Html::element( 'em', array(), $param->getDescription() )
916916 );
917917 }
918918
919 - for ( $i = 0, $n = count( $optionsHtml ); $i < $n; $i++ ) {
 919+ for ( $i = 0, $n = count( $options_html ); $i < $n; $i++ ) {
920920 if ( $i % 3 == 2 || $i == $n - 1 ) {
921 - $optionsHtml[$i] .= "<div style=\"clear: both\";></div>\n";
 921+ $options_html[$i] .= "<div style=\"clear: both\";></div>\n";
922922 }
923923 }
924924
925925 $i = 0;
926 - $rowHtml = '';
927 - $resultHtml = '';
 926+ $row_html = '';
 927+ $result_html = '';
928928 $flip_style = true;
929929 $flip_count = 0;
930 - while ( $option = array_shift( $optionsHtml ) ) {
931 - $rowHtml .= $option;
 930+ while ( $option = array_shift( $options_html ) ) {
 931+ $row_html .= $option;
932932 $i++;
933933
934 - $resultHtml .= Html::rawElement(
 934+ $result_html .= Html::rawElement(
935935 'div',
936936 array(
937937 'style' => 'background: ' . ( $flip_style ? 'white' : '#dddddd' ) . ';'
938938 ),
939 - $rowHtml
 939+ $row_html
940940 );
941941
942 - $rowHtml = '';
 942+ $row_html = '';
943943 $flip_count++;
944944 if ( $flip_count == 3 ) {
945945 $flip_style = !$flip_style;
@@ -947,7 +947,7 @@
948948
949949 }
950950
951 - return $resultHtml;
 951+ return $result_html;
952952 }
953953
954954
@@ -1108,9 +1108,9 @@
11091109 */
11101110 public function getPOStrings() {
11111111 $string = '';
1112 - $printouts = $this->uiCore->getPrintOuts();
1113 - if ( !empty( $printouts ) ) {
1114 - foreach ( $printouts as $value ) {
 1112+ $print_outs = $this->uiCore->getPrintOuts();
 1113+ if ( !empty( $print_outs ) ) {
 1114+ foreach ( $print_outs as $value ) {
11151115 $string .= $value->getSerialisation() . "\n";
11161116 }
11171117 }
@@ -1331,18 +1331,18 @@
13321332 * Sets up a query. If validation is enabled, then the query string is
13331333 * checked for errors.
13341334 *
1335 - * @param string $query_string The query
 1335+ * @param string $queryString The query
13361336 * @return array array of errors, if any.
13371337 */
1338 - public function setQueryString( $query_string = "", $enable_validation = false ) {
1339 - $this -> queryString = $query_string;
 1338+ public function setQueryString( $queryString = "", $enableValidation = false ) {
 1339+ $this -> queryString = $queryString;
13401340
13411341 $errors = array();
1342 - if ( $enable_validation ) {
1343 - if ( $query_string == '' ) {
 1342+ if ( $enableValidation ) {
 1343+ if ( $queryString == '' ) {
13441344 $errors[] = wfMsg( 'smw_qui_noquery' );
13451345 } else {
1346 - $query = SMWQueryProcessor::createQuery( $query_string, array() );
 1346+ $query = SMWQueryProcessor::createQuery( $queryString, array() );
13471347 $errors = $query ->getErrors();
13481348 }
13491349 if ( !empty ( $errors ) ) {
@@ -1365,16 +1365,16 @@
13661366 * each property) is returned. Returns an empty array otherwise.
13671367 *
13681368 * @param array $print_outs Array of strings
1369 - * @param boolean $enable_validation
 1369+ * @param boolean $enableValidation
13701370 * @return array Array of errors messages (strings), if any.
13711371 */
1372 - public function setPrintOuts( array $print_outs = array(), $enable_validation = false ) {
 1372+ public function setPrintOuts( array $print_outs = array(), $enableValidation = false ) {
13731373 /*
13741374 * Note: property validation is not very clearly defined yet, so validation is disabled by default
13751375 */
13761376
13771377 $errors = array();
1378 - if ( $enable_validation ) {
 1378+ if ( $enableValidation ) {
13791379 foreach ( $print_outs as $key => $prop ) {
13801380 if ( $prop[0] != '?' ) {
13811381 $print_outs[$key] = "?" . $print_outs[$key];
@@ -1404,10 +1404,10 @@
14051405 * @global int $smwgQMaxInlineLimit
14061406 * @global array $smwgResultFormats
14071407 * @param array $params
1408 - * @param boolean $enable_validation
 1408+ * @param boolean $enableValidation
14091409 * @return array of strings
14101410 */
1411 - public function setParams( array $params = array(), $enable_validation = false ) {
 1411+ public function setParams( array $params = array(), $enableValidation = false ) {
14121412 global $smwgQMaxInlineLimit, $smwgResultFormats;
14131413 $errors = array();
14141414
@@ -1423,7 +1423,7 @@
14241424 $params['offset'] = 0;
14251425 }
14261426
1427 - if ( $enable_validation ) { // validating the format
 1427+ if ( $enableValidation ) { // validating the format
14281428 if ( !array_key_exists( $params['format'], $smwgResultFormats ) ) {
14291429 $errors[] = wfMsg( 'smw_qui_invalidformat', $params['format'] );
14301430 $this->errorsOccured = true;
@@ -1457,15 +1457,15 @@
14581458 public function extractParameters( $p ) {
14591459 if ( $this->context == self::SPECIAL_PAGE ) {
14601460 // assume setParams(), setPintouts and setQueryString have been called
1461 - $rawparams = array_merge( $this->parameters, array( $this->queryString ), $this->printOutStrings );
 1461+ $raw_params = array_merge( $this->parameters, array( $this->queryString ), $this->printOutStrings );
14621462 } else {// context is WIKI_LINK
1463 - $rawparams = SMWInfolink::decodeParameters( $p, true );
 1463+ $raw_params = SMWInfolink::decodeParameters( $p, true );
14641464 // calling setParams to fill in missing parameters
1465 - $this->setParams( $rawparams );
1466 - $rawparams = $this->parameters;
 1465+ $this->setParams( $raw_params );
 1466+ $raw_params = $this->parameters;
14671467 }
14681468
1469 - SMWQueryProcessor::processFunctionParams( $rawparams, $this->queryString, $this->parameters, $this->printOuts );
 1469+ SMWQueryProcessor::processFunctionParams( $raw_params, $this->queryString, $this->parameters, $this->printOuts );
14701470 }
14711471
14721472 /**
@@ -1493,28 +1493,28 @@
14941494
14951495 // BEGIN: Try to be smart for rss/ical if no description/title is given and we have a concept query
14961496 if ( $this->parameters['format'] == 'rss' ) {
1497 - $desckey = 'rssdescription';
 1497+ $desc_key = 'rssdescription';
14981498 $titlekey = 'rsstitle';
14991499 } elseif ( $this->parameters['format'] == 'icalendar' ) {
1500 - $desckey = 'icalendardescription';
 1500+ $desc_key = 'icalendardescription';
15011501 $titlekey = 'icalendartitle';
15021502 } else {
1503 - $desckey = false;
 1503+ $desc_key = false;
15041504 }
15051505
1506 - if ( $desckey && ( $query->getDescription() instanceof SMWConceptDescription ) &&
1507 - ( !isset( $this->parameters[$desckey] ) || !isset( $this->parameters[$titlekey] ) ) ) {
 1506+ if ( $desc_key && ( $query->getDescription() instanceof SMWConceptDescription ) &&
 1507+ ( !isset( $this->parameters[$desc_key] ) || !isset( $this->parameters[$titlekey] ) ) ) {
15081508 $concept = $query->getDescription()->getConcept();
15091509
15101510 if ( !isset( $this->parameters[$titlekey] ) ) {
15111511 $this->parameters[$titlekey] = $concept->getText();
15121512 }
15131513
1514 - if ( !isset( $this->parameters[$desckey] ) ) {
 1514+ if ( !isset( $this->parameters[$desc_key] ) ) {
15151515 // / @bug The current SMWStore will never return SMWConceptValue (an SMWDataValue) here; it might return SMWDIConcept (an SMWDataItem)
15161516 $dv = end( smwfGetStore()->getPropertyValues( SMWWikiPageValue::makePageFromTitle( $concept ), new SMWDIProperty( '_CONC' ) ) );
15171517 if ( $dv instanceof SMWConceptValue ) {
1518 - $this->parameters[$desckey] = $dv->getDocu();
 1518+ $this->parameters[$desc_key] = $dv->getDocu();
15191519 }
15201520 }
15211521 }
@@ -1625,12 +1625,12 @@
16261626 * from hasError() and getErrors().
16271627 *
16281628 * @param string $p parameters of the query.
1629 - * @param boolean $enable_validation
 1629+ * @param boolean $enableValidation
16301630 * @return SMWQueryUIHelper
16311631 *
16321632 * @todo Handle validation for infolink parameters
16331633 */
1634 - public static function makeForInfoLink( $p, $enable_validation = false ) {
 1634+ public static function makeForInfoLink( $p, $enableValidation = false ) {
16351635 $result = new SMWQueryUIHelper( self::WIKI_LINK );
16361636 $result->extractParameters( $p );
16371637 $result->execute();
@@ -1650,15 +1650,15 @@
16511651 * @param string $query
16521652 * @param array $params of key=>value pairs
16531653 * @param array $printouts array of '?property' strings
1654 - * @param boolean $enable_validation
 1654+ * @param boolean $enableValidation
16551655 * @return SMWQueryUIHelper
16561656 *
16571657 */
1658 - public static function makeForUI( $query, array $params, array $printouts, $enable_validation = false ) {
 1658+ public static function makeForUI( $query, array $params, array $printouts, $enableValidation = false ) {
16591659 $result = new SMWQueryUIHelper( self::SPECIAL_PAGE );
1660 - $result->setParams( $params, $enable_validation );
1661 - $result->setPrintOuts( $printouts, $enable_validation );
1662 - $result->setQueryString( $query, $enable_validation );
 1660+ $result->setParams( $params, $enableValidation );
 1661+ $result->setPrintOuts( $printouts, $enableValidation );
 1662+ $result->setQueryString( $query, $enableValidation );
16631663 $result->extractParameters( '' );
16641664 // $result->execute();
16651665 return $result;
@@ -1676,9 +1676,9 @@
16771677 * SMWStore. We hence we check if $property has a corresponding page describing it.
16781678 */
16791679 $prop = substr( $property, 1 ); // removing the leading '?' while checking.
1680 - $propertypage = Title::newFromText( $prop, SMW_NS_PROPERTY );
1681 - if ( $propertypage instanceof Title ) {
1682 - return( $propertypage->exists() );
 1680+ $property_page = Title::newFromText( $prop, SMW_NS_PROPERTY );
 1681+ if ( $property_page instanceof Title ) {
 1682+ return( $property_page->exists() );
16831683 } else {
16841684 return false;
16851685 }
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php
@@ -34,19 +34,19 @@
3535 */
3636 protected function makePage( $p ) {
3737 global $wgOut;
38 - $htmloutput = $this->makeResults( $p );
 38+ $html_output = $this->makeResults( $p );
3939 if ( $this->uiCore->getQueryString() != "" ) {
4040 if ( $this->usesNavigationBar() ) {
41 - $htmloutput .= $this->getNavigationBar ( $this->uiCore->getLimit(), $this->uiCore->getOffset(), $this->uiCore->hasFurtherResults() ); // ? can we preload offset and limit?
 41+ $html_output .= $this->getNavigationBar ( $this->uiCore->getLimit(), $this->uiCore->getOffset(), $this->uiCore->hasFurtherResults() ); // ? can we preload offset and limit?
4242 }
4343
44 - $htmloutput .= "<br/>" . $this->uiCore->getHTMLResult() . "<br>";
 44+ $html_output .= "<br/>" . $this->uiCore->getHTMLResult() . "<br>";
4545
4646 if ( $this->usesNavigationBar() ) {
47 - $htmloutput .= $this->getNavigationBar ( $this->uiCore->getLimit(), $this->uiCore->getOffset(), $this->uiCore->hasFurtherResults() ); // ? can we preload offset and limit?
 47+ $html_output .= $this->getNavigationBar ( $this->uiCore->getLimit(), $this->uiCore->getOffset(), $this->uiCore->hasFurtherResults() ); // ? can we preload offset and limit?
4848 }
4949 }
50 - $wgOut->addHTML( $htmloutput );
 50+ $wgOut->addHTML( $html_output );
5151 }
5252
5353 /**
@@ -55,13 +55,13 @@
5656 *
5757 * @param string $format
5858 * @param array $paramValues The current values for the parameters (name => value)
59 - * @param array $ignoredattribs Attributes which should not be generated by this method.
 59+ * @param array $ignoredAttribs Attributes which should not be generated by this method.
6060 *
6161 * @return string
6262 *
6363 * Overridden from parent to ignore GUI parameters 'format' 'limit' and 'offset'
6464 */
65 - protected function showFormatOptions( $format, array $paramValues, $ignoredattribs = array() ) {
 65+ protected function showFormatOptions( $format, array $paramValues, array $ignoredAttribs = array() ) {
6666 return parent::showFormatOptions( $format, $paramValues, array( 'format', 'limit', 'offset' ) );
6767 }
6868 /**
@@ -73,10 +73,10 @@
7474 protected function makeResults() {
7575 global $wgOut;
7676 $result = "";
77 - $spectitle = $this->getTitle();
78 - $formatBox = $this->getFormatSelectBoxSep( 'broadtable' );
79 - $result .= '<form name="ask" action="' . $spectitle->escapeLocalURL() . '" method="get">' . "\n" .
80 - '<input type="hidden" name="title" value="' . $spectitle->getPrefixedText() . '"/>';
 77+ $spec_title = $this->getTitle();
 78+ $format_box = $this->getFormatSelectBoxSep( 'broadtable' );
 79+ $result .= '<form name="ask" action="' . $spec_title->escapeLocalURL() . '" method="get">' . "\n" .
 80+ '<input type="hidden" name="title" value="' . $spec_title->getPrefixedText() . '"/>';
8181 $result .= '<br>';
8282 $result .= wfMsg( 'smw_qc_query_help' );
8383 // Main query and format options
@@ -84,7 +84,7 @@
8585 '<tr><th>' . wfMsg( 'smw_ask_queryhead' ) . "</th>\n<th>" . wfMsg( 'smw_ask_format_as' ) . "</th></tr>" .
8686 '<tr>' .
8787 '<td style="width: 70%; padding-right: 7px;">' . $this->getQueryFormBox() . "</td>\n" .
88 - '<td style="padding-right: 7px; text-align:center;">' . $formatBox[0] . '</td>' .
 88+ '<td style="padding-right: 7px; text-align:center;">' . $format_box[0] . '</td>' .
8989 '</tr>' .
9090 "</table>\n";
9191 // sorting and prinouts
@@ -104,7 +104,7 @@
105105 // additional options
106106 $result .= '<div id="additional_options" style="display:none">';
107107
108 - $result .= $formatBox[1]; // display the format options
 108+ $result .= $format_box[1]; // display the format options
109109
110110 if ( $this->uiCore->getQueryString() != '' ) // hide #ask if there isnt any query defined
111111 $result .= $this->getAskEmbedBox();
@@ -324,7 +324,7 @@
325325 // END: create form elements already submitted earlier via form
326326
327327 // create hidden form elements to be cloned later
328 - $hiddenproperty = Html::openElement( 'div', array( 'id' => 'property_starter', 'class' => 'smw-sort', 'style' => 'display:none' ) ) .
 328+ $hidden_property = Html::openElement( 'div', array( 'id' => 'property_starter', 'class' => 'smw-sort', 'style' => 'display:none' ) ) .
329329 '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' .
330330 wfMsg( 'smw_qui_property' ) .
331331 Xml::input( "property_num", '35' ) . " " .
@@ -335,18 +335,18 @@
336336 Xml::closeElement( 'select' ) .
337337 Xml::checkLabel( wfMsg( 'smw_qui_shownresults' ), "display_num", '', true ) .
338338 Xml::closeElement( 'div' );
339 - $hiddenproperty = json_encode( $hiddenproperty );
 339+ $hidden_property = json_encode( $hidden_property );
340340
341 - $hiddencategory = Html::openElement( 'div', array( 'id' => 'category_starter', 'class' => 'smw-sort', 'style' => 'display:none' ) ) .
 341+ $hidden_category = Html::openElement( 'div', array( 'id' => 'category_starter', 'class' => 'smw-sort', 'style' => 'display:none' ) ) .
342342 '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' .
343343 'Category (optional)' . // todo: i18n
344344 Xml::input( "category_num", '20' ) . " " .
345345 'Label' . // todo: i18n
346346 Xml::input( "cat_label_num", '20' ) . " " .
347347 Xml::closeElement( 'div' );
348 - $hiddencategory = json_encode( $hiddencategory );
 348+ $hidden_category = json_encode( $hidden_category );
349349
350 - $propertydialogbox = Xml::openElement( 'div', array( 'id' => 'prop-dialog', 'title' => 'Property Options', 'class' => 'smw-prop-dialog' ) ) . // todo i18n
 350+ $property_dialog_box = Xml::openElement( 'div', array( 'id' => 'prop-dialog', 'title' => 'Property Options', 'class' => 'smw-prop-dialog' ) ) . // todo i18n
351351 Xml::inputLabel( 'Property:', '', 'd-property', 'd-property' ) . '<br/>' . // todo i18n
352352 Xml::inputLabel( 'Label:', '', 'd-property-label', 'd-property-label' ) . '<br/>' . // todo i18n
353353 'Format: ' . Html::openElement( 'select', array( 'name' => 'd-format', 'id' => 'd-format' ) ) . // todo i18n
@@ -357,7 +357,7 @@
358358 // Xml::inputLabel( 'Limit:', 'd-property-limit', 'd-property-limit' ) . '<br/>' . // todo i18n
359359 '<input type="hidden" name="d-property-code" id="d-property-code">' .
360360 Xml::closeElement( 'div' );
361 - $categorydialogbox = Xml::openElement( 'div', array( 'id' => 'cat-dialog', 'title' => 'Category Options', 'class' => 'smw-cat-dialog' ) ) . // todo i18n
 361+ $category_dialog_box = Xml::openElement( 'div', array( 'id' => 'cat-dialog', 'title' => 'Category Options', 'class' => 'smw-cat-dialog' ) ) . // todo i18n
362362 Xml::inputLabel( 'Category:', '', 'd-category', 'd-category' ) . '<br/>' . // todo i18n
363363 Xml::inputLabel( 'Label:', '', 'd-category-label', 'd-category-label' ) . '<br/>' . // todo i18n
364364 Xml::inputLabel( 'Yes:', '', 'd-category-yes', 'd-category-yes' ) . '<br/>' . // todo i18n
@@ -540,10 +540,10 @@
541541 }
542542
543543 jQuery(function(){
544 - jQuery('$hiddenproperty').appendTo(document.body);
545 - jQuery('$hiddencategory').appendTo(document.body);
546 - jQuery('$propertydialogbox').appendTo(document.body);
547 - jQuery('$categorydialogbox').appendTo(document.body);
 544+ jQuery('$hidden_property').appendTo(document.body);
 545+ jQuery('$hidden_category').appendTo(document.body);
 546+ jQuery('$property_dialog_box').appendTo(document.body);
 547+ jQuery('$category_dialog_box').appendTo(document.body);
548548 jQuery('#cat-dialog').dialog({
549549 autoOpen: false,
550550 modal: true,

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94100improved: hiding format controls, minor JS cleanupdevayon08:08, 9 August 2011