Trans
This commit is contained in:
parent
fa5edb3bac
commit
1a406dbb4b
@ -19,7 +19,7 @@
|
|||||||
* \file htdocs/core/class/rssparser.class.php
|
* \file htdocs/core/class/rssparser.class.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class to parse rss feeds
|
* \brief File of class to parse rss feeds
|
||||||
* \version $Id: rssparser.class.php,v 1.2 2011/08/26 17:59:14 eldy Exp $
|
* \version $Id: rssparser.class.php,v 1.1 2011/08/17 13:44:13 eldy Exp $
|
||||||
*/
|
*/
|
||||||
class RssParser
|
class RssParser
|
||||||
{
|
{
|
||||||
@ -75,13 +75,6 @@ class RssParser
|
|||||||
{
|
{
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if (! dol_is_url($urlRSS))
|
|
||||||
{
|
|
||||||
$this->error="ErrorBadUrl";
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->_urlRSS = $urlRSS;
|
$this->_urlRSS = $urlRSS;
|
||||||
$newpathofdestfile=$cachedir.'/'.md5($this->_urlRSS);
|
$newpathofdestfile=$cachedir.'/'.md5($this->_urlRSS);
|
||||||
$newmask=octdec('0644');
|
$newmask=octdec('0644');
|
||||||
@ -117,7 +110,6 @@ class RssParser
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$rss = @simplexml_load_file($this->_urlRSS);
|
$rss = @simplexml_load_file($this->_urlRSS);
|
||||||
var_dump($this->_urlRSS);
|
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
catch (Exception $e) {
|
||||||
print 'Error retrieving URL '.$this->urlRSS.' - '.$e->getMessage();
|
print 'Error retrieving URL '.$this->urlRSS.' - '.$e->getMessage();
|
||||||
|
|||||||
@ -877,7 +877,6 @@ DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for
|
|||||||
WatermarkOnDraft=Watermark on draft document
|
WatermarkOnDraft=Watermark on draft document
|
||||||
CompanyIdProfChecker=Professional Id unique
|
CompanyIdProfChecker=Professional Id unique
|
||||||
MustBeUnique=Must be unique ?
|
MustBeUnique=Must be unique ?
|
||||||
Miscellanous=Miscellanous
|
|
||||||
##### Webcal setup #####
|
##### Webcal setup #####
|
||||||
WebCalSetup=Webcalendar link setup
|
WebCalSetup=Webcalendar link setup
|
||||||
WebCalSyncro=Add Dolibarr events to WebCalendar
|
WebCalSyncro=Add Dolibarr events to WebCalendar
|
||||||
|
|||||||
@ -15,14 +15,14 @@ BoxLastCustomerOrders=Last customer orders
|
|||||||
BoxLastBooks=Last books
|
BoxLastBooks=Last books
|
||||||
BoxLastActions=Last actions
|
BoxLastActions=Last actions
|
||||||
BoxLastContracts=Last contracts
|
BoxLastContracts=Last contracts
|
||||||
BoxLastContacts=Last contacts/addresses
|
BoxLastContacts=Derniers contacts/adresses
|
||||||
BoxLastMembers=Last members
|
BoxLastMembers=Last members
|
||||||
BoxCurrentAccounts=Current accounts balance
|
BoxCurrentAccounts=Current accounts balance
|
||||||
BoxSalesTurnover=Sales turnover
|
BoxSalesTurnover=Sales turnover
|
||||||
BoxTotalUnpaidCustomerBills=Total unpaid customer's invoices
|
BoxTotalUnpaidCustomerBills=Total unpaid customer's invoices
|
||||||
BoxTotalUnpaidSuppliersBills=Total unpaid supplier's invoices
|
BoxTotalUnpaidSuppliersBills=Total unpaid supplier's invoices
|
||||||
BoxTitleLastBooks=Last %s recorded books
|
BoxTitleLastBooks=Last %s recorded books
|
||||||
BoxTitleNbOfCustomers=Number of clients
|
BoxTitleNbOfCustomers=Nombre de client
|
||||||
BoxTitleLastRssInfos=Last %s news from %s
|
BoxTitleLastRssInfos=Last %s news from %s
|
||||||
BoxTitleLastProducts=Last %s modified products/services
|
BoxTitleLastProducts=Last %s modified products/services
|
||||||
BoxTitleLastCustomerOrders=Last %s modified customer orders
|
BoxTitleLastCustomerOrders=Last %s modified customer orders
|
||||||
|
|||||||
@ -885,7 +885,6 @@ DocumentModelOdt=Genération depuis des modèles OpenDocument (Fichier .ODT Open
|
|||||||
WatermarkOnDraft=Filigrane sur les documents brouillons
|
WatermarkOnDraft=Filigrane sur les documents brouillons
|
||||||
CompanyIdProfChecker=Id professionel unique
|
CompanyIdProfChecker=Id professionel unique
|
||||||
MustBeUnique=Doit être unique ?
|
MustBeUnique=Doit être unique ?
|
||||||
Miscellanous=Miscellanous
|
|
||||||
##### Webcal setup #####
|
##### Webcal setup #####
|
||||||
WebCalSetup= Configuration du lien vers le calendrier Webcalendar
|
WebCalSetup= Configuration du lien vers le calendrier Webcalendar
|
||||||
WebCalSyncro= Intégrer les événements Dolibarr dans WebCalendar
|
WebCalSyncro= Intégrer les événements Dolibarr dans WebCalendar
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/lib/files.lib.php
|
* \file htdocs/lib/files.lib.php
|
||||||
* \brief Library for file managing functions
|
* \brief Library for file managing functions
|
||||||
* \version $Id: files.lib.php,v 1.72 2011/08/26 17:59:14 eldy Exp $
|
* \version $Id: files.lib.php,v 1.71 2011/07/31 23:25:43 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -186,7 +186,6 @@ function dol_compare_file($a, $b)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return mime type of a file
|
* Return mime type of a file
|
||||||
*
|
|
||||||
* @param file Filename we looking for MIME type
|
* @param file Filename we looking for MIME type
|
||||||
* @param default Default mime type if extension not found in known list
|
* @param default Default mime type if extension not found in known list
|
||||||
* @param mode 0=Return full mime, 1=otherwise short mime string, 2=image for mime type, 3=source language
|
* @param mode 0=Return full mime, 1=otherwise short mime string, 2=image for mime type, 3=source language
|
||||||
@ -296,7 +295,6 @@ function dol_mimetype($file,$default='application/octet-stream',$mode=0)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if filename is a directory
|
* Test if filename is a directory
|
||||||
*
|
|
||||||
* @param folder Name of folder
|
* @param folder Name of folder
|
||||||
* @return boolean True if it's a directory, False if not found
|
* @return boolean True if it's a directory, False if not found
|
||||||
*/
|
*/
|
||||||
@ -309,7 +307,6 @@ function dol_is_dir($folder)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if path is a file
|
* Return if path is a file
|
||||||
*
|
|
||||||
* @param $pathoffile
|
* @param $pathoffile
|
||||||
* @return boolean True or false
|
* @return boolean True or false
|
||||||
*/
|
*/
|
||||||
@ -319,26 +316,8 @@ function dol_is_file($pathoffile)
|
|||||||
return is_file($newpathoffile);
|
return is_file($newpathoffile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return if path is an URL
|
|
||||||
*
|
|
||||||
* @param $url
|
|
||||||
* @return boolean True or false
|
|
||||||
*/
|
|
||||||
function dol_is_url($url)
|
|
||||||
{
|
|
||||||
$tmpprot=array('file','http','ftp','zlib','data','ssh2','ogg','expect');
|
|
||||||
foreach($tmpprot as $prot)
|
|
||||||
{
|
|
||||||
if (preg_match('/^'.$prot.':/i',$url)) return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if a folder is empty
|
* Test if a folder is empty
|
||||||
*
|
|
||||||
* @param folder Name of folder
|
* @param folder Name of folder
|
||||||
* @return boolean True if dir is empty or non-existing, False if it contains files
|
* @return boolean True if dir is empty or non-existing, False if it contains files
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user