Lines Matching +full:ini +full:- +full:values

38     return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
98 return preg_replace('/[\x00-\x1F]+/s', '', $string);
105 * @link http://en.wikipedia.org/wiki/Cross-site_request_forgery
106 * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html
115 $user = $INPUT->server->str('REMOTE_USER');
118 // CSRF checks are only for logged in users - do not generate for anonymous
133 if (!$INPUT->server->str('REMOTE_USER')) return true; // no logged in user, no need for a check
135 if (is_null($token)) $token = $INPUT->str('sectok');
137 msg('Security Token did not match. Possible CSRF attack.', -1);
179 if ($INPUT->server->has('REMOTE_USER')) {
182 $info['client'] = $INPUT->server->str('REMOTE_USER');
193 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
234 $info['subscribed'] = $subManager->userSubscription();
271 $revinfo = $pagelog->getRevisionInfo($REV);
275 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
307 if ($draft->isDraftAvailable()) {
308 $info['draft'] = $draft->getDraftFilename();
365 * Skips keys starting with '_', values get HTML encoded
367 * @param array $params array with (attribute name-attribute value) pairs
368 * @param bool $skipEmptyStrings skip empty string values?
448 * on Windows (non-IIS) systems and to have proper URL encoding
475 strpos($INPUT->server->str('SERVER_SOFTWARE'), 'Microsoft-IIS') === false
705 * data['matches'] - array of matches
706 * data['userinfo'] - information about the blocked user
707 * [ip] - ip address
708 * [user] - username (if logged in)
709 * [mail] - mail address (if logged in)
710 * [name] - real name (if logged in)
712 * @param string $text - optional text to check, if not given the globals are used
713 * @return bool - true if a spam word was found
736 …'!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\…
743 // read file in chunks of 200 - this should work around the
760 $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
761 if ($INPUT->server->str('REMOTE_USER')) {
762 $data['userinfo']['user'] = $INPUT->server->str('REMOTE_USER');
778 * - The X-Real-IP header if $conf[realip] is true.
779 * - The X-Forwarded-For header if all the proxies are trusted by $conf[trustedproxies].
780 * - The TCP/IP connection remote address.
781 * - 0.0.0.0 if all else fails.
783 * The 'realip' config value should only be set to true if the X-Real-IP header
786 * The 'trustedproxies' setting must not allow any IP, otherwise the X-Forwarded-For
791 * @return string Returns an IP address if 'single' is true, or a comma-separated list
807 * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code
809 * @deprecated 2018-04-27 you probably want media queries instead anyway
817 if ($INPUT->server->has('HTTP_X_WAP_PROFILE')) return true;
819 if (preg_match('/wap\.|\.wap/i', $INPUT->server->str('HTTP_ACCEPT'))) return true;
821 if (!$INPUT->server->has('HTTP_USER_AGENT')) return false;
828 … 'hand', 'mobi', 'phone', 'cdm', 'up\.b', 'audio', 'SIE\-', 'SEC\-', 'samsung', 'HTC', 'mot\-',
836 if (preg_match("/$uamatches/i", $INPUT->server->str('HTTP_USER_AGENT'))) return true;
849 if (preg_match('/^[a-zA-Z0-9\.]+>/u', $link)) return true;
903 if ((time() - filemtime($lock)) > $conf['locktime']) {
910 if ($ip == $INPUT->server->str('REMOTE_USER') || (session_id() && $session === session_id())) {
935 if ($INPUT->server->str('REMOTE_USER')) {
936 io_saveFile($lock, $INPUT->server->str('REMOTE_USER'));
958 if ($ip == $INPUT->server->str('REMOTE_USER') || $session == session_id()) {
969 * also makes sure the given text is valid UTF-8
981 // if the text is not valid UTF-8 we simply assume latin1
1058 if ($evt->advise_before(true)) {
1083 $evt->advise_after();
1151 $INPUT->server->str('REMOTE_USER'),
1172 * The range parameter needs to have the form "from-to"
1173 * and gives the range of the section in bytes - no
1174 * UTF-8 awareness is needed.
1177 * @param string $range in form "from-to"
1189 [$from, $to] = sexplode('-', $range, 2);
1190 // Make range zero-based, use defaults if marker is missing
1191 $from = $from ? $from - 1 : (0);
1192 $to = $to ? $to - 1 : (strlen($text));
1196 $slices[1] = substr($text, $from, $to - $from);
1245 * @deprecated 2021-11-28
1250 (new PageFile($id))->detectExternalEdit();
1269 $data = (new PageFile($id))->saveWikiText($text, $summary, $minor);
1282 $cache->removeCache();
1294 * @deprecated 2021-11-28
1299 return (new PageFile($id))->saveOldRevision();
1329 … if ($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
1345 return $subscription->sendPageDiff($to, $tpl, $id, $rev, $summary, $current_rev);
1361 if (!$INPUT->server->has('HTTP_REFERER')) {
1364 $url = parse_url($INPUT->server->str('HTTP_REFERER'));
1387 $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY);
1408 while ($size >= 1024 && ($i < $count - 1)) {
1413 return round($size, $dec) . "\xC2\xA0" . $sizes[$i]; //non-breaking space
1428 $ago = time() - $dt;
1454 * strftime - %f can be used to get the value from datetime_h()
1486 $date_mod = date('Y-m-d\TH:i:s', $int_date);
1508 $obfuscate = ['@' => ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '];
1535 * Convert php.ini shorthands to byte
1537 * On 32 bit systems values >= 2GB will fail!
1539 * -1 (infinite size) will be reported as -1
1547 switch (strtoupper(substr($value, -1))) {
1549 $ret = (int)substr($value, 0, -1) * 1024 * 1024 * 1024;
1552 $ret = (int)substr($value, 0, -1) * 1024 * 1024;
1555 $ret = (int)substr($value, 0, -1) * 1024;
1592 $max -= PhpString::strlen($keep);
1598 PhpString::substr($short, 0, $half - 1) .
1600 PhpString::substr($short, $len - $half);
1604 * Return the users real name or e-mail address for use
1607 * @param string|null $username or null when currently logged-in user should be used
1621 * @param string|null $username or null when currently logged-in user should be used
1654 $data['username'] = $username = $INPUT->server->str('REMOTE_USER');
1656 … $data['name'] = $INFO['userinfo']['name'] . ' (' . $INPUT->server->str('REMOTE_USER') . ')';
1659 '(<bdi>' . hsc($INPUT->server->str('REMOTE_USER')) . '</bdi>)';
1664 if ($evt->advise_before(true)) {
1667 $info = $auth->getUserData($username);
1691 $info = $auth->getUserData($username);
1700 if ($xhtml_renderer->interwiki === []) {
1701 $xhtml_renderer->interwiki = getInterwiki();
1705 … $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists);
1731 $data['userlink'] = $xhtml_renderer->_formatLink($data['link']);
1734 $evt->advise_after();
1744 * @param string $type - type of image 'badge' or 'button'
1758 if (str_starts_with($conf['license'], 'cc-')) {
1784 if ($limit == -1) return true; // unlimited
1831 // check if running on IIS < 6 with CGI-PHP
1833 $INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
1834 (strpos($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI') !== false) &&
1835 …(preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($INPUT->server->str('SERVER_SOFTWARE')), $matches))…
1848 $testRequest->addData('send_redirect', $url);
1857 * Validate a value using a set of valid values
1864 * @param array $valid_values A set of valid values; Optionally a default may
1896 return (new PrefCookie())->get($pref, $default);
1916 (new PrefCookie())->set($pref, $val);
1950 $content = preg_replace('/<!--.*?(-->)/s', '', $content); // comments