forked from Wavyzz/dolibarr
Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -329,7 +329,7 @@ function dol_is_file($pathoffile)
|
||||
*/
|
||||
function dol_is_url($url)
|
||||
{
|
||||
$tmpprot=array('file','http','ftp','zlib','data','ssh2','ogg','expect');
|
||||
$tmpprot=array('file','http','https','ftp','zlib','data','ssh','ssh2','ogg','expect');
|
||||
foreach($tmpprot as $prot)
|
||||
{
|
||||
if (preg_match('/^'.$prot.':/i',$url)) return true;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -169,7 +170,7 @@ class FilesLibTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue($result);
|
||||
|
||||
$url='file://www.dolibarr.org/download/file.zip';
|
||||
$result=dol_is_url($file);
|
||||
$result=dol_is_url($url);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
$this->assertTrue($result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user