Lines Matching defs:info

161  * @param bool   $htmlClient add info about whether is mobile browser
162 * @return array with info for a request of $id
171 // set info about manager/admin status.
172 $info = [];
173 $info['isadmin'] = false;
174 $info['ismanager'] = false;
176 $info['userinfo'] = $USERINFO;
177 $info['perm'] = auth_quickaclcheck($id);
178 $info['client'] = $INPUT->server->str('REMOTE_USER');
180 if ($info['perm'] == AUTH_ADMIN) {
181 $info['isadmin'] = true;
182 $info['ismanager'] = true;
184 $info['ismanager'] = true;
188 if (empty($info['userinfo']['name'])) {
189 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
192 $info['perm'] = auth_aclcheck($id, '', null);
193 $info['client'] = clientIP(true);
196 $info['namespace'] = getNS($id);
200 $info['ismobile'] = clientismobile();
203 return $info;
207 * Return info about the current document as associative
210 * @return array with info about current document
222 $info = basicinfo($ID);
226 $info['id'] = $ID;
227 $info['rev'] = $REV;
230 $info['subscribed'] = $subManager->userSubscription();
232 $info['locked'] = checklock($ID);
233 $info['filepath'] = wikiFN($ID);
234 $info['exists'] = file_exists($info['filepath']);
235 $info['currentrev'] = @filemtime($info['filepath']);
239 if ($info['exists'] && ($info['currentrev'] == $REV)) {
248 $info['filepath'] = wikiFN($ID, $REV);
249 $info['exists'] = file_exists($info['filepath']);
252 $info['rev'] = $REV;
253 if ($info['exists']) {
254 $info['writable'] = (is_writable($info['filepath']) && $info['perm'] >= AUTH_EDIT);
256 $info['writable'] = ($info['perm'] >= AUTH_CREATE);
258 $info['editable'] = ($info['writable'] && empty($info['locked']));
259 $info['lastmod'] = @filemtime($info['filepath']);
262 $info['meta'] = p_get_metadata($ID);
268 } elseif (!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {
269 $revinfo = $info['meta']['last_change'];
271 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
274 $info['meta']['last_change'] = $revinfo;
279 if ($revinfo !== false && $revinfo['date'] != $info['lastmod']) {
282 $info['meta']['last_change'] = $revinfo;
287 $info['ip'] = $revinfo['ip'];
288 $info['user'] = $revinfo['user'];
289 $info['sum'] = $revinfo['sum'];
291 // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor'].
293 $info['editor'] = $revinfo['user'] ?: $revinfo['ip'];
295 $info['ip'] = null;
296 $info['user'] = null;
297 $info['sum'] = null;
298 $info['editor'] = null;
302 $draft = new Draft($ID, $info['client']);
304 $info['draft'] = $draft->getDraftFilename();
307 return $info;
311 * Initialize and/or fill global $JSINFO with some basic info to be given to javascript
320 //export minimal info to JS, plugins can add more
331 * @return array with info about current media item
338 $info = basicinfo("$NS:*");
339 $info['image'] = $IMG;
341 return $info;
1698 $info = $auth->getUserData($username);
1700 if ($conf['showuseras'] != 'loginname' && isset($info) && $info) {
1704 $data['name'] = $textonly ? $info['name'] : hsc($info['name']);
1708 $data['name'] = obfuscate($info['mail']);
1721 if (!isset($info) && $auth instanceof AuthPlugin) {
1722 $info = $auth->getUserData($username);
1724 if (isset($info) && $info) {
1726 $data['link']['url'] = 'mailto:' . obfuscate($info['mail']);
1876 // pass info about the redirect back to the test suite