Lines Matching full:info

163  * @param bool $htmlClient add info about whether is mobile browser
164 * @return array with info for a request of $id
176 // set info about manager/admin status.
177 $info = [];
178 $info['isadmin'] = false;
179 $info['ismanager'] = false;
181 $info['userinfo'] = $USERINFO;
182 $info['perm'] = auth_quickaclcheck($id);
183 $info['client'] = $INPUT->server->str('REMOTE_USER');
185 if ($info['perm'] == AUTH_ADMIN) {
186 $info['isadmin'] = true;
187 $info['ismanager'] = true;
189 $info['ismanager'] = true;
193 if (empty($info['userinfo']['name'])) {
194 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
197 $info['perm'] = auth_aclcheck($id, '', null);
198 $info['client'] = clientIP(true);
201 $info['namespace'] = getNS($id);
205 $info['ismobile'] = clientismobile();
208 return $info;
212 * Return info about the current document as associative
215 * @return array with info about current document
227 $info = basicinfo($ID);
231 $info['id'] = $ID;
232 $info['rev'] = $REV;
235 $info['subscribed'] = $subManager->userSubscription();
237 $info['locked'] = checklock($ID);
238 $info['filepath'] = wikiFN($ID);
239 $info['exists'] = file_exists($info['filepath']);
240 $info['currentrev'] = @filemtime($info['filepath']);
244 if ($info['exists'] && ($info['currentrev'] == $REV)) {
253 $info['filepath'] = wikiFN($ID, $REV);
254 $info['exists'] = file_exists($info['filepath']);
257 $info['rev'] = $REV;
258 if ($info['exists']) {
259 $info['writable'] = (is_writable($info['filepath']) && $info['perm'] >= AUTH_EDIT);
261 $info['writable'] = ($info['perm'] >= AUTH_CREATE);
263 $info['editable'] = ($info['writable'] && empty($info['locked']));
264 $info['lastmod'] = @filemtime($info['filepath']);
267 $info['meta'] = p_get_metadata($ID);
273 } elseif (!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {
274 $revinfo = $info['meta']['last_change'];
276 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
279 $info['meta']['last_change'] = $revinfo;
284 if ($revinfo !== false && $revinfo['date'] != $info['lastmod']) {
287 $info['meta']['last_change'] = $revinfo;
292 $info['ip'] = $revinfo['ip'];
293 $info['user'] = $revinfo['user'];
294 $info['sum'] = $revinfo['sum'];
295 // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID.
296 …// Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor…
298 $info['editor'] = $revinfo['user'] ?: $revinfo['ip'];
300 $info['ip'] = null;
301 $info['user'] = null;
302 $info['sum'] = null;
303 $info['editor'] = null;
307 $draft = new Draft($ID, $info['client']);
309 $info['draft'] = $draft->getDraftFilename();
312 return $info;
316 * Initialize and/or fill global $JSINFO with some basic info to be given to javascript
320 global $JSINFO, $ID, $INFO, $ACT;
325 //export minimal info to JS, plugins can add more
327 $JSINFO['namespace'] = isset($INFO) ? (string)$INFO['namespace'] : '';
336 * @return array with info about current media item
343 $info = basicinfo("$NS:*");
344 $info['image'] = $IMG;
346 return $info;
407 global $INFO;
413 if ($ACT != 'show' || $INFO['perm'] < AUTH_READ || isHiddenPage($ID) || !file_exists($file)) {
726 global $INFO;
764 $data['userinfo']['name'] = $INFO['userinfo']['name'];
765 $data['userinfo']['mail'] = $INFO['userinfo']['mail'];
1605 global $conf, $INFO;
1632 … $data['name'] = $INFO['userinfo']['name'] . ' (' . $INPUT->server->str('REMOTE_USER') . ')';
1634 $data['name'] = '<bdi>' . hsc($INFO['userinfo']['name']) . '</bdi> ' .
1643 $info = $auth->getUserData($username);
1645 if ($conf['showuseras'] != 'loginname' && isset($info) && $info) {
1649 $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
1653 $data['name'] = obfuscate($info['mail']);
1666 if (!isset($info) && $auth instanceof AuthPlugin) {
1667 $info = $auth->getUserData($username);
1669 if (isset($info) && $info) {
1671 $data['link']['url'] = 'mailto:' . obfuscate($info['mail']);
1821 // pass info about the redirect back to the test suite