Skip to content
This repository
Browse code

Merge branch 'master' into 2.3

Conflicts:
	lib/Cake/Event/CakeEventManager.php
	lib/Cake/VERSION.txt
	lib/Cake/View/ViewBlock.php
  • Loading branch information...
commit 1aea9ac0c958a65f6c4fbb5c3bcfa0894a22b7c3 2 parents 41ae19b + f6c5ceb
Mark Story markstory authored
4 lib/Cake/Console/Templates/skel/Config/bootstrap.php
@@ -98,11 +98,11 @@
98 98 App::uses('CakeLog', 'Log');
99 99 CakeLog::config('debug', array(
100 100 'engine' => 'FileLog',
101   - 'scopes' => array('notice', 'info', 'debug'),
  101 + 'types' => array('notice', 'info', 'debug'),
102 102 'file' => 'debug',
103 103 ));
104 104 CakeLog::config('error', array(
105 105 'engine' => 'FileLog',
106   - 'scopes' => array('warning', 'error', 'critical', 'alert', 'emergency'),
  106 + 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'),
107 107 'file' => 'error',
108 108 ));
2  lib/Cake/Model/Behavior/TreeBehavior.php
@@ -179,7 +179,7 @@ public function beforeSave(Model $Model) {
179 179 extract($this->settings[$Model->alias]);
180 180
181 181 $this->_addToWhitelist($Model, array($left, $right));
182   - if (!$Model->id) {
  182 + if (!$Model->id || !$Model->exists()) {
183 183 if (array_key_exists($parent, $Model->data[$Model->alias]) && $Model->data[$Model->alias][$parent]) {
184 184 $parentNode = $Model->find('first', array(
185 185 'conditions' => array($scope, $Model->escapeField() => $Model->data[$Model->alias][$parent]),
12 lib/Cake/Model/Datasource/DboSource.php
@@ -921,14 +921,14 @@ public function logQuery($sql, $params = array()) {
921 921 $this->_queriesCnt++;
922 922 $this->_queriesTime += $this->took;
923 923 $this->_queriesLog[] = array(
924   - 'query' => $sql,
925   - 'params' => $params,
926   - 'affected' => $this->affected,
927   - 'numRows' => $this->numRows,
928   - 'took' => $this->took
  924 + 'query' => $sql,
  925 + 'params' => $params,
  926 + 'affected' => $this->affected,
  927 + 'numRows' => $this->numRows,
  928 + 'took' => $this->took
929 929 );
930 930 if (count($this->_queriesLog) > $this->_queriesLogMax) {
931   - array_pop($this->_queriesLog);
  931 + array_shift($this->_queriesLog);
932 932 }
933 933 }
934 934
6 lib/Cake/Model/Model.php
@@ -1093,7 +1093,7 @@ protected function _generateAssociation($type, $assocKey) {
1093 1093 }
1094 1094
1095 1095 /**
1096   - * Sets a custom table for your controller class. Used by your controller to select a database table.
  1096 + * Sets a custom table for your model class. Used by your controller to select a database table.
1097 1097 *
1098 1098 * @param string $tableName Name of the custom table
1099 1099 * @throws MissingTableException when database table $tableName is not found on data source
@@ -2760,8 +2760,8 @@ protected function _findCount($state, $query, $results = array()) {
2760 2760 } elseif ($state === 'after') {
2761 2761 foreach (array(0, $this->alias) as $key) {
2762 2762 if (isset($results[0][$key]['count'])) {
2763   - if (($count = count($results)) > 1) {
2764   - return $count;
  2763 + if ($query['group']) {
  2764 + return count($results);
2765 2765 } else {
2766 2766 return intval($results[0][$key]['count']);
2767 2767 }
2  lib/Cake/Model/Validator/CakeValidationSet.php
@@ -280,7 +280,7 @@ protected function _processValidationResponse($name, $rule) {
280 280 $message = __d($this->_validationDomain, $name);
281 281 }
282 282 } else {
283   - $message = __d('cake_dev', 'This field cannot be left blank');
  283 + $message = __d('cake', 'This field cannot be left blank');
284 284 }
285 285
286 286 return $message;
6 lib/Cake/Network/CakeRequest.php
@@ -229,8 +229,10 @@ protected function _processGet() {
229 229 protected function _url() {
230 230 if (!empty($_SERVER['PATH_INFO'])) {
231 231 return $_SERVER['PATH_INFO'];
232   - } elseif (isset($_SERVER['REQUEST_URI'])) {
  232 + } elseif (isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], '://') === false) {
233 233 $uri = $_SERVER['REQUEST_URI'];
  234 + } elseif (isset($_SERVER['REQUEST_URI'])) {
  235 + $uri = substr($_SERVER['REQUEST_URI'], strlen(FULL_BASE_URL));
234 236 } elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {
235 237 $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);
236 238 } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
@@ -319,7 +321,7 @@ protected function _base() {
319 321 protected function _processFiles() {
320 322 if (isset($_FILES) && is_array($_FILES)) {
321 323 foreach ($_FILES as $name => $data) {
322   - if ($name != 'data') {
  324 + if ($name !== 'data') {
323 325 $this->params['form'][$name] = $data;
324 326 }
325 327 }
2  lib/Cake/Routing/Router.php
@@ -651,7 +651,7 @@ public static function getRequest($current = false) {
651 651 * @return array Parameter information
652 652 */
653 653 public static function getParams($current = false) {
654   - if ($current) {
  654 + if ($current && self::$_requests) {
655 655 return self::$_requests[count(self::$_requests) - 1]->params;
656 656 }
657 657 if (isset(self::$_requests[0])) {
22 lib/Cake/Test/Case/Event/CakeEventManagerTest.php
@@ -234,6 +234,10 @@ public function testDispatchWithKeyName() {
234 234 * @return void
235 235 */
236 236 public function testDispatchReturnValue() {
  237 + $this->skipIf(
  238 + version_compare(PHPUnit_Runner_Version::VERSION, '3.7', '<'),
  239 + 'These tests fail in PHPUnit 3.6'
  240 + );
237 241 $manager = new CakeEventManager;
238 242 $listener = $this->getMock('CakeEventTestListener');
239 243 $anotherListener = $this->getMock('CakeEventTestListener');
@@ -241,11 +245,12 @@ public function testDispatchReturnValue() {
241 245 $manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
242 246 $event = new CakeEvent('fake.event');
243 247
244   - $firstStep = clone $event;
245 248 $listener->expects($this->at(0))->method('listenerFunction')
246   - ->with($firstStep)
  249 + ->with($event)
247 250 ->will($this->returnValue('something special'));
248   - $anotherListener->expects($this->at(0))->method('listenerFunction')->with($event);
  251 + $anotherListener->expects($this->at(0))
  252 + ->method('listenerFunction')
  253 + ->with($event);
249 254 $manager->dispatch($event);
250 255 $this->assertEquals('something special', $event->result);
251 256 }
@@ -256,6 +261,11 @@ public function testDispatchReturnValue() {
256 261 * @return void
257 262 */
258 263 public function testDispatchFalseStopsEvent() {
  264 + $this->skipIf(
  265 + version_compare(PHPUnit_Runner_Version::id(), '3.7', '<'),
  266 + 'These tests fail in PHPUnit 3.6'
  267 + );
  268 +
259 269 $manager = new CakeEventManager;
260 270 $listener = $this->getMock('CakeEventTestListener');
261 271 $anotherListener = $this->getMock('CakeEventTestListener');
@@ -263,11 +273,11 @@ public function testDispatchFalseStopsEvent() {
263 273 $manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
264 274 $event = new CakeEvent('fake.event');
265 275
266   - $originalEvent = clone $event;
267 276 $listener->expects($this->at(0))->method('listenerFunction')
268   - ->with($originalEvent)
  277 + ->with($event)
269 278 ->will($this->returnValue(false));
270   - $anotherListener->expects($this->never())->method('listenerFunction');
  279 + $anotherListener->expects($this->never())
  280 + ->method('listenerFunction');
271 281 $manager->dispatch($event);
272 282 $this->assertTrue($event->isStopped());
273 283 }
32 lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php
@@ -355,8 +355,6 @@ public function testAddMiddle() {
355 355 $this->assertSame($expected, $result);
356 356
357 357 $laterCount = $this->Tree->find('count');
358   -
359   - $laterCount = $this->Tree->find('count');
360 358 $this->assertEquals($initialCount + 1, $laterCount);
361 359
362 360 $children = $this->Tree->children($data[$modelClass]['id'], true, array('name'));
@@ -370,6 +368,36 @@ public function testAddMiddle() {
370 368 }
371 369
372 370 /**
  371 + * testAddWithPreSpecifiedId method
  372 + *
  373 + * @return void
  374 + */
  375 + public function testAddWithPreSpecifiedId() {
  376 + extract($this->settings);
  377 + $this->Tree = new $modelClass();
  378 + $this->Tree->initialize(2, 2);
  379 +
  380 + $data = $this->Tree->find('first', array(
  381 + 'fields' => array('id'),
  382 + 'conditions' => array($modelClass . '.name' => '1.1')
  383 + ));
  384 +
  385 + $this->Tree->create();
  386 + $result = $this->Tree->save(array($modelClass => array(
  387 + 'id' => 100,
  388 + 'name' => 'testAddMiddle',
  389 + $parentField => $data[$modelClass]['id'])
  390 + ));
  391 + $expected = array_merge(
  392 + array($modelClass => array('id' => 100, 'name' => 'testAddMiddle', $parentField => '2')),
  393 + $result
  394 + );
  395 + $this->assertSame($expected, $result);
  396 +
  397 + $this->assertTrue($this->Tree->verify());
  398 + }
  399 +
  400 +/**
373 401 * testAddInvalid method
374 402 *
375 403 * @return void
32 lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php
@@ -21,6 +21,7 @@
21 21
22 22 App::uses('Model', 'Model');
23 23 App::uses('AppModel', 'Model');
  24 +App::uses('String', 'Utility');
24 25 require_once dirname(dirname(__FILE__)) . DS . 'models.php';
25 26
26 27 /**
@@ -57,6 +58,37 @@ class TreeBehaviorUuidTest extends CakeTestCase {
57 58 public $fixtures = array('core.uuid_tree');
58 59
59 60 /**
  61 + * testAddWithPreSpecifiedId method
  62 + *
  63 + * @return void
  64 + */
  65 + public function testAddWithPreSpecifiedId() {
  66 + extract($this->settings);
  67 + $this->Tree = new $modelClass();
  68 + $this->Tree->initialize(2, 2);
  69 +
  70 + $data = $this->Tree->find('first', array(
  71 + 'fields' => array('id'),
  72 + 'conditions' => array($modelClass . '.name' => '1.1')
  73 + ));
  74 +
  75 + $id = String::uuid();
  76 + $this->Tree->create();
  77 + $result = $this->Tree->save(array($modelClass => array(
  78 + 'id' => $id,
  79 + 'name' => 'testAddMiddle',
  80 + $parentField => $data[$modelClass]['id'])
  81 + ));
  82 + $expected = array_merge(
  83 + array($modelClass => array('id' => $id, 'name' => 'testAddMiddle', $parentField => '2')),
  84 + $result
  85 + );
  86 + $this->assertSame($expected, $result);
  87 +
  88 + $this->assertTrue($this->Tree->verify());
  89 + }
  90 +
  91 +/**
60 92 * testMovePromote method
61 93 *
62 94 * @return void
13 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -6860,6 +6860,17 @@ public function testFindCount() {
6860 6860 ));
6861 6861 $result = $Article->find('count', array('group' => array('Article.user_id')));
6862 6862 $this->assertEquals($expected, $result);
  6863 +
  6864 + $expected = count($Article->find('all', array(
  6865 + 'fields' => array('Article.user_id'),
  6866 + 'conditions' => array('Article.user_id' => 1),
  6867 + 'group' => 'Article.user_id')
  6868 + ));
  6869 + $result = $Article->find('count', array(
  6870 + 'conditions' => array('Article.user_id' => 1),
  6871 + 'group' => array('Article.user_id'),
  6872 + ));
  6873 + $this->assertEquals($expected, $result);
6863 6874 }
6864 6875
6865 6876 /**
@@ -6886,7 +6897,7 @@ public function testFindCountDistinct() {
6886 6897 $this->skipIf($this->db instanceof Sqlite, 'SELECT COUNT(DISTINCT field) is not compatible with SQLite.');
6887 6898 $this->skipIf($this->db instanceof Sqlserver, 'This test is not compatible with SQL Server.');
6888 6899
6889   - $this->loadFixtures('Project');
  6900 + $this->loadFixtures('Project', 'Thread');
6890 6901 $TestModel = new Project();
6891 6902 $TestModel->create(array('name' => 'project')) && $TestModel->save();
6892 6903 $TestModel->create(array('name' => 'project')) && $TestModel->save();
42 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -588,6 +588,24 @@ public function testFilesParsing() {
588 588 }
589 589
590 590 /**
  591 + * Test that files in the 0th index work.
  592 + */
  593 + public function testFilesZeroithIndex() {
  594 + $_FILES = array(
  595 + 0 => array(
  596 + 'name' => 'cake_sqlserver_patch.patch',
  597 + 'type' => 'text/plain',
  598 + 'tmp_name' => '/private/var/tmp/phpy05Ywj',
  599 + 'error' => 0,
  600 + 'size' => 6271,
  601 + ),
  602 + );
  603 +
  604 + $request = new CakeRequest('some/path');
  605 + $this->assertEquals($_FILES, $request->params['form']);
  606 + }
  607 +
  608 +/**
591 609 * test method overrides coming in from POST data.
592 610 *
593 611 * @return void
@@ -1629,6 +1647,30 @@ public static function environmentGenerator() {
1629 1647 ),
1630 1648 ),
1631 1649 array(
  1650 + 'Apache - w/rewrite, document root set above top level cake dir, request root, absolute REQUEST_URI',
  1651 + array(
  1652 + 'App' => array(
  1653 + 'base' => false,
  1654 + 'baseUrl' => false,
  1655 + 'dir' => 'app',
  1656 + 'webroot' => 'webroot'
  1657 + ),
  1658 + 'SERVER' => array(
  1659 + 'SERVER_NAME' => 'localhost',
  1660 + 'DOCUMENT_ROOT' => '/Library/WebServer/Documents',
  1661 + 'SCRIPT_FILENAME' => '/Library/WebServer/Documents/site/index.php',
  1662 + 'REQUEST_URI' => FULL_BASE_URL . '/site/posts/index',
  1663 + 'SCRIPT_NAME' => '/site/app/webroot/index.php',
  1664 + 'PHP_SELF' => '/site/app/webroot/index.php',
  1665 + ),
  1666 + ),
  1667 + array(
  1668 + 'url' => 'posts/index',
  1669 + 'base' => '/site',
  1670 + 'webroot' => '/site/',
  1671 + ),
  1672 + ),
  1673 + array(
1632 1674 'Nginx - w/rewrite, document root set to webroot, request root, no PATH_INFO',
1633 1675 array(
1634 1676 'App' => array(
112 lib/Cake/Test/Case/View/Helper/TextHelperTest.php
@@ -166,65 +166,91 @@ public function testAutoLinkEscape() {
166 166 }
167 167
168 168 /**
  169 + * Data provider for autoLinking
  170 + */
  171 + public static function autoLinkProvider() {
  172 + return array(
  173 + array(
  174 + 'This is a test text',
  175 + 'This is a test text',
  176 + ),
  177 + array(
  178 + 'This is a test that includes (www.cakephp.org)',
  179 + 'This is a test that includes (<a href="http://www.cakephp.org">www.cakephp.org</a>)',
  180 + ),
  181 + array(
  182 + 'This is a test that includes www.cakephp.org:8080',
  183 + 'This is a test that includes <a href="http://www.cakephp.org:8080">www.cakephp.org:8080</a>',
  184 + ),
  185 + array(
  186 + 'This is a test that includes http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment',
  187 + 'This is a test that includes <a href="http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment">http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment</a>',
  188 + ),
  189 + array(
  190 + 'This is a test that includes www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment',
  191 + 'This is a test that includes <a href="http://www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment">www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment</a>',
  192 + ),
  193 + array(
  194 + 'This is a test that includes http://example.com/test.php?foo=bar text',
  195 + 'This is a test that includes <a href="http://example.com/test.php?foo=bar">http://example.com/test.php?foo=bar</a> text',
  196 + ),
  197 + array(
  198 + 'This is a test that includes www.example.com/test.php?foo=bar text',
  199 + 'This is a test that includes <a href="http://www.example.com/test.php?foo=bar">www.example.com/test.php?foo=bar</a> text',
  200 + ),
  201 + array(
  202 + 'Text with a partial www.cakephp.org URL',
  203 + 'Text with a partial <a href="http://www.cakephp.org">www.cakephp.org</a> URL',
  204 + ),
  205 + array(
  206 + 'Text with a partial WWW.cakephp.org URL',
  207 + 'Text with a partial <a href="http://WWW.cakephp.org">WWW.cakephp.org</a> URL',
  208 + ),
  209 + array(
  210 + 'Text with a partial WWW.cakephp.org &copy, URL',
  211 + 'Text with a partial <a href="http://WWW.cakephp.org">WWW.cakephp.org</a> &amp;copy, URL',
  212 + ),
  213 + array(
  214 + 'Text with a url www.cot.ag/cuIb2Q and more',
  215 + 'Text with a url <a href="http://www.cot.ag/cuIb2Q">www.cot.ag/cuIb2Q</a> and more',
  216 + ),
  217 + array(
  218 + 'Text with a url http://www.does--not--work.com and more',
  219 + 'Text with a url <a href="http://www.does--not--work.com">http://www.does--not--work.com</a> and more',
  220 + ),
  221 + array(
  222 + 'Text with a url http://www.not--work.com and more',
  223 + 'Text with a url <a href="http://www.not--work.com">http://www.not--work.com</a> and more',
  224 + ),
  225 + );
  226 + }
  227 +
  228 +/**
169 229 * testAutoLinkUrls method
170 230 *
  231 + * @dataProvider autoLinkProvider
171 232 * @return void
172 233 */
173   - public function testAutoLinkUrls() {
174   - $text = 'This is a test text';
175   - $expected = 'This is a test text';
176   - $result = $this->Text->autoLinkUrls($text);
177   - $this->assertEquals($expected, $result);
178   -
179   - $text = 'This is a test that includes (www.cakephp.org)';
180   - $expected = 'This is a test that includes (<a href="http://www.cakephp.org">www.cakephp.org</a>)';
  234 + public function testAutoLinkUrls($text, $expected) {
181 235 $result = $this->Text->autoLinkUrls($text);
182 236 $this->assertEquals($expected, $result);
  237 + }
183 238
184   - $text = 'This is a test that includes http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment';
185   - $expected = 'This is a test that includes <a href="http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment">http://de.wikipedia.org/wiki/Kanton_(Schweiz)#fragment</a>';
186   - $result = $this->Text->autoLinkUrls($text);
187   - $this->assertEquals($expected, $result);
188   -
189   - $text = 'This is a test that includes www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment';
190   - $expected = 'This is a test that includes <a href="http://www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment">www.wikipedia.org/wiki/Kanton_(Schweiz)#fragment</a>';
191   - $result = $this->Text->autoLinkUrls($text);
192   - $this->assertEquals($expected, $result);
193   -
194   - $text = 'Text with a partial www.cakephp.org URL';
195   - $expected = 'Text with a partial <a href="http://www.cakephp.org"\s*>www.cakephp.org</a> URL';
196   - $result = $this->Text->autoLinkUrls($text);
197   - $this->assertRegExp('#^' . $expected . '$#', $result);
198   -
  239 +/**
  240 + * Test the options for autoLinkUrls
  241 + *
  242 + * @return void
  243 + */
  244 + public function testAutoLinkUrlsOptions() {
199 245 $text = 'Text with a partial www.cakephp.org URL';
200 246 $expected = 'Text with a partial <a href="http://www.cakephp.org" \s*class="link">www.cakephp.org</a> URL';
201 247 $result = $this->Text->autoLinkUrls($text, array('class' => 'link'));
202 248 $this->assertRegExp('#^' . $expected . '$#', $result);
203 249
204   - $text = 'Text with a partial WWW.cakephp.org URL';
205   - $expected = 'Text with a partial <a href="http://WWW.cakephp.org"\s*>WWW.cakephp.org</a> URL';
206   - $result = $this->Text->autoLinkUrls($text);
207   - $this->assertRegExp('#^' . $expected . '$#', $result);
208   -
209 250 $text = 'Text with a partial WWW.cakephp.org &copy; URL';
210 251 $expected = 'Text with a partial <a href="http://WWW.cakephp.org"\s*>WWW.cakephp.org</a> &copy; URL';
211 252 $result = $this->Text->autoLinkUrls($text, array('escape' => false));
212 253 $this->assertRegExp('#^' . $expected . '$#', $result);
213   -
214   - $text = 'Text with a url www.cot.ag/cuIb2Q and more';
215   - $expected = 'Text with a url <a href="http://www.cot.ag/cuIb2Q">www.cot.ag/cuIb2Q</a> and more';
216   - $result = $this->Text->autoLinkUrls($text);
217   - $this->assertEquals($expected, $result);
218   -
219   - $text = 'Text with a url http://www.does--not--work.com and more';
220   - $expected = 'Text with a url <a href="http://www.does--not--work.com">http://www.does--not--work.com</a> and more';
221   - $result = $this->Text->autoLinkUrls($text);
222   - $this->assertEquals($expected, $result);
223   -
224   - $text = 'Text with a url http://www.not--work.com and more';
225   - $expected = 'Text with a url <a href="http://www.not--work.com">http://www.not--work.com</a> and more';
226   - $result = $this->Text->autoLinkUrls($text);
227   - $this->assertEquals($expected, $result);
228 254 }
229 255
230 256 /**
2  lib/Cake/TestSuite/CakeTestRunner.php
@@ -17,6 +17,8 @@
17 17 */
18 18 require_once 'PHPUnit/TextUI/TestRunner.php';
19 19
  20 +App::uses('CakeFixtureManager', 'TestSuite/Fixture');
  21 +
20 22 /**
21 23 * A custom test runner for Cake's use of PHPUnit.
22 24 *
3  lib/Cake/View/Helper/FormHelper.php
@@ -299,8 +299,9 @@ public function tagIsInvalid() {
299 299 * can be overridden when calling input()
300 300 * - `encoding` Set the accept-charset encoding for the form. Defaults to `Configure::read('App.encoding')`
301 301 *
302   - * @param string $model The model object which the form is being defined for. Should
  302 + * @param string|array $model The model object which the form is being defined for. Should
303 303 * include the plugin name for plugin forms. e.g. `ContactManager.Contact`.
  304 + * If an array is passed and $options argument is empty, the array will be used as options.
304 305 * @param array $options An array of html attributes and options.
305 306 * @return string An formatted opening FORM tag.
306 307 * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#options-for-create
2  lib/Cake/View/Helper/TextHelper.php
@@ -102,7 +102,7 @@ public function autoLinkUrls($text, $options = array()) {
102 102 $this->_placeholders = array();
103 103 $options += array('escape' => true);
104 104
105   - $pattern = '#(?<!href="|src="|">)((?:https?|ftp|nntp)://[^\s<>()]+\.[a-z]+(?:\/[^\s]+)?)#i';
  105 + $pattern = '#(?<!href="|src="|">)((?:https?|ftp|nntp)://[a-z0-9.\-:]+(?:/[^\s]*)?)#i';
106 106 $text = preg_replace_callback(
107 107 $pattern,
108 108 array(&$this, '_insertPlaceHolder'),

0 comments on commit 1aea9ac

Please sign in to comment.
Something went wrong with that request. Please try again.