Lines Matching full:info
162 * @param bool $htmlClient add info about whether is mobile browser
163 * @return array with info for a request of $id
175 // set info about manager/admin status.
176 $info = [];
177 $info['isadmin'] = false;
178 $info['ismanager'] = false;
180 $info['userinfo'] = $USERINFO;
181 $info['perm'] = auth_quickaclcheck($id);
182 $info['client'] = $INPUT->server->str('REMOTE_USER');
184 if ($info['perm'] == AUTH_ADMIN) {
185 $info['isadmin'] = true;
186 $info['ismanager'] = true;
188 $info['ismanager'] = true;
192 if (empty($info['userinfo']['name'])) {
193 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
196 $info['perm'] = auth_aclcheck($id, '', null);
197 $info['client'] = clientIP(true);
200 $info['namespace'] = getNS($id);
204 $info['ismobile'] = clientismobile();
207 return $info;
211 * Return info about the current document as associative
214 * @return array with info about current document
226 $info = basicinfo($ID);
230 $info['id'] = $ID;
231 $info['rev'] = $REV;
234 $info['subscribed'] = $subManager->userSubscription();
236 $info['locked'] = checklock($ID);
237 $info['filepath'] = wikiFN($ID);
238 $info['exists'] = file_exists($info['filepath']);
239 $info['currentrev'] = @filemtime($info['filepath']);
243 if ($info['exists'] && ($info['currentrev'] == $REV)) {
252 $info['filepath'] = wikiFN($ID, $REV);
253 $info['exists'] = file_exists($info['filepath']);
256 $info['rev'] = $REV;
257 if ($info['exists']) {
258 $info['writable'] = (is_writable($info['filepath']) && $info['perm'] >= AUTH_EDIT);
260 $info['writable'] = ($info['perm'] >= AUTH_CREATE);
262 $info['editable'] = ($info['writable'] && empty($info['locked']));
263 $info['lastmod'] = @filemtime($info['filepath']);
266 $info['meta'] = p_get_metadata($ID);
272 } elseif (!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {
273 $revinfo = $info['meta']['last_change'];
275 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
278 $info['meta']['last_change'] = $revinfo;
283 if ($revinfo !== false && $revinfo['date'] != $info['lastmod']) {
286 $info['meta']['last_change'] = $revinfo;
291 $info['ip'] = $revinfo['ip'];
292 $info['user'] = $revinfo['user'];
293 $info['sum'] = $revinfo['sum'];
294 // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID.
295 …// Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor…
297 $info['editor'] = $revinfo['user'] ?: $revinfo['ip'];
299 $info['ip'] = null;
300 $info['user'] = null;
301 $info['sum'] = null;
302 $info['editor'] = null;
306 $draft = new Draft($ID, $info['client']);
308 $info['draft'] = $draft->getDraftFilename();
311 return $info;
315 * Initialize and/or fill global $JSINFO with some basic info to be given to javascript
319 global $JSINFO, $ID, $INFO, $ACT;
324 //export minimal info to JS, plugins can add more
326 $JSINFO['namespace'] = isset($INFO) ? (string)$INFO['namespace'] : '';
335 * @return array with info about current media item
342 $info = basicinfo("$NS:*");
343 $info['image'] = $IMG;
345 return $info;
406 global $INFO;
412 if ($ACT != 'show' || $INFO['perm'] < AUTH_READ || isHiddenPage($ID) || !file_exists($file)) {
725 global $INFO;
763 $data['userinfo']['name'] = $INFO['userinfo']['name'];
764 $data['userinfo']['mail'] = $INFO['userinfo']['mail'];
1621 global $conf, $INFO;
1648 … $data['name'] = $INFO['userinfo']['name'] . ' (' . $INPUT->server->str('REMOTE_USER') . ')';
1650 $data['name'] = '<bdi>' . hsc($INFO['userinfo']['name']) . '</bdi> ' .
1659 $info = $auth->getUserData($username);
1661 if ($conf['showuseras'] != 'loginname' && isset($info) && $info) {
1665 $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
1669 $data['name'] = obfuscate($info['mail']);
1682 if (!isset($info) && $auth instanceof AuthPlugin) {
1683 $info = $auth->getUserData($username);
1685 if (isset($info) && $info) {
1687 $data['link']['url'] = 'mailto:' . obfuscate($info['mail']);
1837 // pass info about the redirect back to the test suite