Skip to content
Snippets Groups Projects
Commit 4f36d348 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop

parents d8f96328 a51948c2
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
<?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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment