Lines Matching defs:data
15 * The url where the data should be sent
31 * Name of the file which determine when the popularity data was manually
33 * (If this file doesn't exist, the data has never been sent)
51 * @return boolean TRUE if we should send data once a month, FALSE otherwise
59 * Send the data, to the submit url
61 * @param string $data The popularity data
64 public function sendData($data)
68 $status = $httpClient->sendRequest($this->submitUrl, ['data' => $data], 'POST');
76 * Compute the last time the data was sent. If it has never been sent, we return 0.
91 * @return string The popularity data as a string
95 $data = $this->gather();
97 foreach ($data as $key => $val) {
129 * @return array The popularity data as an array
136 $data = [];
142 $data['anon_id'] = md5(auth_cookiesalt());
143 $data['version'] = getVersion();
144 $data['popversion'] = $pluginInfo['date'];
145 $data['language'] = $conf['lang'];
146 $data['now'] = time();
147 $data['popauto'] = (int) $this->isAutoSubmitEnabled();
150 $data['conf_useacl'] = $conf['useacl'];
151 $data['conf_authtype'] = $conf['authtype'];
152 $data['conf_template'] = $conf['template'];
157 $data['page_count'] = $list['file_count'];
158 $data['page_size'] = $list['file_size'];
159 $data['page_biggest'] = $list['file_max'];
160 $data['page_smallest'] = $list['file_min'];
161 $data['page_nscount'] = $list['dir_count'];
162 $data['page_nsnest'] = $list['dir_nest'];
163 if ($list['file_count']) $data['page_avg'] = $list['file_size'] / $list['file_count'];
164 $data['page_oldest'] = $list['file_oldest'];
170 $data['media_count'] = $list['file_count'];
171 $data['media_size'] = $list['file_size'];
172 $data['media_biggest'] = $list['file_max'];
173 $data['media_smallest'] = $list['file_min'];
174 $data['media_nscount'] = $list['dir_count'];
175 $data['media_nsnest'] = $list['dir_nest'];
176 if ($list['file_count']) $data['media_avg'] = $list['file_size'] / $list['file_count'];
182 $data['cache_count'] = $list['file_count'];
183 $data['cache_size'] = $list['file_size'];
184 $data['cache_biggest'] = $list['file_max'];
185 $data['cache_smallest'] = $list['file_min'];
186 if ($list['file_count']) $data['cache_avg'] = $list['file_size'] / $list['file_count'];
192 $data['index_count'] = $list['file_count'];
193 $data['index_size'] = $list['file_size'];
194 $data['index_biggest'] = $list['file_max'];
195 $data['index_smallest'] = $list['file_min'];
196 if ($list['file_count']) $data['index_avg'] = $list['file_size'] / $list['file_count'];
202 $data['meta_count'] = $list['file_count'];
203 $data['meta_size'] = $list['file_size'];
204 $data['meta_biggest'] = $list['file_max'];
205 $data['meta_smallest'] = $list['file_min'];
206 if ($list['file_count']) $data['meta_avg'] = $list['file_size'] / $list['file_count'];
212 $data['attic_count'] = $list['file_count'];
213 $data['attic_size'] = $list['file_size'];
214 $data['attic_biggest'] = $list['file_max'];
215 $data['attic_smallest'] = $list['file_min'];
216 if ($list['file_count']) $data['attic_avg'] = $list['file_size'] / $list['file_count'];
217 $data['attic_oldest'] = $list['file_oldest'];
222 $data['user_count'] = $auth->getUserCount();
232 $data['edits_per_day'] = $count / $dur;
237 $data['plugin'] = plugin_list();
240 if (defined('PCRE_VERSION')) $data['pcre_version'] = PCRE_VERSION;
241 $data['pcre_backtrack'] = ini_get('pcre.backtrack_limit');
242 $data['pcre_recursion'] = ini_get('pcre.recursion_limit');
245 $data['os'] = PHP_OS;
246 $data['webserver'] = $_SERVER['SERVER_SOFTWARE'];
247 $data['php_version'] = phpversion();
248 $data['php_sapi'] = PHP_SAPI;
249 $data['php_memory'] = php_to_byte(ini_get('memory_limit'));
250 $data['php_exectime'] = $phptime;
251 $data['php_extension'] = get_loaded_extensions();
253 // plugin usage data
254 $this->addPluginUsageData($data);
256 return $data;
260 * Triggers event to let plugins add their own data
262 * @param $data
264 protected function addPluginUsageData(&$data)
271 $data['plugin_' . $plugin . '_' . $key] = $value;
274 $data['plugin_' . $plugin] = $d;
282 * @param array &$data Reference to the result data structure
290 public function searchCountCallback(&$data, $base, $file, $type, $lvl, $opts)
294 if ($data['dir_nest'] < $lvl) $data['dir_nest'] = $lvl;
295 $data['dir_count']++;
303 $data['file_count']++;
304 $data['file_size'] += $size;
305 if (!isset($data['file_min']) || $data['file_min'] > $size) $data['file_min'] = $size;
306 if ($data['file_max'] < $size) $data['file_max'] = $size;
307 if (!isset($data['file_oldest']) || $data['file_oldest'] > $date) $data['file_oldest'] = $date;