2 #include <cpp/base/hphp.h>
3 #include <sys/global_variables.h>
8 ///////////////////////////////////////////////////////////////////////////////
10 CVarRef
GlobalVariables::getRefByIdx(ssize_t idx
, Variant
&k
) {
11 DECLARE_GLOBAL_VARIABLES(g
);
12 static const char *names
[] = {
24 "http_response_header",
26 "wgRegisterInternalExternals",
31 "wgAllowExternalImages",
32 "wgAllowExternalImagesFrom",
33 "wgEnableImageWhitelist",
34 "wgAllowSpecialInclusion",
40 "wgExternalLinkTarget",
44 "wgPreprocessorCacheThreshold",
46 "wgLinkHolderBatchSize",
49 "wgExpensiveParserFunctionLimit",
53 "wgNoFollowNsExceptions",
54 "wgNoFollowDomainExceptions",
61 "wgNonincludableNamespaces",
62 "wgEnableScaryTranscluding",
63 "wgTranscludeCacheExpiry",
69 "wgCategoryPrefixedDefaultSortkey",
72 "wgParserCacheExpireTime",
79 "wgAllowDisplayTitle",
80 "wgAllowSlowParserFunctions",
81 "wgRestrictDisplayTitle",
83 if (idx
>= 0 && idx
< 69) {
86 case 0: return gv_argc
;
87 case 1: return gv_argv
;
88 case 2: return gv__SERVER
;
89 case 3: return gv__GET
;
90 case 4: return gv__POST
;
91 case 5: return gv__COOKIE
;
92 case 6: return gv__FILES
;
93 case 7: return gv__ENV
;
94 case 8: return gv__REQUEST
;
95 case 9: return gv__SESSION
;
96 case 10: return gv_HTTP_RAW_POST_DATA
;
97 case 11: return gv_http_response_header
;
98 case 12: return GV(wgServer
);
99 case 13: return GV(wgRegisterInternalExternals
);
100 case 14: return GV(wgCacheEpoch
);
101 case 15: return GV(wgUseTeX
);
102 case 16: return GV(wgUseDynamicDates
);
103 case 17: return GV(wgInterwikiMagic
);
104 case 18: return GV(wgAllowExternalImages
);
105 case 19: return GV(wgAllowExternalImagesFrom
);
106 case 20: return GV(wgEnableImageWhitelist
);
107 case 21: return GV(wgAllowSpecialInclusion
);
108 case 22: return GV(wgMaxArticleSize
);
109 case 23: return GV(wgMaxPPNodeCount
);
110 case 24: return GV(wgMaxTemplateDepth
);
111 case 25: return GV(wgMaxPPExpandDepth
);
112 case 26: return GV(wgCleanSignatures
);
113 case 27: return GV(wgExternalLinkTarget
);
114 case 28: return GV(wgUser
);
115 case 29: return GV(wgHooks
);
116 case 30: return GV(wgMemc
);
117 case 31: return GV(wgPreprocessorCacheThreshold
);
118 case 32: return GV(wgContLang
);
119 case 33: return GV(wgLinkHolderBatchSize
);
120 case 34: return GV(wgUseTidy
);
121 case 35: return GV(wgAlwaysUseTidy
);
122 case 36: return GV(wgExpensiveParserFunctionLimit
);
123 case 37: return GV(wgLang
);
124 case 38: return GV(wgRawHtml
);
125 case 39: return GV(wgNoFollowLinks
);
126 case 40: return GV(wgNoFollowNsExceptions
);
127 case 41: return GV(wgNoFollowDomainExceptions
);
128 case 42: return GV(wgSitename
);
129 case 43: return GV(wgServerName
);
130 case 44: return GV(wgScriptPath
);
131 case 45: return GV(wgStylePath
);
132 case 46: return GV(wgLocaltimezone
);
133 case 47: return GV(wgContLanguageCode
);
134 case 48: return GV(wgNonincludableNamespaces
);
135 case 49: return GV(wgEnableScaryTranscluding
);
136 case 50: return GV(wgTranscludeCacheExpiry
);
137 case 51: return GV(wgMaxTocLevel
);
138 case 52: return GV(wgEnforceHtmlIds
);
139 case 53: return GV(wgLegalTitleChars
);
140 case 54: return GV(wgMaxSigChars
);
141 case 55: return GV(wgTitle
);
142 case 56: return GV(wgCategoryPrefixedDefaultSortkey
);
143 case 57: return GV(parserMemc
);
144 case 58: return GV(wgRequest
);
145 case 59: return GV(wgParserCacheExpireTime
);
146 case 60: return GV(wgTidyInternal
);
147 case 61: return GV(wgTidyConf
);
148 case 62: return GV(wgTidyBin
);
149 case 63: return GV(wgTidyOpts
);
150 case 64: return GV(IP
);
151 case 65: return GV(wgDebugTidy
);
152 case 66: return GV(wgAllowDisplayTitle
);
153 case 67: return GV(wgAllowSlowParserFunctions
);
154 case 68: return GV(wgRestrictDisplayTitle
);
157 return Globals::getRefByIdx(idx
, k
);
160 ///////////////////////////////////////////////////////////////////////////////