100+ results results for 'php preg_quote' (291 ms)
1<?php 2/** 103 foreach ($wpcf7 as $key => $val) { 104 $val = preg_replace('/' . preg_quote($site_url, '/') . '/i', $new_site_url, $val); 105 $val = preg_replace('/' . preg_quote($admin_email, '/') . '/i', $new_admin_email, $val);ArticleHTMLGalley.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 259 lines
1<?php 2 3/** 4 * @file classes/article/ArticleHTMLGalley.inc.php 5 * 14 15// $Id: ArticleHTMLGalley.inc.php,v 1.33 2009/05/12 16:57:20 asmecher Exp $ 16 53 $imageUrl = Request::url(null, 'article', 'viewFile', array($this->getArticleId(), $this->getBestGalleyId($journal), $image->getFileId())); 54 $pattern = preg_quote(rawurlencode($image->getOriginalFileName())); 55readmes.inc.php https://gitlab.com/Gashler/sg | PHP | 233 lines
1<?php 2/** 62 if (!function_exists ("NC_Markdown")) 63 include_once dirname (dirname (__FILE__)) . "/externals/markdown/nc-markdown.inc.php"; 64 70 { 71 preg_match ("/(\=\= )(" . preg_quote ($specific_section, "/") . ")( \=\=)(.+?)([\r\n]+\=\= |$)/si", $rm, $m); 72 101 { 102 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 103 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm); 153 { 154 $rm = preg_replace ("/\<pre\>\<code\>/i", '<pre lang="php" escaped="true">', $rm); 155 $rm = preg_replace ("/\<\/code\>\<\/pre\>/i", '</pre>', $rm); 225 226 preg_match ("/(^)(" . preg_quote ($key, "/") . ")(\:)( )(.+?)($)/m", $readme[$path], $m); 227String.php https://gitlab.com/michield/phpList | PHP | 276 lines
1<?php 2namespace phpList\helper; 3 4use phpList\phpList; 5 8 * Class containing string helper functions 9 * @package phpList 10 */ 113 } 114 # $text = preg_replace('~'.preg_quote($fullmatch).'~',$linkreplace,$text); 115 $text = str_replace($fullmatch, $linkreplace, $text); 161 "'&#(\d+);'e" 162 ); // evaluate as php 163 200 foreach ($tags as $tag) { 201# preg_match_all('/'.preg_quote($tag).'"([^"|\#]*)"/Uim', $text, $foundtags); 202# we're only handling nicely formatted src="something" and not src=something, ie quotes are requiredAllMessagesTablePager.php https://gitlab.com/link233/bootmw | PHP | 424 lines
1<?php 2/** 76 $this->displayPrefix = $prefix->getDBkey(); 77 $this->prefix = '/^' . preg_quote( $this->displayPrefix, '/' ) . '/i'; 78 } else { 304 $translation = Linker::makeExternalLink( 305 'https://translatewiki.net/w/i.php?' . wfArrayToCgi( [ 306 'title' => 'Special:SearchTranslations',class-vc-grid-item.php https://gitlab.com/furrutia1991/imosa_web | PHP | 357 lines
1<?php 2 25 if ( false === $this->shortcodes ) { 26 $this->shortcodes = include vc_path_dir( 'PARAMS_DIR', 'vc_grid_item/shortcodes.php' ); 27 $this->shortcodes = apply_filters( 'vc_grid_item_shortcodes', $this->shortcodes ); 51 public function addVcIconShortcodesTemplates( $template ) { 52 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_icon.php' ); 53 if ( is_file( $file ) ) { 67 public function addVcButton2ShortcodesTemplates( $template ) { 68 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_button2.php' ); 69 if ( is_file( $file ) ) { 83 public function addVcSingleImageShortcodesTemplates( $template ) { 84 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_single_image.php' ); 85 if ( is_file( $file ) ) { 100 public function addVcCustomHeadingShortcodesTemplates( $template ) { 101 $file = vc_path_dir( 'TEMPLATES_DIR', 'params/vc_grid_item/shortcodes/vc_custom_heading.php' ); 102 if ( is_file( $file ) ) {referrals.php https://github.com/bernard357/yacs.git | PHP | 441 lines
1<?php 2/** 14 * 15 * This function removes any PHPSESSID data in the query string, if any 16 * 18 * 19 * @see agents/referrals_hook.php 20 */ 32 // only remember viewed pages and index pages 33 if(!preg_match('/\/(index|view).php/', $url)) 34 return; 47 // only remember external referrals 48 if(preg_match('/\b'.preg_quote(str_replace('www.', '', $context['host_name']), '/').'\b/i', $referer)) 49 return; 55 // avoid banned sources 56 include_once $context['path_to_root'].'servers/servers.php'; 57 if(preg_match(Servers::get_banned_pattern(), $referer))Emailer.php https://github.com/nopticon/hyd.git | PHP | 354 lines
1<?php namespace App; 2 143 $this->subject = trim($match[2]) ? trim($match[2]) : ($this->subject ? $this->subject : 'No Subject'); 144 $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); 145 } else { 150 $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); 151 $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); 152 } else { 233 // Encodes the given string for proper display for this encoding ... nabbed 234 // from php.net and modified. There is an alternative encoding method which 235 // may produce lesd output but it's questionable as to its worth in this 254 // remove trailing spacer and add start and end delimiters 255 $str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str); 256Array.php git://github.com/atk4/atk4.git | PHP | 212 lines
1<?php 2/** 180 case 'like': 181 $pattern = '/^' . str_replace('%', '.*', preg_quote($expected, '/')) . '$/i'; 182 return (bool) preg_match($pattern, $value);ShallowParser.php https://bitbucket.org/leiweiqiang/tra-ai-pm.git | PHP | 233 lines
1<?php 2 70 public function quote($token) { 71 return preg_quote($token, '/'); 72 } 91 $result->terminator = $result->state 92 ? '/^(.*?' . preg_quote($this->_pairs[$result->state], '/') . ')/s' 93 : nullFloat.php https://github.com/Ocramius/zf2.git | PHP | 251 lines
1<?php 2/** 59 throw new I18nException\ExtensionNotLoadedException( 60 sprintf('%s component requires the intl PHP extension', __NAMESPACE__) 61 ); 103 * Returns true if and only if $value is a floating-point value. Uses the formal definition of a float as described 104 * in the PHP manual: {@link http://www.php.net/float} 105 * 175 //If we have Unicode support, we can use the real graphemes, otherwise, just the ASCII characters 176 $decimal = '['. preg_quote($decSeparator, '/') . ']'; 177 $prefix = '[+-]'; 184 $prefix = '[' 185 . preg_quote( 186 $formatter->getTextAttribute(NumberFormatter::POSITIVE_PREFIX) 194 ? '[' 195 . preg_quote( 196 $formatter->getTextAttribute(NumberFormatter::POSITIVE_SUFFIX)SearchMssql.php https://github.com/daevid/MWFork.git | PHP | 252 lines
1<?php 2/** 169 if ( !empty( $terms[3] ) ) { 170 $regexp = preg_quote( $terms[3], '/' ); 171 if ( $terms[4] ) 173 } else { 174 $regexp = preg_quote( str_replace( '"', '', $terms[2] ), '/' ); 175 } 197 // but the indexer will correctly handle it by this method. Since all we are doing 198 // is passing this data to the indexer and never retrieving it via PHP, this will save space 199 $table = $this->db->tableName( 'searchindex' );404.php https://gitlab.com/iulian/immigration-australia-forum.git | PHP | 251 lines
1<?php 2/** 36 37if(THIS_SCRIPT == "misc.php" 38 && $mybb->input['google_seo_error'] == "404") 42 // Set the 404 error location 43 $location = 'misc.php?google_seo_error=404'; 44 133 { 134 $pattern = preg_quote($pattern, '#'); 135 $pattern = str_replace('\\*', '.*', $pattern); 240 // Check if this user is on a 404 page. 241 if(strpos($p['user_activity']['location'], "misc.php?google_seo_error=404") === 0) 242 {systematics.inc.php https://gitlab.com/Gashler/sg | PHP | 141 lines
1<?php 2/** 87 88 if((defined('DOING_CRON') && DOING_CRON) || strcasecmp(PHP_SAPI, 'CLI') === 0) // CLI or CRON job. 89 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars())); 90 91 if(preg_match('/^\/(?:wp-.+?|xmlrpc)\.php$/'.$ci, c_ws_plugin__s2member_utils_urls::parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) 92 return ($is_wp_systematic = apply_filters('ws_plugin__s2member_is_wp_systematic_use_page', TRUE, get_defined_vars())); 134 135 if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri(NULL, 'root-returns-false')) && preg_match('/^'.preg_quote($_lro, '/').'$/'.$ci, $_SERVER['REQUEST_URI'])) 136 return ($is_systematic = apply_filters('ws_plugin__s2member_is_systematic_use_page', TRUE, get_defined_vars()));functions-http.php https://gitlab.com/Slind/YOURLS | PHP | 369 lines
1<?php 2/** 86 * 87 * For a list of all available options, see function request() in /includes/Requests/Requests.php 88 * 157 foreach ( $bypass_hosts as $host ) 158 $wildcard_regex[] = str_replace( '\*', '.+', preg_quote( $host, '/' ) ); 159 $wildcard_regex = '/^(' . implode( '|', $wildcard_regex ) . ')$/i'; 202 if ( !class_exists( 'Requests', false ) ) { 203 require_once dirname( __FILE__ ) . '/Requests/Requests.php'; 204 Requests::register_autoloader(); 253 $conf_loc = str_replace( YOURLS_ABSPATH, '', YOURLS_CONFIGFILE ); 254 $conf_loc = str_replace( '/config.php', '', $conf_loc ); 255 $conf_loc = ( $conf_loc == '/user' ? 'u' : 'i' ); 265 'yourls_version' => defined( 'YOURLS_VERSION' ) ? YOURLS_VERSION : 'unknown', 266 'php_version' => phpversion(), 267 'mysql_version' => $ydb->mysql_version(),ModuleAutoloader.php https://gitlab.com/yousafsyed/easternglamor | PHP | 442 lines
1<?php 2/** 12// Grab SplAutoloader interface 13require_once __DIR__ . '/SplAutoloader.php'; 14 188 if ($this->pharExtensions) { 189 $pharSuffixPattern = '(' . implode('|', array_map('preg_quote', $this->pharExtensions)) . ')'; 190 } 211 212 // No directory with Module.php, searching for phars 213 if ($pharSuffixPattern) { 244 { 245 $modulePath = $dirPath . '/Module.php'; 246 if (substr($modulePath, 0, 7) === 'phar://') { 252 if (($file->isReadable() && $file->isFile())) { 253 // Found directory with Module.php in it 254 $absModulePath = $this->pharBasePath ? (string) $file : $file->getRealPath();Suffix.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 185 lines
1<?php 2/** 21/** 22 * @SuppressWarnings(PHPMD.CouplingBetweenObjects) 23 */ 54 * @param array $data 55 * @SuppressWarnings(PHPMD.ExcessiveParameterList) 56 */ 136 $entities = $this->urlFinder->findAllByData($dataFilter); 137 $oldSuffixPattern = '~' . preg_quote($this->getOldValue()) . '$~'; 138 $suffix = $this->getValue();AnnotationDriver.php https://gitlab.com/mohamedchiheb.bida/workshopFOS | PHP | 256 lines
1<?php 2/* 61 */ 62 protected $fileExtension = '.php'; 63 215 ), 216 '/^.+' . preg_quote($this->fileExtension) . '$/i', 217 \RecursiveRegexIterator::GET_MATCHWildcard.php https://github.com/Martin1982/IBMessagingWorkshopServer.git | PHP | 362 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Wildcard.php 20096 2010-01-06 02:05:09Z bkarwin $ 21 */ 24/** Zend_Search_Lucene_Search_Query */ 25// require_once 'Zend/Search/Lucene/Search/Query.php'; 26 140 $prefixLength = strlen($prefix); 141 $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; 142 143 if ($prefixLength < self::$_minPrefixLength) { 144 // require_once 'Zend/Search/Lucene/Exception.php'; 145 throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); 158 159 // require_once 'Zend/Search/Lucene/Index/Term.php'; 160 if ($prefix != '') {Wildcard.php https://bitbucket.org/sasezaki/mirror-zf1-standard-trunk-libraray-search-dir.git | PHP | 362 lines
1<?php 2/** 24/** Zend_Search_Lucene_Search_Query */ 25require_once 'Zend/Search/Lucene/Search/Query.php'; 26 140 $prefixLength = strlen($prefix); 141 $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; 142 143 if ($prefixLength < self::$_minPrefixLength) { 144 require_once 'Zend/Search/Lucene/Exception.php'; 145 throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); 158 159 require_once 'Zend/Search/Lucene/Index/Term.php'; 160 if ($prefix != '') { 169 if ($maxTerms != 0 && count($this->_matches) > $maxTerms) { 170 require_once 'Zend/Search/Lucene/Exception.php'; 171 throw new Zend_Search_Lucene_Exception('Terms per query limit is reached.');functions.php https://bitbucket.org/chiamingyen/cmsimple-and-plugins.git | PHP | 330 lines
26 27if (preg_match('/functions.php/i', sv('PHP_SELF'))) 28 die('Access Denied'); 29 30// Backward compatibility for DHTML menus - moved from functions.php to cms.php (CMSimple_XH 1.0) 31 193// includes additional userfuncs.php - CMSimple_XH beta3 194if (file_exists($pth['folder']['cmsimple'] . 'userfuncs.php')) { 195 include($pth['folder']['cmsimple'] . 'userfuncs.php'); 279 if (key_exists('phpversion', $data)) { 280 $ok = version_compare(PHP_VERSION, $data['phpversion']) >= 0; 281 $o .= '<li>' . $imgs[$ok ? 'ok' : 'fail'] 281 $o .= '<li>' . $imgs[$ok ? 'ok' : 'fail'] 282 . sprintf($stx['phpversion'], $data['phpversion']) . "</li>\n"; 283 }text.php https://gitlab.com/vince.omega/mcb-nov-build | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.php 3769 2008-12-15 00:48:56Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 189 { 190 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 191 } 353 * @see Based on original functions written by: 354 * @see Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php 355 * @see Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/functions.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 413 lines
1<?php 2 126 { 127 $dir = nv_preg_quote( $dir ); 128 if ( preg_match( "/^" . $dir . "/", $path ) ) 195 196 include_once ( NV_ROOTDIR . "/includes/class/image.class.php" ); 197 $image = new image( NV_ROOTDIR . '/' . $fileName, NV_MAX_WIDTH, NV_MAX_HEIGHT );text.php https://github.com/error10/Ushahidi_Web.git | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.php 3917 2009-01-21 03:06:22Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 189 { 190 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 191 } 353 * @see Based on original functions written by: 354 * @see Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php 355 * @see Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/compresseur.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 328 lines
1<?php 2 58 $url_page = substr(generer_url_public('A'), 0, -1); 59 $dir = preg_quote($url_page,',').'|'.preg_quote(preg_replace(",^$url_base,",_DIR_RACINE,$url_page),','); 60 70 // ou si c'est un fichier 71 $src = preg_replace(',^'.preg_quote(url_de_base(),',').',', '', $src) 72 // enlever un timestamp eventuel derriere un nom de fichier statique 106 $url_page = substr(generer_url_public('A'), 0, -1); 107 $dir = preg_quote($url_page,',').'|'.preg_quote(preg_replace(",^$url_base,",_DIR_RACINE,$url_page),','); 108 119 AND ( 120 // regarder si c'est du format spip.php?page=xxx 121 preg_match(',^('.$dir.')(.*)$,', $src, $r)Wildcard.php https://gitlab.com/RonLab1987/YupePlusClear | PHP | 366 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Wildcard.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 23/** Zend_Search_Lucene_Search_Query */ 24require_once 'Zend/Search/Lucene/Search/Query.php'; 25 141 ['.', '.*'], 142 preg_quote($this->_pattern->text, '/') 143 ) . '$/'; 145 if ($prefixLength < self::$_minPrefixLength) { 146 require_once 'Zend/Search/Lucene/Exception.php'; 147 throw new Zend_Search_Lucene_Exception('At least ' . self::$_minPrefixLength . ' non-wildcard characters are required at the beginning of pattern.'); 160 161 require_once 'Zend/Search/Lucene/Index/Term.php'; 162 if ($prefix != '') {Cache.php https://gitlab.com/staging06/myproject | PHP | 396 lines
1<?php 2/* 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 220 { 221 $pattern = str_replace('\\*', '.*', preg_quote($key)); 222 foreach ($this->keys as $k => $ttl) 358 { 359 // PHP is not efficient at storing array 360 // Better delete the whole cache if there are 386 { 387 $regexp = str_replace('\\*', '.*', preg_quote($key, '#')); 388 foreach (array_keys(Cache::$local) as $key)user_agent.php http://scp-soft.googlecode.com/svn/trunk/ | PHP | 588 lines
1<?php 2/** 10 * @author Rick Ellis 11 * @link http://kohanaphp.com/user_guide/libraries/user_agent.html 12 */ 249 { 250 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 251 { 273 { 274 if (preg_match("|".preg_quote($key).".*?([0-9\.]+)|i", $this->agent, $match)) 275 { 300 { 301 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 302 {ssl-in.inc.php https://gitlab.com/Gashler/sg | PHP | 167 lines
1<?php 2/** 102 if(_ws_plugin__s2member_force_ssl_host && _ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host_port) 103 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host, '/').'(?:\:[0-9]+)?/i', 'https://'._ws_plugin__s2member_force_ssl_host_port, $s); 104 $s = (strtolower($m[1]) === 'link' && preg_match('/(["\'])(?:alternate|profile|pingback|EditURI|wlwmanifest|prev|next)\\1/i', $m[0])) ? $m[0] : $s; 112 { 113 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host_port, '/').'/i', 'http://'._ws_plugin__s2member_force_ssl_host, $m[0]); 114 $s = preg_replace('/(?:https?\:)?\/\/'.preg_quote(_ws_plugin__s2member_force_ssl_host, '/').'/i', 'http://'._ws_plugin__s2member_force_ssl_host, $s); 151 152 $buffer = ($ssl_entire_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_entire_tags, '/')).')(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is', '_ws_plugin__s2member_force_ssl_buffer_callback', $buffer) : $buffer; 153 $buffer = ($ssl_attr_only_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_attr_only_tags, '/')).')(?![a-z_0-9\-])[^\>]+?\>/i', '_ws_plugin__s2member_force_ssl_buffer_callback', $buffer) : $buffer; 154 155 $buffer = ($non_ssl_entire_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_entire_tags, '/')).')(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is', '_ws_plugin__s2member_force_non_ssl_buffer_callback', $buffer) : $buffer; 156 $buffer = ($non_ssl_attr_only_tags) ? preg_replace_callback('/\<('.implode('|', c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_attr_only_tags, '/')).')(?![a-z_0-9\-])[^\>]+?\>/i', '_ws_plugin__s2member_force_non_ssl_buffer_callback', $buffer) : $buffer;Date.php https://gitlab.com/r.collas/site_central | PHP | 165 lines
1<?php 2/** 26 27 $format = preg_quote($format, '#'); 28 164 165// Do not clause PHP tags unless it is really necessarypages.inc.php https://gitlab.com/Gashler/sg | PHP | 109 lines
1<?php 2/** 55 56 else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri($user, 'root-returns-false')) && preg_match('/^'.preg_quote($login_redirection_uri, '/').'$/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level0')) && $page_id !== (int)$GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) 57 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('page', $page_id, 'level', 0, $_SERVER['REQUEST_URI'], 'sys').exit (); 90 foreach(preg_split('/['."\r\n\t".']+/', c_ws_plugin__s2member_ruris::fill_ruri_level_access_rc_vars($GLOBALS['WS_PLUGIN__']['s2member']['o']['level'.$n.'_ruris'], $user)) as $str) 91 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $_SERVER['REQUEST_URI']) && c_ws_plugin__s2member_no_cache::no_cache_constants('restricted') && (!$user || !$user->has_cap('access_s2member_level'.$n))) 92 c_ws_plugin__s2member_mo_page::wp_redirect_w_mop_vars('page', $page_id, 'level', $n, $_SERVER['REQUEST_URI'], 'ruri').exit ();functions.php https://github.com/Lucky65/phpBB-Portal-XL-5.0-italian.git | PHP | 489 lines
32* smiley_sort() 33* phpbb_preg_quote() 34* smilie_text() 293 { 294 include_once($phpbb_root_path . 'portal/includes/functions_acronym.php'); 295 $message = acronym_pass($message); 405 { 406 $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; 407 $repl[] = '<img src="images/smilies/'. $images['smilies'] . '/' . $smilies[$i]['smiley_url'] . '" alt="' . $smilies[$i]['emotion'] . '" border="0" />'; 435/** 436* phpbb_preg_quote processing 437*/ 437*/ 438function phpbb_preg_quote($str, $delimiter) 439{Inflector.php https://gitlab.com/yousafsyed/easternglamor | PHP | 472 lines
1<?php 2/** 415 416 $pregQuotedTargetReplacementIdentifier = preg_quote($this->targetReplacementIdentifier, '#'); 417 $processedParts = array();Cache.php https://gitlab.com/A.Julien/sendstockbymail-module-prestashop | PHP | 396 lines
1<?php 2/* 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2016 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 220 { 221 $pattern = str_replace('\\*', '.*', preg_quote($key)); 222 foreach ($this->keys as $k => $ttl) 358 { 359 // PHP is not efficient at storing array 360 // Better delete the whole cache if there are 386 { 387 $regexp = str_replace('\\*', '.*', preg_quote($key, '#')); 388 foreach (array_keys(Cache::$local) as $key)text.php https://github.com/popovag/kohana_core.git | PHP | 469 lines
1<?php defined('SYSPATH') or die('No direct access allowed.'); 2/** 8 * @copyright (c) 2007-2008 Kohana Team 9 * @license http://kohanaphp.com/license 10 */ 222 { 223 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 224 } 342 // Replace each email with an encoded mailto 343 $text = preg_replace('!\b'.preg_quote($match).'\b!', HTML::mailto($match), $text); 344 } 351 * Automatically applies "p" and "br" markup to text. 352 * Basically [nl2br](http://php.net/nl2br) on steroids. 353 * 408 * Returns human readable sizes. Based on original functions written by 409 * [Aidan Lister](http://aidanlister.com/repos/v/function.size_readable.php) 410 * and [Quentin Zervaas](http://www.phpriot.com/d/code/strings/filesize-format/).text.php https://github.com/iqwebgroup/Kohana-Framework.git | PHP | 410 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 4 * 5 * $Id: text.php 4134 2009-03-28 04:37:54Z zombor $ 6 * 9 * @copyright (c) 2007-2008 Kohana Team 10 * @license http://kohanaphp.com/license.html 11 */ 189 { 190 $badwords[$key] = str_replace('\*', '\S*?', preg_quote((string) $badword)); 191 } 353 * @see Based on original functions written by: 354 * @see Aidan Lister: http://aidanlister.com/repos/v/function.size_readable.php 355 * @see Quentin Zervaas: http://www.phpriot.com/d/code/strings/filesize-format/jyamltemplatestylesheets.php https://bitbucket.org/hieblmedia/jyaml.git | PHP | 424 lines
1<?php 2/** 86 87 $regexName = preg_quote($this->name, '/'); 88 $groupRegex = '(' . $regexName . '\[)([0-9]*|dummy)(\].*)';function_cache.php https://github.com/skdswj/corpms.git | PHP | 230 lines
1<?php 2//2011.2.12 67 $findword = $find; 68 $find = preg_replace("/\\\{(\d+)\\\}/", ".{0,\\1}", preg_quote($find, '/')); 69 switch($replace) { 70 case '{BANNED}': 71 $banwords[] = preg_replace("/\\\{(\d+)\\\}/", "*", preg_quote($findword, '/')); 72 $banned[] = $find; 138function tpl_cache() { 139 //include_once(CORP_ROOT.'./source/function_cp.php'); 140 $dir = CORP_ROOT.'./cache/templates'; 192function cache_write($name, $var, $values) { 193 $cachefile = CORP_ROOT.'./cache/data_'.$name.'.php'; 194 $cachetext = "<?php\r\n". 210 global $CACHE; 211 if(!file_exists(CORP_ROOT."./cache/data_$name.php")){ 212 $cache_name = $name.'_cache';class-oembed.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 326 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 86 if ( !$regex ) { 87 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 88 $matchmask = preg_replace( '|^#http\\\://|', '#https?\://', $matchmask );WindViewTemplate.php https://gitlab.com/wuhang2003/phpwind | PHP | 224 lines
1<?php 2Wind::import('WIND:viewer.AbstractWindViewTemplate'); 28 * @author Qiong Wu <papa0924@gmail.com> 29 * @copyright ©2003-2103 phpwind.com 30 * @license http://www.windframework.com 30 * @license http://www.windframework.com 31 * @version $Id: WindViewTemplate.php 3904 2013-01-08 07:01:26Z yishuo $ 32 * @package viewer 47 48 /* (non-PHPdoc) 49 * @see AbstractWindViewTemplate::doCompile() 60 } 61 $content = preg_replace('/\?>(\s|\n)*?<\?php/i', "\r\n", $content); 62 return $content; 83 if (!$compiler || !$tag) continue; 84 if ($regex === '') $regex = '/<(' . preg_quote($tag) . ')(.*?)(\/>|>(.*?)<\/\1>)/is'; 85 $content = $this->creatTagCompiler($content, $compiler, $regex, $windViewerResolver);shortcodes.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 334 lines
1<?php 2/** 176 $tagnames = array_keys($shortcode_tags); 177 $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 178smarty_internal_compile_extends.php https://github.com/basdog22/Qool.git | PHP | 128 lines
1<?php 2 51 static $_is_stringy = array('string' => true, 'eval' => true); 52 $this->_rdl = preg_quote($compiler->smarty->right_delimiter); 53 $this->_ldl = preg_quote($compiler->smarty->left_delimiter);FullTransformer.php https://gitlab.com/TouirMohamedMarwen/Symfony2 | PHP | 355 lines
1<?php 2 180 181 $escapedPattern = preg_quote($pattern, '/'); 182ExtensionSet.php https://gitlab.com/dcnf/dcbase.org | PHP | 438 lines
1<?php 2 160 foreach ($this->functions as $pattern => $function) { 161 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 162 216 foreach ($this->filters as $pattern => $filter) { 217 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 218 341 foreach ($this->tests as $pattern => $test) { 342 $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); 343ReplaceTokens.php https://gitlab.com/Isaki/le331.fr | PHP | 475 lines
1<?php 2 22 23include_once 'phing/filters/BaseParamFilterReader.php'; 24include_once 'phing/types/TokenSource.php'; 24include_once 'phing/types/TokenSource.php'; 25include_once 'phing/filters/ChainableReader.php'; 26 175 $buffer = preg_replace_callback( 176 "/" . preg_quote($this->_beginToken, '/') . "([\w\.\-:]+?)" . preg_quote($this->_endToken, '/') . "/", 177 array($this, 'replaceTokenCallback'),LoggerTest.php https://github.com/rrehbeindoi/symfony.git | PHP | 212 lines
1<?php 2 13 14use PHPUnit\Framework\TestCase; 15use Psr\Log\LoggerInterface; 50 foreach ($given as $k => $line) { 51 self::assertThat(1 === preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[\+-][0-9]{2}:[0-9]{2} '.preg_quote($expected[$k]).'/', $line), self::isTrue(), "\"$line\" do not match expected pattern \"$expected[$k]\""); 52 } 169 'object' => new \DateTime(), 170 'resource' => fopen('php://memory', 'r'), 171 ); 194 $this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile, function ($level, $message, $context) { 195 return json_encode(array('level' => $level, 'message' => $message, 'context' => $context)).\PHP_EOL; 196 });Wildcard.php https://github.com/Shreef/zf2.git | PHP | 355 lines
1<?php 2/** 148 $prefixLength = strlen($prefix); 149 $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; 150 314 315 $matchExpression = '/^' . str_replace(array('\\?', '\\*'), array('.', '.*') , preg_quote($this->_pattern->text, '/')) . '$/'; 316 if (@preg_match('/\pL/u', 'a') == 1) {ssl-in.inc.php https://gitlab.com/Gashler/dp | PHP | 169 lines
1<?php 2/** 98 if(_ws_plugin__s2member_force_ssl_host && /* Convert port? */ _ws_plugin__s2member_force_ssl_port && _ws_plugin__s2member_force_ssl_host_port) 99 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host, "/")."(?:\:[0-9]+)?/i", "https://"._ws_plugin__s2member_force_ssl_host_port, $s); 100 110 { 111 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host_port, "/")."/i", "http://"._ws_plugin__s2member_force_ssl_host, $m[0]); 112 112 113 $s = preg_replace("/(?:https?\:)?\/\/".preg_quote(_ws_plugin__s2member_force_ssl_host, "/")."/i", "http://"._ws_plugin__s2member_force_ssl_host, $s); 114 150 151 $buffer = ($ssl_entire_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_entire_tags, "/")).")(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is", "_ws_plugin__s2member_force_ssl_buffer_callback", $buffer) : $buffer; 152 $buffer = ($ssl_attr_only_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($ssl_attr_only_tags, "/")).")(?![a-z_0-9\-])[^\>]+?\>/i", "_ws_plugin__s2member_force_ssl_buffer_callback", $buffer) : $buffer; 153 154 $buffer = ($non_ssl_entire_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_entire_tags, "/")).")(?![a-z_0-9\-])[^\>]*?\>.*?\<\/\\1\>/is", "_ws_plugin__s2member_force_non_ssl_buffer_callback", $buffer) : $buffer; 155 $buffer = ($non_ssl_attr_only_tags) ? preg_replace_callback("/\<(".implode("|", c_ws_plugin__s2member_utils_strings::preg_quote_deep($non_ssl_attr_only_tags, "/")).")(?![a-z_0-9\-])[^\>]+?\>/i", "_ws_plugin__s2member_force_non_ssl_buffer_callback", $buffer) : $buffer;TextHelper.php https://github.com/bheneka/gitta.git | PHP | 292 lines
1<?php 2 87 { 88 $pattern[] = '/('.preg_quote($word, '/').')/i'; 89 $replacement[] = $highlighter; 93 { 94 $pattern = '/('.preg_quote($phrase, '/').')/i'; 95 $replacement = $highlighter;utils-conds.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 245 lines
1<?php 2// @codingStandardsIgnoreFile 63 { 64 $bbpress = 'bbpress/bbpress.php'; // bbPress. 65 95 { 96 $buddypress = 'buddypress/bp-loader.php'; // BuddyPress. 97 109 * Determines whether or not this is a Multisite Farm; 110 * *( i.e., if ``MULTISITE_FARM == true`` inside `/wp-config.php` )*. 111 * 167 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(home_url(), PHP_URL_HOST)) === 0) 168 if($parse['path'] === '/' || preg_match('/^'.preg_quote(rtrim($parse['path'], '/'), '/').'$/'.$ci, rtrim(c_ws_plugin__s2member_utils_urls::parse_url(home_url(), PHP_URL_PATH), '/'))) 169 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s']))) 172 if(empty($parse['host']) || strcasecmp($parse['host'], c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_HOST)) === 0) 173 if($parse['path'] === '/' || preg_match('/^'.preg_quote(rtrim($parse['path'], '/'), '/').'$/'.$ci, rtrim(c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_PATH), '/'))) 174 if(get_option('permalink_structure') || (empty($_REQUEST['post_id']) && empty($_REQUEST['page_id']) && empty($_REQUEST['p']) && empty($_REQUEST['s'])))utils-dirs.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 207 lines
1<?php 2// @codingStandardsIgnoreFile 84 85 return preg_replace ("/^" . preg_quote ($doc_root, "/") . "/", "", c_ws_plugin__s2member_utils_dirs::n_dir_seps ((string)$path)); 86 } 113 114 if ($use_win_diff_drive_jctn && stripos (PHP_OS, "win") === 0 /* Test for different drives on Windows servers? */) 115 173 { 174 if ($jctn && is_string ($jctn) && $target && is_string ($target) && stripos (PHP_OS, "win") === 0) 175 {CacheItemPoolTrait.php https://bitbucket.org/ameeronline/odk-wp-appcontrol.git | PHP | 416 lines
18use phpFastCache\Core\Item\ExtendedCacheItemInterface; 19use phpFastCache\Entities\ItemBatch; 20use phpFastCache\EventManager; 20use phpFastCache\EventManager; 21use phpFastCache\Exceptions\phpFastCacheCoreException; 22use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException; 22use phpFastCache\Exceptions\phpFastCacheInvalidArgumentException; 23use phpFastCache\Exceptions\phpFastCacheLogicException; 24use phpFastCache\Util\ClassNamespaceResolverTrait; 58 * @return \phpFastCache\Core\Item\ExtendedCacheItemInterface 59 * @throws phpFastCacheInvalidArgumentException 60 * @throws phpFastCacheLogicException 72 if (preg_match('~([' . preg_quote(self::$unsupportedKeyChars, '~') . ']+)~', $key, $matches)) { 73 throw new phpFastCacheInvalidArgumentException('Unsupported key character detected: "' . $matches[ 1 ] . '". Please check: https://github.com/PHPSocialNetwork/phpfastcache/wiki/%5BV6%CB%96%5D-Unsupported-characters-in-key-identifiers'); 74 }DbDumpTest.php https://gitlab.com/mohamed_hussein/prodt | PHP | 276 lines
1<?php 2 157 // Tables that are schema-only should not have data exported. 158 $pattern = preg_quote("\$connection->insert('sessions')"); 159 $this->assertDoesNotMatchRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Tables defined as schema-only do not have data exported to the script.'); 161 // Table data is exported. 162 $pattern = preg_quote("\$connection->insert('config')"); 163 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Table data is properly exported to the script.'); 165 // The test data are in the dump (serialized). 166 $pattern = preg_quote(serialize($this->data)); 167 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'Generated data is found in the exported script.'); 170 // cspell:disable-next-line 171 $pattern = preg_quote('"q\'uote\$dollar@example.com"'); 172 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account email address was properly escaped in the exported script.'); 172 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account email address was properly escaped in the exported script.'); 173 $pattern = preg_quote('\'$dollar\''); 174 $this->assertMatchesRegularExpression('/' . $pattern . '/', $command_tester->getDisplay(), 'The user account name was properly escaped in the exported script.');form.php https://gitlab.com/asun89/socianovation-web | PHP | 285 lines
1<?php 2namespace Grav\Plugin; 277 foreach ((array)$haystack as $item) { 278 if (true == preg_match("#^" . strtr(preg_quote($item, '#'), array('\*' => '.*', '\?' => '.')) . "$#i", $needle)) { 279 return true;User_agent.php https://github.com/usagi-project/mynets1.git | PHP | 500 lines
1<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 4.3.2 or newer 6 * 159 { 160 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 161 { 183 { 184 if (preg_match("|".preg_quote($key).".*?([0-9\.]+)|i", $this->agent, $match)) 185 { 210 { 211 if (preg_match("|".preg_quote($key)."|i", $this->agent)) 212 {str.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2013 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 99 { 100 return (bool) preg_match('/^'.preg_quote($start, '/').'/m'.($ignore_case ? 'i' : ''), $str); 101 } 112 { 113 return (bool) preg_match('/'.preg_quote($end, '/').'$/m'.($ignore_case ? 'i' : ''), $str); 114 }str.php https://bitbucket.org/sriedel/iccrm-wip.git | PHP | 416 lines
1<?php 2/** 9 * @copyright 2010 - 2012 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 17 * 18 * PHP needs to be compiled with --enable-mbstring 19 * or a fallback without encoding support is used 99 { 100 return (bool) preg_match('/^'.preg_quote($start, '/').'/m'.($ignore_case ? 'i' : ''), $str); 101 } 112 { 113 return (bool) preg_match('/'.preg_quote($end, '/').'$/m'.($ignore_case ? 'i' : ''), $str); 114 }class-oembed.php https://github.com/muskmelon/Greemo.git | PHP | 295 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see it's PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 77 if ( !$regex ) 78 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 79vc_grid_element.php https://gitlab.com/oxidigitaluser/liguelista | PHP | 274 lines
1<?php 2 44 foreach ($attributes as $attr) { 45 $pattern[] = '/\{\{' . preg_quote($attr, '') . '\}\}/'; 46 $replacement[] = $this->attribute($attr, $post);File.php https://github.com/rogerwu99/punch_bantana.git | PHP | 465 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 293 require_once 'Zend/CodeGenerator/Php/Exception.php'; 294 throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class'); 295 } 391 if (preg_match('#(?:\s*)<\?php#', $this->getBody()) == false) { 392 $output = '<?php' . PHP_EOL; 393 } 457 if ($this->_filename == '' || !is_writable(dirname($this->_filename))) { 458 require_once 'Zend/CodeGenerator/Php/Exception.php'; 459 throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');SpecialAllmessages.php https://github.com/daevid/MWFork.git | PHP | 441 lines
1<?php 2/** 130 $this->displayPrefix = $prefix->getDBkey(); 131 $this->prefix = '/^' . preg_quote( $this->displayPrefix ) . '/i'; 132 } else {url.php https://github.com/jongwook/ksa14-kohana.git | PHP | 194 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2/** 21 * 22 * // Absolute URL path with host, https protocol and index.php if set 23 * echo URL::base('https', TRUE); 53 // Use the configured default protocol 54 $protocol = parse_url($base_url, PHP_URL_SCHEME); 55 } 64 { 65 if ($port = parse_url($base_url, PHP_URL_PORT)) 66 { 70 71 if ($domain = parse_url($base_url, PHP_URL_HOST)) 72 { 73 // Remove everything but the path from the URL 74 $base_url = parse_url($base_url, PHP_URL_PATH); 75 }smarty_internal_resource_extends.php https://github.com/lewellyn/TrellisDesk.git | PHP | 162 lines
1<?php 2/** 41 $s = Smarty_Resource::source(null, $source->smarty, $component); 42 if ($s->type == 'php') { 43 throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type"); 89 $this->mbstring_overload = ini_get('mbstring.func_overload') & 2; 90 $_rdl = preg_quote($source->smarty->right_delimiter); 91 $_ldl = preg_quote($source->smarty->left_delimiter);Io.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 172 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {Io.php https://github.com/rgranadino/magento-mirror.git | PHP | 172 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {upgrade.php https://github.com/aolley/moodle-mod_dialogue.git | PHP | 194 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 54 55 $base = preg_quote($CFG->wwwroot,"/"); 56 84 $filerecord = array('contextid'=>$modcontext->id, 'component'=>'mod_dialogue', 'filearea'=>'entry', 'itemid'=>$entry->id); 85 $search="|$CFG->wwwroot/file.php(\?file=)?/$entry->course(/[^\s'\"&\?#]+)|"; 86 if (preg_match_all($search, $entry->text, $matches)) {plain.class.php https://github.com/godber/PHXdata-Website.git | PHP | 328 lines
1<?php 2/** 179 foreach ($users as $user) { 180 if (isset($this->users[$user])) $deleted[] = preg_quote($user,'/'); 181 } 321 foreach ($filter as $item => $pattern) { 322// $this->_pattern[$item] = '/'.preg_quote($pattern,"/").'/i'; // don't allow regex characters 323 $this->_pattern[$item] = '/'.str_replace('/','\/',$pattern).'/i'; // allow regex charactersclass-oembed.php https://github.com/vidor/vidor.me.git | PHP | 295 lines
1<?php 2/** 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). 32 $this->providers = apply_filters( 'oembed_providers', array( 77 if ( !$regex ) 78 $matchmask = '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $matchmask ), '#' ) ) . '#i'; 79DebuggerTest.php https://github.com/gustavor/lore.git | PHP | 431 lines
4 * 5 * PHP 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @link http://cakephp.org CakePHP Project 15 * @package Cake.Test.Case.Utility 15 * @package Cake.Test.Case.Utility 16 * @since CakePHP(tm) v 1.2.0.5432 17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 73 $debugger = new Debugger(); 74 $this->assertEqual(ini_get('docref_root'), 'http://php.net/'); 75 }admin_relogin.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 127 lines
1<?php 2 39 nv_insert_logs( NV_LANG_DATA, "login", "[" . $nv_username . "] " . strtolower( $lang_global['loginsubmit'] ), " Client IP:" . NV_CLIENT_IP, 0 ); 40 require_once ( NV_ROOTDIR . '/' . DIR_FORUM . '/nukeviet/login.php' ); 41 } 77 $nohttp_redirect = preg_replace( array( '/^[a-zA-Z]+\:\/\//e', '/www\./e' ), array( '', '' ), $redirect ); 78 if ( ! preg_match( "/^" . preg_quote( $server_name ) . '\/' . preg_quote( NV_ADMINDIR ) . "/", $nohttp_redirect ) ) 79 { 119 $xtpl->parse( 'main' ); 120 include ( NV_ROOTDIR . "/includes/header.php" ); 121 $xtpl->out( 'main' ); 121 $xtpl->out( 'main' ); 122 include ( NV_ROOTDIR . "/includes/footer.php" ); 123 }File.php https://github.com/Riges/KawaiViewModel.git | PHP | 468 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31require_once 'Zend/CodeGenerator/Php/Class.php'; 32 38 */ 39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract 40{ 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 113 if ( ($realpath = Zend_Reflection_File::findRealpathInIncludePath($filePath)) === false) { 114 require_once 'Zend/CodeGenerator/Php/Exception.php'; 115 throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');ServerTest.php https://gitlab.com/techniconline/kmc | PHP | 279 lines
1<?php namespace League\OAuth1\Client\Tests; 2/** 22use Mockery as m; 23use PHPUnit_Framework_TestCase; 24 24 25class ServerTest extends PHPUnit_Framework_TestCase 26{ 33 { 34 require_once __DIR__.'/stubs/ServerStub.php'; 35 } 90 // We'll validate that here. 91 $pattern = '/OAuth oauth_consumer_key=".*?", oauth_nonce="[a-zA-Z0-9]+", oauth_signature_method="HMAC-SHA1", oauth_timestamp="\d{10}", oauth_version="1.0", oauth_callback="'.preg_quote('http%3A%2F%2Fapp.dev%2F', '/').'", oauth_signature=".*?"/'; 92RouteCompiler.php https://github.com/ivebeenlinuxed/Boiler.git | PHP | 233 lines
1<?php 2 34 * @throws \LogicException If a variable is referenced more than once 35 * @throws \DomainException If a variable name is numeric because PHP raises an error for such 36 * subpatterns in PCRE and thus would break matching, e.g. "(?P<123>.+)". 127 '[^%s%s]+', 128 preg_quote($defaultSeparator, self::REGEX_DELIMITER), 129 $defaultSeparator !== $nextSeparator && '' !== $nextSeparator ? preg_quote($nextSeparator, self::REGEX_DELIMITER) : '' 149 // find the first optional token 150 $firstOptional = PHP_INT_MAX; 151 if (!$isHost) { 208 // Text tokens 209 return preg_quote($token[1], self::REGEX_DELIMITER); 210 } else { 213 // When the only token is an optional variable token, the separator is required 214 return sprintf('%s(?P<%s>%s)?', preg_quote($token[1], self::REGEX_DELIMITER), $token[3], $token[2]); 215 } else {CakeRoute.php https://bitbucket.org/luobailiang/cake.git | PHP | 506 lines
1<?php 2/** 8 * 9 * PHP5 10 * 10 * 11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 12 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 17 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) 18 * @link http://cakephp.org CakePHP(tm) Project 19 * @package Cake.Routing.Route 19 * @package Cake.Routing.Route 20 * @since CakePHP(tm) v 1.3 21 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 129 $names = $routeParams = array(); 130 $parsed = preg_quote($this->template, '#'); 131File.php https://github.com/grandison/budo16.git | PHP | 465 lines
25 */ 26// require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31// require_once 'Zend/CodeGenerator/Php/Class.php'; 32 38 */ 39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract 40{ 86 if ($fileName == '') { 87 // require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 113 if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) { 114 // require_once 'Zend/CodeGenerator/Php/Exception.php'; 115 throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');sfValidatorDateTest.php https://github.com/bheneka/gitta.git | PHP | 246 lines
1<?php 2 10 11require_once(dirname(__FILE__).'/../../bootstrap/unit.php'); 12 101 $t->pass('->clean() throws a sfValidatorError if the date does not match the regex'); 102 $t->like($e->getMessage(), '/'.preg_quote(htmlspecialchars($v->getOption('date_format'), ENT_QUOTES, 'UTF-8'), '/').'/', '->clean() returns the expected date format in the error message'); 103 $t->is($e->getCode(), 'bad_format', '->clean() throws a sfValidatorError'); 113{ 114 $t->like($e->getMessage(), '/'.preg_quote('dd/mm/YYYY', '/').'/', '->clean() returns the expected date format error if provided'); 115}Io.php https://bitbucket.org/mengqing/magento-mirror.git | PHP | 172 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {auth.php https://gitlab.com/michield/dokuwiki | PHP | 358 lines
1<?php 2// must be run within Dokuwiki 194 foreach($users as $user) { 195 if(isset($this->users[$user])) $deleted[] = preg_quote($user, '/'); 196 }Str.php https://gitlab.com/kimting254/wbms | PHP | 392 lines
1<?php namespace Illuminate\Support; 2 101 { 102 $quoted = preg_quote($cap, '/'); 103 117 118 $pattern = preg_quote($pattern, '#'); 119 251 { 252 throw new RuntimeException('OpenSSL extension is required for PHP 5 users.'); 253 } 319 320 $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); 321 322 // Remove all characters that are not the separator, letters, numbers, or whitespace. 323 $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); 324testwalkthrough.php https://github.com/DeanLennard/Moodle-Question-Engine-2.git | PHP | 291 lines
1<?php 2 30 31require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 32require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php'); 62 $this->quba->get_right_answer_summary($this->slot)); 63 $this->assertPattern('/' . preg_quote($mc->questiontext) . '/', 64 $this->quba->get_question_summary($this->slot)); 117 $this->get_contains_partcorrect_expectation(), 118 new PatternExpectation('/' . preg_quote('Not good enough!') . '/')); 119 184 $this->get_contains_partcorrect_expectation(), 185 new PatternExpectation('/' . preg_quote('Not good enough!') . '/')); 186 }testwalkthrough.php https://github.com/kpike/moodle.git | PHP | 194 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 29 30require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 31require_once(dirname(__FILE__) . '/../../../engine/simpletest/helpers.php'); 127 $this->get_contains_mark_summary(1), 128 new PatternExpectation('/' . preg_quote('Not good enough!') . '/')); 129Io.php https://github.com/ticean/magento-mirror.git | PHP | 172 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 66 67 if (preg_match('#^' . preg_quote(DS, '#').'#', $this->getVar('path')) || 68 preg_match('#^[a-z]:' . preg_quote(DS, '#') . '#i', $this->getVar('path'))) {FileStorage.php https://gitlab.com/mohamed_hussein/prodt | PHP | 372 lines
1<?php 2 220 221 // glob() directly calls into libc glob(), which is not aware of PHP stream 222 // wrappers. Same for \GlobIterator (which additionally requires an absolute 227 $names = []; 228 $pattern = '/^' . preg_quote($prefix, '/') . '.*' . preg_quote($extension, '/') . '$/'; 229 foreach ($files as $file) { 315 $collections = []; 316 $pattern = '/\.' . preg_quote($this->getFileExtension(), '/') . '$/'; 317 foreach (new \DirectoryIterator($directory) as $fileinfo) {Cli.php https://github.com/soitun/minify.git | PHP | 392 lines
1<?php 2 18 * @author Steve Clay <steve@mrclay.org> 19 * @license http://www.opensource.org/licenses/mit-license.php MIT License 20 */ 189 // first look for -ovalue or -o=value 190 $pattern = "/^-{$letter}=?" . preg_quote($v, '/') . "$/"; 191 $foundInArgv = false;File.php https://gitlab.com/devtoannh/cafe | PHP | 468 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31require_once 'Zend/CodeGenerator/Php/Class.php'; 32 38 */ 39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract 40{ 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 113 if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) { 114 require_once 'Zend/CodeGenerator/Php/Exception.php'; 115 throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');URI.php https://github.com/bostonphp/Framework-Bakeoff-2011.git | PHP | 583 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 188 { 189 // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards 190 // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern 190 // compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern 191 if ( ! preg_match("|^[".str_replace(array('\\-', '\-'), '-', preg_quote($this->config->item('permitted_uri_chars'), '-'))."]+$|i", $str)) 192 { 215 { 216 $this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string); 217 } 581 582/* End of file URI.php */ 583/* Location: ./system/core/URI.php */sql.php https://github.com/kpike/moodle.git | PHP | 277 lines
1<?php 2 4 * SQL.PHP 5 * This file is include from view.php and print.php 6 * @copyright 2003 181 } 182 $searchterm = preg_quote($searchterm, '|'); 183 $searchcond[] = "$concat $REGEXP :ss$i"; 190 } 191 $searchterm = preg_quote($searchterm, '|'); 192 $searchcond[] = "$concat $NOTREGEXP :ss$i";CascadingStylesheetsTest.php https://bitbucket.org/aswinvk28/smartpan-stock-drupal.git | PHP | 191 lines
1<?php 2 143 // of a STYLE tag. 144 if (preg_match_all('/(href="|url\(")' . preg_quote($GLOBALS['base_url'] . '/', '/') . '([^?]+)\?/', $styles, $matches)) { 145 $result = $matches[2];class.Search.php https://github.com/otto-torino/gino.git | PHP | 203 lines
1<?php 2/** 2/** 3 * @file class.Search.php 4 * @brief Contiene la definizione ed implementazione della classe Gino.Search 5 * 6 * @copyright 2005-2014 Otto srl (http://www.opensource.org/licenses/mit-license.php) The MIT License 7 * @author marco guidotti guidottim@gmail.com 32 * 33 * @copyright 2005-2014 Otto srl (http://www.opensource.org/licenses/mit-license.php) The MIT License 34 * @author marco guidotti guidottim@gmail.com 70 71 $clean_string = preg_quote($clean_string); 72ldap.php https://github.com/wrobel/horde-fw3.git | PHP | 268 lines
1<?php 2/** 5 * 6 * $Horde: ingo/lib/Driver/ldap.php,v 1.8.2.4 2007-12-20 14:05:47 jan Exp $ 7 * 8 * See the enclosed file LICENSE for license information (ASL). If you 9 * did not receive this file, see http://www.horde.org/licenses/asl.php. 10 * 173 * specifier. */ 174 $regexp = '/^' . preg_quote($this->_params['script_attribute'], '/') . 175 '(?:;.*)?$/i';s2member-files.php https://gitlab.com/Gashler/dp | PHP | 108 lines
1<?php 2if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"])) 5global /* A Multisite ``$base`` configuration? */ $base; 6$ws_plugin__s2member_temp_s_base = (!empty ($base)) ? $base : c_ws_plugin__s2member_utils_urls::parse_url (network_home_url ("/"), PHP_URL_PATH); 7// This works on Multisite installs too. The function ``network_home_url ()`` defaults to ``home_url ()`` on standard WordPress® installs. 20 RewriteEngine On 21 RewriteBase <?php echo $ws_plugin__s2member_temp_s_base . "\n"; ?> 22 28 RewriteCond %{ENV:s2member_file_download_wp_vdir_check} !^complete$ 29 RewriteCond %{THE_REQUEST} ^(?:GET|HEAD)(?:[\ ]+)(?:<?php echo preg_quote ($ws_plugin__s2member_temp_s_base, " "); ?>)([_0-9a-zA-Z\-]+/)(?:wp-content/) 30 RewriteRule ^(.*)$ - [E=s2member_file_download_wp_vdir:,E=s2member_file_download_wp_vdir:%1,E=s2member_file_download_wp_vdir_check:complete] 107 108<?php unset ($ws_plugin__s2member_temp_s_base); ?>date.php https://bitbucket.org/codeyash/bootstrap.git | PHP | 404 lines
1<?php 2/** 9 * @copyright 2010 - 2013 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 23 * @category Core 24 * @link http://docs.fuelphp.com/classes/date.html 25 * 28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers 29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php 30 */ 85 86 $rexep = "#" . strtr(preg_quote($format), $masks) . "#"; 87 112 * @param int UNIX timestamp from current server 113 * @param string valid PHP timezone from www.php.net/timezones 114 * @return DateCookie.php https://github.com/lostechies/wordpress.git | PHP | 526 lines
1<?php 2 306 307 return (bool) preg_match(sprintf('/\b%s$/i', preg_quote($this->domain)), $domain); 308 }date.php https://bitbucket.org/sriedel/iccrm-wip.git | PHP | 404 lines
1<?php 2/** 9 * @copyright 2010 - 2012 Fuel Development Team 10 * @link http://fuelphp.com 11 */ 23 * @category Core 24 * @link http://docs.fuelphp.com/classes/date.html 25 * 28 * - create_time() uses strptime and has currently a very bad hack to use strtotime for windows servers 29 * - Uses strftime formatting for dates www.php.net/manual/en/function.strftime.php 30 */ 85 86 $rexep = "#" . strtr(preg_quote($format), $masks) . "#"; 87 112 * @param int UNIX timestamp from current server 113 * @param string valid PHP timezone from www.php.net/timezones 114 * @return Datefunctions.php https://gitlab.com/florianocomercial/centreon | PHP | 245 lines
1<?php 2/** 21function getTemplate($dir) { 22 require_once '../../../GPL_LIB/Smarty/libs/Smarty.class.php'; 23 $template = new Smarty(); 105 } 106 if (preg_match('~' . preg_quote($delimiter, '~') . '\s*$~iS', end($query)) === 1) { 107 $query = trim(implode('', $query));Config.php https://gitlab.com/yousafsyed/easternglamor | PHP | 240 lines
1<?php 2/** 102 * @param array $data 103 * @SuppressWarnings(PHPMD.ExcessiveParameterList) 104 */ 169 170 $config->setData('directives_url_quoted', preg_quote($config->getData('directives_url'))); 171smarty_internal_resource_extends.php https://github.com/kiang/olc_baker.git | PHP | 178 lines
1<?php 2 20 $this->smarty = $smarty; 21 $this->_rdl = preg_quote($smarty->right_delimiter); 22 $this->_ldl = preg_quote($smarty->left_delimiter); 175 176 return $_compile_dir . $_filepath . '.' . $_template->resource_type . '.' . basename($_files[count($_files)-1]) . $_cache . '.php'; 177 }HistoryCommand.php https://gitlab.com/techniconline/kmc | PHP | 260 lines
1<?php 2 93 if (substr($pattern, 0, 1) !== '/' || substr($pattern, -1) !== '/' || strlen($pattern) < 3) { 94 $pattern = '/' . preg_quote($pattern, '/') . '/'; 95 } 125 $output->writeln(sprintf('Saving history in %s...', $save)); 126 file_put_contents($save, implode(PHP_EOL, $history) . PHP_EOL); 127 $output->writeln('<info>History saved.</info>'); 164 $start = $matches[1] ? intval($matches[1]) : 0; 165 $end = $matches[2] ? intval($matches[2]) + 1 : PHP_INT_MAX; 166Dispatcher.php https://github.com/ochoto/framework-benchs.git | PHP | 193 lines
1<?php 2/** 2/** 3 * Lithium: the most rad php framework 4 * 5 * @copyright Copyright 2010, Union of RAD (http://union-of-rad.org) 6 * @license http://opensource.org/licenses/bsd-license.php The BSD License 7 */ 181 $match = preg_replace('/\{:\w+\}/', '@', $v); 182 $match = preg_replace('/@/', '.+', preg_quote($match, '/')); 183pages-sp.inc.php https://gitlab.com/pankajmohale/chef2go | PHP | 113 lines
1<?php 2// @codingStandardsIgnoreFile 59 60 else if($GLOBALS['WS_PLUGIN__']['s2member']['o']['login_redirection_override'] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri($user, 'root-returns-false')) && preg_match('/^'.preg_quote($login_redirection_uri, '/').'$/'.$ci, $page_uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level0')) && $page->ID !== (int)$GLOBALS['WS_PLUGIN__']['s2member']['o']['membership_options_page']) 61 return apply_filters('ws_plugin__s2member_check_specific_page_level_access', array('s2member_level_req' => 0), get_defined_vars()); 94 foreach(preg_split('/['."\r\n\t".']+/', c_ws_plugin__s2member_ruris::fill_ruri_level_access_rc_vars($GLOBALS['WS_PLUGIN__']['s2member']['o']['level'.$n.'_ruris'], $user)) as $str) 95 if($str && preg_match('/'.preg_quote($str, '/').'/'.$ci, $page_uri) && (!$check_user || !$user || !$user->has_cap('access_s2member_level'.$n))) 96 return apply_filters('ws_plugin__s2member_check_specific_page_level_access', array('s2member_level_req' => $n), get_defined_vars());User_agent.php https://gitlab.com/ricoru21/py_incidencia | PHP | 549 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 86 { 87 if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php')) 88 { 88 { 89 include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'); 90 } 90 } 91 elseif (is_file(APPPATH.'config/user_agents.php')) 92 { 92 { 93 include(APPPATH.'config/user_agents.php'); 94 }Config.php https://github.com/sauger/forbes_old.git | PHP | 535 lines
1<?php 2/* 22 */ 23require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php"; 24/** 26 */ 27require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php"; 28/** 30 */ 31require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php"; 32/** 34 */ 35require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php"; 36 254 $folderRegex = strtr($folderRegex, array("?" => "__QMK__", "*" => "__AST__", "|" => "__PIP__")); 255 $folderRegex = preg_quote($folderRegex, "/"); 256 $folderRegex = strtr($folderRegex, array("__QMK__" => ".", "__AST__" => ".*", "__PIP__" => "|"));sql_parse.php https://github.com/cpg-contrib/coppermine.git | PHP | 174 lines
1<?php 2/************************* 19/** 20 * sql_parse.php 21 * ------------------- 22 * begin : Thu May 31, 2001 23 * copyright : (C) 2001 The phpBB Group 24 * email : support@phpbb.com 38 * however in order to make these functions available elsewhere, specifically 39 * in the installation phase of phpBB I have seperated out a couple of 40 * functions into this file. JLH 56 for($i = 0; $i < $linecount; $i++) { 57 if (preg_match("/^\/\*/", preg_quote($lines[$i]))) { 58 $in_comment = true; 64 65 if (preg_match("/\*\/$/", preg_quote($lines[$i]))) { 66 $in_comment = false;lib.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 203 lines
1<?php 2 25 */ 26require_once($CFG->dirroot . '/repository/lib.php'); 27require_once($CFG->libdir.'/webdavlib.php'); 124 // Remove the server URL from the path (if present), otherwise links will not work - MDL-37014 125 $server = preg_quote($this->options['webdav_server']); 126 $v['href'] = preg_replace("#https?://{$server}#", '', $v['href']);Modifier.php https://github.com/rgranadino/magento-mirror.git | PHP | 349 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 130 if ($pos === false) { 131 $pattern = '/[`\s]' . preg_quote($column, '/') . '[`\s]/i'; 132 if (!preg_match($pattern, $sql, $matches)) {PhpConsole.php https://bitbucket.org/amila17/unituition.git | PHP | 316 lines
1<?php 2 4 * 5 * @see http://code.google.com/p/php-console 6 * @author Barbushin Sergey http://linkedin.com/in/barbushin 17 */ 18class PhpConsole { 19 24 /** 25 * @var PhpConsole 26 */ 46 if(!self::$instance) { 47 self::$instance = new PhpConsole($handleErrors, $handleExceptions, $sourceBasePath); 48 } 50 51 protected function handle(PhpConsoleEvent $event) { 52 if(self::$ignoreRepeatedEvents) {ViewBrowseTest.php https://github.com/Excito/turba.git | PHP | 186 lines
1<?php 2 2 3require_once dirname(__FILE__) . '/TestBase.php'; 4 5/** 6 * $Horde: turba/lib/tests/ViewBrowseTest.php,v 1.3.2.1 2007/12/20 14:34:31 jan Exp $ 7 * 16 parent::setUp(); 17 require_once TURBA_BASE . '/lib/Views/Browse.php'; 18 $this->setUpDatabase(); 23 { 24 require_once 'Horde/Variables.php'; 25 $vars = new Variables(); 33 $turbaConf['documents']['type'] = 'horde'; 34 include TURBA_BASE . '/config/attributes.php'; 35smarty_internal_compile_private_php.php https://gitlab.com/garabedian.kevin/web2TB | PHP | 220 lines
56 if ($_attr[ 'type' ] != 'tag') { 57 if ($compiler->php_handling == Smarty::PHP_REMOVE) { 58 return ''; 77 return ''; 78 } elseif ($compiler->php_handling == Smarty::PHP_ALLOW) { 79 if (!($compiler->smarty instanceof SmartyBC)) { 90 if (!($compiler->smarty instanceof SmartyBC)) { 91 $compiler->trigger_template_error('{php}{/php} tags not allowed. Use SmartyBC to enable them', null, 92 true); 157 if (($lex->phpType == 'php' || $lex->phpType == 'asp') && 158 ($lex->compiler->php_handling == Smarty::PHP_PASSTHRU || $lex->compiler->php_handling == Smarty::PHP_QUOTE) 159 ) { 207 /* 208 * Call back function for $php_handling = PHP_QUOTE 209 *ReleaseController.php https://gitlab.com/brucealdridge/yii2 | PHP | 211 lines
1<?php 2/** 56 { 57 $v = str_replace('\\-', '[\\- ]', preg_quote($version, '/')); 58 $headline = $version . ' ' . date('F d, Y'); 201 "function getVersion()\n {\n return '$version';", 202 YII2_PATH . '/BaseYii.php'); 203 }walkthrough_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 246 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 30global $CFG; 31require_once(dirname(__FILE__) . '/../../../engine/lib.php'); 32require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php'); 125 $this->get_contains_partcorrect_expectation(), 126 new question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 127 194 $this->get_contains_partcorrect_expectation(), 195 new question_pattern_expectation('/' . preg_quote('Not good enough!', '/') . '/')); 196 }Modifier.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 349 lines
1<?php 2/** 9 * It is also available through the world-wide-web at this URL: 10 * http://opensource.org/licenses/osl-3.0.php 11 * If you did not receive a copy of the license and are unable to 23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 130 if ($pos === false) { 131 $pattern = '/[`\s]' . preg_quote($column, '/') . '[`\s]/i'; 132 if (!preg_match($pattern, $sql, $matches)) {Main.php https://github.com/diar/foodfood.ru.git | PHP | 309 lines
1<?php 2/** 13 * 14 * @version 1.x $Id: Main.php 168 2007-01-30 21:12:03Z dk $ 15 */ 55 $dr = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']); 56 $file = preg_replace('{^'.preg_quote($dr,'{}').'}is', '~', $file); 57 } 200 } 201 $buf = str_replace("\x00", " ", $buf); // PHP5 private methods contain \x00 in names 202 if ($no_print) return $buf;shortcodes.php https://github.com/kronda/kronda.git | PHP | 420 lines
1<?php 2 94 $tagnames = array_keys( $this->shortcode_tags ); 95 $tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) ); 96 237 public function has_option( $opt ) { 238 $pattern = sprintf( '/^%s(:.+)?$/i', preg_quote( $opt, '/' ) ); 239 return (bool) preg_grep( $pattern, $this->options ); 255 256 $pattern = sprintf( '/^%s:%s$/i', preg_quote( $opt, '/' ), $pattern ); 257Text.php https://github.com/Nerutiz/trades.git | PHP | 213 lines
1<?php 2 20 $blanks = array_fill(0, $length, ' '); 21 return preg_replace('%' . preg_quote($to_blank, '%') . '%', implode($blanks), $string, 1); 22 }RouteCompiler.php https://github.com/l3l0/BehatExamples.git | PHP | 235 lines
1<?php 2 63 64 $this->regex = "#^".implode("", $this->segments)."".preg_quote($separator, '#')."$#x"; 65 202 203 $this->segments[] = preg_quote($separator, '#').preg_quote($text, '#'); 204 } 211 212 $this->segments[] = preg_quote($separator, '#').'(?P<'.$variable.'>'.$requirement.')'; 213 $this->variables[$variable] = $name; 228 // compute some regexes 229 $quoter = function ($a) { return preg_quote($a, '#'); }; 230 $options['segment_separators_regex'] = '(?:'.implode('|', array_map($quoter, $options['segment_separators'])).')';route.php https://github.com/ymtn/core.git | PHP | 589 lines
1<?php defined('SYSPATH') or die('No direct script access.'); 2/** 222 // The URI should be considered literal except for keys and optional parts 223 // Escape everything preg_quote would escape except for : ( ) < > 224 $expression = preg_replace('#'.Route::REGEX_ESCAPE.'#', '\\\\$0', $uri); 288 * The $uri parameter can either be a string for basic regex matching or it 289 * can be a valid callback or anonymous function (php 5.3+). If you use a 290 * callback or anonymous function, your method should return an arrayApacheMatcherDumper.php https://bitbucket.org/helfreire/tccsite.git | PHP | 274 lines
1<?php 2 28 * 29 * * script_name: The script name (app.php by default) 30 * * base_uri: The base URI ("" by default) 40 $options = array_merge(array( 41 'script_name' => 'app.php', 42 'base_uri' => '', 121 $regex = $this->regexToApacheRegex($compiledRoute->getRegex()); 122 $regex = '^'.self::escape(preg_quote($options['base_uri']).substr($regex, 1), ' ', '\\'); 123mdl.tmpimage.php http://phpfor.googlecode.com/svn/trunk/ | PHP | 197 lines
1<?php 2include_once('shopObject.php'); 97 $p = strrpos($sName,'.'); 98 $re = '/^'.preg_quote(substr($sName,0,$p)).'\.bak_([0-9]+)\.'.preg_quote(substr($sName,$p+1)).'$/'; 99subscription.php https://gitlab.com/billyprice1/bdApi | PHP | 357 lines
1<?php 2 166 $wfPostLink = get_permalink($postSyncRecord->sync_id); 167 $postContent = preg_replace('#<a href="' . preg_quote($wfPostLink, '#') . '"[^>]*>[^<]+</a>$#', '', $postContent); 168 340 // request to something else, not our callback, bye bye 341 // we don't check $_REQUEST because PHP parser got confused when 342 // the POST data is JSON and may work unreliably here 345 346 $raw = file_get_contents('php://input'); 347 $json = @json_decode($raw, true);