Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4f36d348ef
@ -329,7 +329,7 @@ function dol_is_file($pathoffile)
|
|||||||
*/
|
*/
|
||||||
function dol_is_url($url)
|
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)
|
foreach($tmpprot as $prot)
|
||||||
{
|
{
|
||||||
if (preg_match('/^'.$prot.':/i',$url)) return true;
|
if (preg_match('/^'.$prot.':/i',$url)) return true;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?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
|
* 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
|
* 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);
|
$this->assertTrue($result);
|
||||||
|
|
||||||
$url='file://www.dolibarr.org/download/file.zip';
|
$url='file://www.dolibarr.org/download/file.zip';
|
||||||
$result=dol_is_url($file);
|
$result=dol_is_url($url);
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user