Index: trunk/tools/code-utils/check-vars.php |
— | — | @@ -880,7 +880,17 @@ |
881 | 881 | '$dbw' => 'DatabaseBase', '$dbr' => 'DatabaseBase', |
882 | 882 | '$sk' => 'Skin', |
883 | 883 | '$wgMemc' => 'MWMemcached', |
| 884 | + '$thumb' => 'MediaTransformOutput', |
| 885 | + '$title' => 'Title', '$titleObj' => 'Title', '$desiredTitleObj' => 'Title', |
| 886 | + '$article' => 'Article', '$articleObj' => 'Article', |
| 887 | + '$rev' => 'Revision', '$revision' => 'Revision', |
| 888 | + '$undoRev' => 'Revision', '$undoafterRev' => 'Revision', |
| 889 | + '$msg' => 'Message', |
| 890 | + '$stash' => 'UploadStash', |
884 | 891 | ); |
| 892 | + static $wellKnownMembers = array( |
| 893 | + 'db' => 'DatabaseBase', 'dbw' => 'DatabaseBase', |
| 894 | + ); |
885 | 895 | |
886 | 896 | if ( $token[0] == T_VARIABLE ) { |
887 | 897 | if ( isset( $wellKnownVars[ $token[1] ] ) ) { |
— | — | @@ -901,7 +911,9 @@ |
902 | 912 | |
903 | 913 | $name = $token[1]; |
904 | 914 | |
905 | | - if ( $token[1][0] == 'm' ) // member |
| 915 | + if ( isset( $wellKnownMembers[$name] ) ) |
| 916 | + $name = $wellKnownMembers[$name]; |
| 917 | + elseif ( $token[1][0] == 'm' ) // member |
906 | 918 | $name = substr( $token[1], 1 ); |
907 | 919 | } else { |
908 | 920 | return null; |