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

40     return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8');
100 return preg_replace('/[\x00-\x1F]+/s', '', $string);
107 * @link http://en.wikipedia.org/wiki/Cross-site_request_forgery
108 * @link http://christ1an.blogspot.com/2007/04/preventing-csrf-efficiently.html
117 $user = $INPUT->server->str('REMOTE_USER');
120 // CSRF checks are only for logged in users - do not generate for anonymous
135 if (!$INPUT->server->str('REMOTE_USER')) return true; // no logged in user, no need for a check
137 if (is_null($token)) $token = $INPUT->str('sectok');
139 msg('Security Token did not match. Possible CSRF attack.', -1);
181 if ($INPUT->server->has('REMOTE_USER')) {
184 $info['client'] = $INPUT->server->str('REMOTE_USER');
195 $info['userinfo']['name'] = $INPUT->server->str('REMOTE_USER');
236 $info['subscribed'] = $subManager->userSubscription();
273 $revinfo = $pagelog->getRevisionInfo($REV);
277 $revinfo = $pagelog->getRevisionInfo($info['lastmod']);
309 if ($draft->isDraftAvailable()) {
310 $info['draft'] = $draft->getDraftFilename();
367 * Skips keys starting with '_', values get HTML encoded
369 * @param array $params array with (attribute name-attribute value) pairs
370 * @param bool $skipEmptyStrings skip empty string values?
450 * on Windows (non-IIS) systems and to have proper URL encoding
477 !str_contains($INPUT->server->str('SERVER_SOFTWARE'), 'Microsoft-IIS')
707 * data['matches'] - array of matches
708 * data['userinfo'] - information about the blocked user
709 * [ip] - ip address
710 * [user] - username (if logged in)
711 * [mail] - mail address (if logged in)
712 * [name] - real name (if logged in)
714 * @param string $text - optional text to check, if not given the globals are used
715 * @return bool - true if a spam word was found
738 …'!(\b)(www\.[\w.:?\-;,]+?\.[\w.:?\-;,]+?[\w/\#~:.?+=&%@\!\-.:?\-;,]+?)([.:?\-;,]*[^\w/\#~:.?+=&%@\…
745 // read file in chunks of 200 - this should work around the
762 $data['userinfo']['ip'] = $INPUT->server->str('REMOTE_ADDR');
763 if ($INPUT->server->str('REMOTE_USER')) {
764 $data['userinfo']['user'] = $INPUT->server->str('REMOTE_USER');
780 * - The custom IP header if $conf[client_ip_header] is set.
781 * - The X-Forwarded-For header if all the proxies are trusted by $conf[trustedproxies].
782 * - The TCP/IP connection remote address.
783 * - 0.0.0.0 if all else fails.
788 * The 'trustedproxies' setting must not allow any IP, otherwise the X-Forwarded-For
793 * @return string Returns an IP address if 'single' is true, or a comma-separated list
809 * @link http://www.brainhandles.com/2007/10/15/detecting-mobile-browsers/#code
811 * @deprecated 2018-04-27 you probably want media queries instead anyway
819 if ($INPUT->server->has('HTTP_X_WAP_PROFILE')) return true;
821 if (preg_match('/wap\.|\.wap/i', $INPUT->server->str('HTTP_ACCEPT'))) return true;
823 if (!$INPUT->server->has('HTTP_USER_AGENT')) return false;
830 … 'hand', 'mobi', 'phone', 'cdm', 'up\.b', 'audio', 'SIE\-', 'SEC\-', 'samsung', 'HTC', 'mot\-',
838 if (preg_match("/$uamatches/i", $INPUT->server->str('HTTP_USER_AGENT'))) return true;
851 if (preg_match('/^[a-zA-Z0-9\.]+>/u', $link)) return true;
905 if ((time() - filemtime($lock)) > $conf['locktime']) {
912 if ($ip == $INPUT->server->str('REMOTE_USER') || (session_id() && $session === session_id())) {
937 if ($INPUT->server->str('REMOTE_USER')) {
938 io_saveFile($lock, $INPUT->server->str('REMOTE_USER'));
960 if ($ip == $INPUT->server->str('REMOTE_USER') || $session == session_id()) {
971 * also makes sure the given text is valid UTF-8
983 // if the text is not valid UTF-8 we simply assume latin1
1060 if ($evt->advise_before(true)) {
1085 $evt->advise_after();
1153 $INPUT->server->str('REMOTE_USER'),
1174 * The range parameter needs to have the form "from-to"
1175 * and gives the range of the section in bytes - no
1176 * UTF-8 awareness is needed.
1179 * @param string $range in form "from-to"
1191 [$from, $to] = sexplode('-', $range, 2);
1192 // Make range zero-based, use defaults if marker is missing
1193 $from = $from ? $from - 1 : (0);
1194 $to = $to ? $to - 1 : (strlen($text));
1198 $slices[1] = substr($text, $from, $to - $from);
1254 $data = (new PageFile($id))->saveWikiText($text, $summary, $minor);
1264 $pages = (new MetadataSearch())->backlinks($id, true);
1267 $cache->removeCache();
1279 * @deprecated 2021-11-28
1284 return (new PageFile($id))->saveOldRevision();
1314 … if ($conf['useacl'] && $INPUT->server->str('REMOTE_USER') && $minor) return false; //skip minors
1330 return $subscription->sendPageDiff($to, $tpl, $id, $rev, $summary, $current_rev);
1346 if (!$INPUT->server->has('HTTP_REFERER')) {
1349 $url = parse_url($INPUT->server->str('HTTP_REFERER'));
1372 $q = preg_split('/[\s\'"\\\\`()\]\[?:!\.{};,#+*<>\\/]+/', $q, -1, PREG_SPLIT_NO_EMPTY);
1393 while ($size >= 1024 && ($i < $count - 1)) {
1398 return round($size, $dec) . "\xC2\xA0" . $sizes[$i]; //non-breaking space
1413 $ago = time() - $dt;
1439 * strftime - %f can be used to get the value from datetime_h()
1471 $date_mod = date('Y-m-d\TH:i:s', $int_date);
1493 * Convert php.ini shorthands to byte
1495 * On 32 bit systems values >= 2GB will fail!
1497 * -1 (infinite size) will be reported as -1
1505 $ret = match (strtoupper(substr($value, -1))) {
1506 'G' => (int)substr($value, 0, -1) * 1024 * 1024 * 1024,
1507 'M' => (int)substr($value, 0, -1) * 1024 * 1024,
1508 'K' => (int)substr($value, 0, -1) * 1024,
1542 $max -= PhpString::strlen($keep);
1548 PhpString::substr($short, 0, $half - 1) .
1550 PhpString::substr($short, $len - $half);
1554 * Return the users real name or e-mail address for use
1557 * @param string|null $username or null when currently logged-in user should be used
1571 * @param string|null $username or null when currently logged-in user should be used
1604 $data['username'] = $username = $INPUT->server->str('REMOTE_USER');
1606 … $data['name'] = $INFO['userinfo']['name'] . ' (' . $INPUT->server->str('REMOTE_USER') . ')';
1609 '(<bdi>' . hsc($INPUT->server->str('REMOTE_USER')) . '</bdi>)';
1614 if ($evt->advise_before(true)) {
1617 $info = $auth->getUserData($username);
1641 $info = $auth->getUserData($username);
1650 if ($xhtml_renderer->interwiki === []) {
1651 $xhtml_renderer->interwiki = getInterwiki();
1655 … $data['link']['url'] = $xhtml_renderer->_resolveInterWiki($shortcut, $username, $exists);
1681 $data['userlink'] = $xhtml_renderer->_formatLink($data['link']);
1684 $evt->advise_after();
1694 * @param string $type - type of image 'badge' or 'button'
1708 if (str_starts_with($conf['license'], 'cc-')) {
1734 if ($limit == -1) return true; // unlimited
1781 // check if running on IIS < 6 with CGI-PHP
1783 $INPUT->server->has('SERVER_SOFTWARE') && $INPUT->server->has('GATEWAY_INTERFACE') &&
1784 (str_contains($INPUT->server->str('GATEWAY_INTERFACE'), 'CGI')) &&
1785 …(preg_match('|^Microsoft-IIS/(\d)\.\d$|', trim($INPUT->server->str('SERVER_SOFTWARE')), $matches))…
1798 $testRequest->addData('send_redirect', $url);
1817 return (new PrefCookie())->get($pref, $default);
1837 (new PrefCookie())->set($pref, $val);
1871 $content = preg_replace('/<!--.*?(-->)/s', '', $content); // comments