Fix: missing trad

This commit is contained in:
Juanjo Menent 2011-08-26 15:13:58 +00:00
parent a8361cdee9
commit df0797cd71
17 changed files with 3108 additions and 3598 deletions

View File

@ -10,29 +10,28 @@ However it uses some external libraries under different licences. This is compat
Composant Version License Compatible GPL Usage
----------------------------------------------------------------------------
PHP libraries:
In alphabetical order of includes directory:
AdoDb-Date 0.21 Modified BSD License Yes Date convertion
ArtiChow 1.07 Public Domain Yes Graphics
CKEditor 3.6.1 GPL or LGPL 2.1 or MPL 1.1 Yes Editor WYSIWYG
FPDI 1.4.1 Apache Software License 2.0 ? PDF templates management
NuSoap 0.9.5 LGPL 2.1 Yes Library to develop SOAP Web services
OdtPHP 1.0.1 GPL 2.0 Yes Library to build/edit ODT files
Php-barcode 0.3pl1 GPL 2.0 Yes Bar code generation
PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
JS libraries:
FPDI 1.4.1 Apache Software License 2.0 No GPL3 only PDF templates management
jQuery 1.6.1 GPL and MIT Licence Yes JS library
jQuery UI 1.8.14 GPL and MIT Licence Yes JS library plugin UI
jQuery Flot 0.7 MIT Licence Yes JS library to build graph
jQuery JCrop 0.9.8 MIT Licence Yes JS library plugin Crop (to crop images)
jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15)
jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows)
jQuery jNotify 1.1.00 Apache Software License 2.0 ? JS library plugin jNotify (to use ajax popups)
jQuery jNotify 1.1.00 Apache Software License 2.0 No GPL3 only JS library plugin jNotify (to use ajax popups)
jQuery Mobile 1.0b1 GPL and MIT Licence Yes JS library for smartphone (not used)
jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips
JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports)
NuSoap 0.9.5 LGPL 2.1 Yes Interfaces with third tools
OdtPHP 1.0.1 GPL 2.0 Yes Library to build/edit ODT files
Php-barcode 0.3pl1 GPL 2.0 Yes Bar code generation
PHPExcel 1.7.6 LGPL 2.1 Yes Read/Write XLS files, read ODS files
SMTPs 1.15 GPL Yes SMTPS library
TCPDF 5.9.098 LGPL 3.0 Yes PDF generation
VCard 2.0 GPL 2.0 Yes VCard library
For licenses compatibility informations:
http://www.fsf.org/licensing/licenses/index_html
@ -46,8 +45,6 @@ Copyright (C) 2011
- Regis Houssin <regis@dolibarr.fr>
- Juanjo Menent
- Philippe Grand
- Jean Heimburger <jean@tiaris.info>
- Philippe Grand
Copyright (C) 2010
- Laurent Destailleur <eldy@users.sourceforge.net>

View File

@ -24,7 +24,7 @@
* \file htdocs/admin/external_rss.php
* \ingroup external_rss
* \brief Page to setupe module ExternalRss
* \version $Id: external_rss.php,v 1.50 2011/08/26 19:09:03 eldy Exp $
* \version $Id: external_rss.php,v 1.49 2011/08/17 13:44:16 eldy Exp $
*/
require("../main.inc.php");
@ -286,10 +286,7 @@ if ($resql)
}
else
{
print '<font class="error">'.$langs->trans("Offline");
$langs->load("errors");
if ($rssparser->error) print ' - '.$langs->trans($rssparser->error);
print '</div>';
print '<font class="error">'.$langs->trans("Offline").'</div>';
}
print "</td>";
print "</tr>";
@ -323,5 +320,5 @@ else
$db->close();
llxFooter('$Date: 2011/08/26 19:09:03 $ - $Revision: 1.50 $');
llxFooter('$Date: 2011/08/17 13:44:16 $ - $Revision: 1.49 $');
?>

View File

@ -20,7 +20,7 @@
* \file htdocs/cashdesk/admin/cashdesk.php
* \ingroup cashdesk
* \brief Setup page for cashdesk module
* \version $Id: cashdesk.php,v 1.10 2011/08/26 23:56:14 eldy Exp $
* \version $Id: cashdesk.php,v 1.9 2011/08/26 15:05:41 simnandez Exp $
*/
require("../../main.inc.php");
@ -49,7 +49,7 @@ $langs->load("cashdesk");
if (GETPOST("action") == 'set')
{
$db->begin();
if (GETPOST("socid") < 0) $_POST["socid"]='';
/*if (GETPOST("CASHDESK_ID_BANKACCOUNT") < 0) $_POST["CASHDESK_ID_BANKACCOUNT"]='';
if (GETPOST("CASHDESK_ID_WAREHOUSE") < 0) $_POST["CASHDESK_ID_WAREHOUSE"]='';*/
@ -62,9 +62,9 @@ if (GETPOST("action") == 'set')
$res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST("CASHDESK_SERVICES"),'chaine',0,'',$conf->entity);
dol_syslog("admin/cashdesk: level ".GETPOST("level"));
if (! $res > 0) $error++;
if (! $error)
{
$db->commit();
@ -84,7 +84,7 @@ if (GETPOST("action") == 'set')
$form=new Form($db);
$formproduct=new FormProduct($db);
llxHeader('',$langs->trans("CashDeskSetup"));
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("CashDeskSetup"),$linkback,'setup');
@ -136,15 +136,12 @@ if ($conf->stock->enabled)
print '</td></tr>';
}
if ($conf->service->enabled)
{
$var=! $var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';;
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
print "</td></tr>\n";
}
$var=! $var;
print '<tr '.$bc[$var].'><td>';
print $langs->trans("CashdeskShowServices");
print '<td colspan="2">';;
print $form->selectyesno("CASHDESK_SERVICES",$conf->global->CASHDESK_SERVICES,1);
print "</td></tr>\n";
print '</table>';
print '<br>';
@ -154,8 +151,7 @@ print '<center><input type="submit" class="button" value="'.$langs->trans("Save"
print "</form>\n";
dol_htmloutput_mesg($mesg);
$db->close();
llxFooter('$Date: 2011/08/26 23:56:14 $ - $Revision: 1.10 $');
llxFooter('$Date: 2011/08/26 15:05:41 $ - $Revision: 1.9 $');
?>

View File

@ -20,13 +20,13 @@
* \file htdocs/contact/vcard.php
* \ingroup societe
* \brief Onglet vcard d'un contact
* \version $Id: vcard.php,v 1.28 2011/08/26 23:40:49 eldy Exp $
* \version $Id: vcard.php,v 1.27 2011/07/31 23:54:12 eldy Exp $
*/
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php");
require_once(DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/vcard.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/vcard/vcard.class.php");
$contact = new Contact($db);

View File

@ -19,14 +19,14 @@
* \file htdocs/core/class/rssparser.class.php
* \ingroup core
* \brief File of class to parse rss feeds
* \version $Id: rssparser.class.php,v 1.5 2011/08/26 23:06:16 eldy Exp $
* \version $Id: rssparser.class.php,v 1.1 2011/08/17 13:44:13 eldy Exp $
*/
class RssParser
{
var $db;
var $error;
protected $_format='';
protected $_format='rss';
protected $_urlRSS;
protected $_language;
protected $_generator;
@ -53,12 +53,6 @@ class RssParser
public function getLastFetchDate() { return $this->_lastfetchdate; }
public function getItems() { return $this->_rssarray; }
// For parsing with xmlparser
var $stack = array(); // parser stack
var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
/**
* Constructor
*/
@ -81,17 +75,8 @@ class RssParser
{
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
$str=''; // This will contain content of feed
// Check parameters
if (! dol_is_url($urlRSS))
{
$this->error="ErrorBadUrl";
return -1;
}
$this->_urlRSS = $urlRSS;
$newpathofdestfile=$cachedir.'/'.md5($this->_urlRSS);
$newpathofdestfile=$cachedir.'/'.md5($this->_urlRSS);
$newmask=octdec('0644');
//dol_syslog("RssPArser::parser parse url=".$urlRSS." => cache file=".$newpathofdestfile);
@ -115,44 +100,22 @@ class RssParser
}
}
// Load file into $str
// Load file into $rss
if ($foundintocache) // Cache file found and is not too old
{
$str = file_get_contents($newpathofdestfile);
$rss = simplexml_load_string(unserialize($str));
}
else
{
try {
ini_set("user_agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)");
ini_set("max_execution_time", 10);
$str = file_get_contents($this->_urlRSS);
$rss = @simplexml_load_file($this->_urlRSS);
}
catch (Exception $e) {
print 'Error retrieving URL '.$this->urlRSS.' - '.$e->getMessage();
}
}
// Convert $str into xml
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
//print 'xx'.LIBXML_NOCDATA;
libxml_use_internal_errors(false);
$rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA);
}
else
{
$xmlparser=xml_parser_create('');
if (!is_resource($xmlparser)) { $this->error="ErrorFailedToCreateParser"; return -1; }
xml_set_object( $xmlparser, $this );
xml_set_element_handler($xmlparser, 'feed_start_element', 'feed_end_element' );
xml_set_character_data_handler( $xmlparser, 'feed_cdata' );
$status = xml_parse( $xmlparser, $str );
xml_parser_free( $xmlparser );
$rss=$this;
//var_dump($this);exit;
}
// If $rss loaded
if ($rss)
{
@ -162,7 +125,7 @@ class RssParser
dol_syslog("RssParser::parser cache file ".$newpathofdestfile." is saved onto disk.");
if (! dol_is_dir($cachedir)) dol_mkdir($cachedir);
$fp = fopen($newpathofdestfile, 'w');
fwrite($fp, $str);
fwrite($fp, serialize($rss->asXML()));
fclose($fp);
if (! empty($conf->global->MAIN_UMASK)) $newmask=$conf->global->MAIN_UMASK;
@chmod($newpathofdestfile, octdec($newmask));
@ -170,132 +133,33 @@ class RssParser
$this->_lastfetchdate=$nowgmt;
}
unset($str); // Free memory
if (empty($rss->_format)) // If format not detected automatically
{
$rss->_format='rss';
if (empty($rss->channel)) $rss->_format='atom';
}
$items=array();
// Save description entries
if ($rss->_format == 'rss')
{
//var_dump($rss);
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
if (!empty($rss->channel->language)) $this->_language = (string) $rss->channel->language;
if (!empty($rss->channel->generator)) $this->_generator = (string) $rss->channel->generator;
if (!empty($rss->channel->copyright)) $this->_copyright = (string) $rss->channel->copyright;
if (!empty($rss->channel->lastbuilddate)) $this->_lastbuilddate = (string) $rss->channel->lastbuilddate;
if (!empty($rss->channel->image->url[0])) $this->_imageurl = (string) $rss->channel->image->url[0];
if (!empty($rss->channel->link)) $this->_link = (string) $rss->channel->link;
if (!empty($rss->channel->title)) $this->_title = (string) $rss->channel->title;
if (!empty($rss->channel->description)) $this->_description = (string) $rss->channel->description;
}
else
{
if (!empty($rss->channel['rss_language'])) $this->_language = (string) $rss->channel['rss_language'];
if (!empty($rss->channel['rss_generator'])) $this->_generator = (string) $rss->channel['rss_generator'];
if (!empty($rss->channel['rss_copyright'])) $this->_copyright = (string) $rss->channel['rss_copyright'];
if (!empty($rss->channel['rss_lastbuilddate'])) $this->_lastbuilddate = (string) $rss->channel['rss_lastbuilddate'];
if (!empty($rss->image['rss_url'])) $this->_imageurl = (string) $rss->image['rss_url'];
if (!empty($rss->channel['rss_link'])) $this->_link = (string) $rss->channel['rss_link'];
if (!empty($rss->channel['rss_title'])) $this->_title = (string) $rss->channel['rss_title'];
if (!empty($rss->channel['rss_description'])) $this->_description = (string) $rss->channel['rss_description'];
}
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) $items=$rss->channel->item; // With simplexml
else $items=$rss->items; // With xmlparse
//var_dump($items);exit;
}
else if ($rss->_format == 'atom')
{
//var_dump($rss);
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
if (!empty($rss->generator)) $this->_generator = (string) $rss->generator;
if (!empty($rss->lastbuilddate)) $this->_lastbuilddate = (string) $rss->modified;
if (!empty($rss->link->href)) $this->_link = (string) $rss->link->href;
if (!empty($rss->title)) $this->_title = (string) $rss->title;
if (!empty($rss->description)) $this->_description = (string) $rss->description;
}
else
{
//if (!empty($rss->channel['rss_language'])) $this->_language = (string) $rss->channel['rss_language'];
if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator'];
//if (!empty($rss->channel['rss_copyright'])) $this->_copyright = (string) $rss->channel['rss_copyright'];
if (!empty($rss->channel['modified'])) $this->_lastbuilddate = (string) $rss->channel['modified'];
//if (!empty($rss->image['rss_url'])) $this->_imageurl = (string) $rss->image['rss_url'];
if (!empty($rss->channel['link'])) $this->_link = (string) $rss->channel['link'];
if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title'];
//if (!empty($rss->channel['rss_description'])) $this->_description = (string) $rss->channel['rss_description'];
}
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) { $tmprss=xml2php($rss); $items=$tmprss['entry'];} // With simplexml
else $items=$rss->items; // With xmlparse
//var_dump($items);exit;
}
// Save description entries
if (!empty($rss->channel->language)) $this->_language = (string) $rss->channel->language;
if (!empty($rss->channel->generator)) $this->_generator = (string) $rss->channel->generator;
if (!empty($rss->channel->copyright)) $this->_copyright = (string) $rss->channel->copyright;
if (!empty($rss->channel->lastbuilddate)) $this->_lastbuilddate = (string) $rss->channel->lastbuilddate;
if (!empty($rss->channel->image->url[0])) $this->_imageurl = (string) $rss->channel->image->url[0];
if (!empty($rss->channel->link)) $this->_link = (string) $rss->channel->link;
if (!empty($rss->channel->title)) $this->_title = (string) $rss->channel->title;
if (!empty($rss->channel->description)) $this->_description = (string) $rss->channel->description;
// TODO imageurl
$i = 0;
// Loop on each record
foreach($items as $item)
{
//var_dump($item);exit;
if ($rss->_format == 'rss')
{
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
$itemLink = (string) $item->link;
$itemTitle = (string) $item->title;
$itemDescription = (string) $item->description;
$itemPubDate = (string) $item->pubDate;
$itemId = '';
$itemAuthor = '';
}
else
{
$itemLink = (string) $item['rss_link'];
$itemTitle = (string) $item['rss_title'];
$itemDescription = (string) $item['rss_description'];
$itemPubDate = (string) $item['rss_pubdate'];
$itemId = (string) $item['rss_guid'];
$itemAuthor = (string) $item['rss_author'];
}
// Loop on each category
$itemCategory=array();
if (is_array($item->category))
{
foreach ($item->category as $cat)
{
$itemCategory[] = (string) $cat;
}
}
}
else if ($rss->_format == 'atom')
{
if (! empty($conf->global->EXTERNALRSS_USE_SIMPLEXML))
{
$itemLink = (string) $item['link']['href'];
$itemTitle = (string) $item['title'];
$itemDescription = (string) $item['summary'];
$itemPubDate = (string) $item['created'];
$itemId = (string) $item['id'];
$itemAuthor = (string) ($item['author']?$item['author']:$item['author_name']);
}
else
{
$itemLink = (string) $item['link']['href'];
$itemTitle = (string) $item['title'];
$itemDescription = (string) $item['summary'];
$itemPubDate = (string) $item['created'];
$itemId = (string) $item['id'];
$itemAuthor = (string) ($item['author']?$item['author']:$item['author_name']);
}
}
else print 'ErrorBadFeedFormat';
// Loop on each record
foreach($rss->channel->item as $item)
{
$itemLink = (string) $item->link;
$itemTitle = (string) $item->title;
$itemDescription = (string) $item->description;
$itemPubDate = (string) $item->pubDate;
// Loop on each category
$itemCategory=array();
foreach ($item->category as $cat)
{
$itemCategory[] = (string) $cat;
}
// Add record to result array
$this->_rssarray[$i] = array(
@ -303,9 +167,7 @@ class RssParser
'title'=>$itemTitle,
'description'=>$itemDescription,
'pubDate'=>$itemPubDate,
'category'=>$itemCategory,
'id'=>$itemId,
'author'=>$itemAuthor);
'category'=>$itemCategory);
$i++;
@ -321,323 +183,5 @@ class RssParser
}
}
/**
* Triggered when opened tag is found
*
* @param $p
* @param $element Tag
* @param $attrs Attributes of tags
*/
function feed_start_element($p, $element, &$attrs)
{
$el = $element = strtolower($element);
$attrs = array_change_key_case($attrs, CASE_LOWER);
// check for a namespace, and split if found
$ns = false;
if ( strpos( $element, ':' ) ) {
list($ns, $el) = explode( ':', $element, 2);
}
if ( $ns and $ns != 'rdf' ) {
$this->current_namespace = $ns;
}
// if feed type isn't set, then this is first element of feed identify feed from root element
if (empty($this->_format))
{
if ( $el == 'rdf' ) {
$this->_format = 'rss';
$this->feed_version = '1.0';
}
elseif ( $el == 'rss' ) {
$this->_format = 'rss';
$this->feed_version = $attrs['version'];
}
elseif ( $el == 'feed' ) {
$this->_format = 'atom';
$this->feed_version = $attrs['version'];
$this->inchannel = true;
}
return;
}
if ( $el == 'channel' )
{
$this->inchannel = true;
}
elseif ($el == 'item' or $el == 'entry' )
{
$this->initem = true;
if ( isset($attrs['rdf:about']) ) {
$this->current_item['about'] = $attrs['rdf:about'];
}
}
// if we're in the default namespace of an RSS feed,
// record textinput or image fields
elseif (
$this->_format == 'rss' and
$this->current_namespace == '' and
$el == 'textinput' )
{
$this->intextinput = true;
}
elseif (
$this->_format == 'rss' and
$this->current_namespace == '' and
$el == 'image' )
{
$this->inimage = true;
}
# handle atom content constructs
elseif ( $this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS) )
{
// avoid clashing w/ RSS mod_content
if ($el == 'content' ) {
$el = 'atom_content';
}
$this->incontent = $el;
}
// if inside an Atom content construct (e.g. content or summary) field treat tags as text
elseif ($this->_format == 'atom' and $this->incontent )
{
// if tags are inlined, then flatten
$attrs_str = join(' ',
array_map('map_attrs',
array_keys($attrs),
array_values($attrs) ) );
$this->append_content( "<$element $attrs_str>" );
array_unshift( $this->stack, $el );
}
// Atom support many links per containging element.
// Magpie treats link elements of type rel='alternate'
// as being equivalent to RSS's simple link element.
//
elseif ($this->_format == 'atom' and $el == 'link' )
{
if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' )
{
$link_el = 'link';
}
else {
$link_el = 'link_' . $attrs['rel'];
}
$this->append($link_el, $attrs['href']);
}
// set stack[0] to current element
else {
array_unshift($this->stack, $el);
}
}
/**
* Triggered when CDATA is found
*
* @param $p
* @param $element Tag
* @param $attrs Attributes of tags
*/
function feed_cdata ($p, $text) {
if ($this->_format == 'atom' and $this->incontent)
{
$this->append_content( $text );
}
else {
$current_el = join('_', array_reverse($this->stack));
$this->append($current_el, $text);
}
}
/**
* Triggered when closed tag is found
*
* @param $p
* @param $element Tag
*/
function feed_end_element ($p, $el) {
$el = strtolower($el);
if ( $el == 'item' or $el == 'entry' )
{
$this->items[] = $this->current_item;
$this->current_item = array();
$this->initem = false;
}
elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'textinput' )
{
$this->intextinput = false;
}
elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'image' )
{
$this->inimage = false;
}
elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS) )
{
$this->incontent = false;
}
elseif ($el == 'channel' or $el == 'feed' )
{
$this->inchannel = false;
}
elseif ($this->_format == 'atom' and $this->incontent ) {
// balance tags properly
// note: i don't think this is actually neccessary
if ( $this->stack[0] == $el )
{
$this->append_content("</$el>");
}
else {
$this->append_content("<$el />");
}
array_shift( $this->stack );
}
else {
array_shift( $this->stack );
}
$this->current_namespace = false;
}
/**
* To concat 2 string with no warning if an operand is not defined
*
* @param $str1
* @param $str2
*/
function concat (&$str1, $str2="") {
if (!isset($str1) ) {
$str1="";
}
$str1 .= $str2;
}
/**
*/
function append_content($text) {
if ( $this->initem ) {
$this->concat( $this->current_item[ $this->incontent ], $text );
}
elseif ( $this->inchannel ) {
$this->concat( $this->channel[ $this->incontent ], $text );
}
}
/**
* smart append - field and namespace aware
*/
function append($el, $text) {
if (!$el) {
return;
}
if ( $this->current_namespace )
{
if ( $this->initem ) {
$this->concat(
$this->current_item[ $this->current_namespace ][ $el ], $text);
}
elseif ($this->inchannel) {
$this->concat(
$this->channel[ $this->current_namespace][ $el ], $text );
}
elseif ($this->intextinput) {
$this->concat(
$this->textinput[ $this->current_namespace][ $el ], $text );
}
elseif ($this->inimage) {
$this->concat(
$this->image[ $this->current_namespace ][ $el ], $text );
}
}
else {
if ( $this->initem ) {
$this->concat(
$this->current_item[ $el ], $text);
}
elseif ($this->intextinput) {
$this->concat(
$this->textinput[ $el ], $text );
}
elseif ($this->inimage) {
$this->concat(
$this->image[ $el ], $text );
}
elseif ($this->inchannel) {
$this->concat(
$this->channel[ $el ], $text );
}
}
}
}
/**
* Function to convert an XML object into an array
*/
function xml2php($xml)
{
$fils = 0;
$tab = false;
$array = array();
foreach($xml->children() as $key => $value)
{
$child = xml2php($value);
//To deal with the attributes
foreach($value->attributes() as $ak=>$av)
{
$child[$ak] = (string)$av;
}
//Let see if the new child is not in the array
if($tab==false && in_array($key,array_keys($array)))
{
//If this element is already in the array we will create an indexed array
$tmp = $array[$key];
$array[$key] = NULL;
$array[$key][] = $tmp;
$array[$key][] = $child;
$tab = true;
}
elseif($tab == true)
{
//Add an element in an existing array
$array[$key][] = $child;
}
else
{
//Add a simple element
$array[$key] = $child;
}
$fils++;
}
if($fils==0)
{
return (string)$xml;
}
return $array;
}
?>

File diff suppressed because it is too large Load Diff

View File

@ -1,298 +0,0 @@
<?php
/* Copyright (C) Kai Blankenhorn <kaib@bitfolge.de>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.org>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* v2.0 Initial creation Kai Blankenhorn
* 2007 v3.0 Laurent Destailleur eldy@users.sourceforge.net
* Added functions (as in http://www.ietf.org/rfc/rfc2426.txt):
* setTitle setOrg setProdId setUID
*/
/**
* \file htdocs/core/class/vcard.class.php
* \brief Class to manage vCard files
*/
/**
* Encode a string for vCard
*
* @param string String to encode
*/
function encode($string)
{
return str_replace(";","\;",(dol_quoted_printable_encode(utf8_decode($string))));
}
/**
* Taken from php documentation comments
* No more used
*
* @param input String
* @param line_max Max length of lines
*/
function dol_quoted_printable_encode($input, $line_max = 76)
{
$hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
$lines = preg_split("/(\?:\r\n|\r|\n)/", $input);
$eol = "\r\n";
$linebreak = "=0D=0A";
$escape = "=";
$output = "";
for ($j=0;$j<count($lines);$j++) {
$line = $lines[$j];
$linlen = strlen($line);
$newline = "";
for($i = 0; $i < $linlen; $i++) {
$c = substr($line, $i, 1);
$dec = ord($c);
if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only
$c = "=20";
} elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
$h2 = floor($dec/16); $h1 = floor($dec%16);
$c = $escape.$hex["$h2"].$hex["$h1"];
}
if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
$output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
$newline = " ";
}
$newline .= $c;
} // end of for
$output .= $newline;
if ($j<count($lines)-1) $output .= $linebreak;
}
return trim($output);
}
/**
* \class vCard
* \brief Class to buld vCard files
*/
class vCard
{
var $properties;
var $filename;
//var $encoding="UTF-8";
var $encoding="ISO-8859-1;ENCODING=QUOTED-PRINTABLE";
/**
* mise en forme du numero de telephone
*
* @param number numero de telephone
* @param type
*/
function setPhoneNumber($number, $type="") {
// type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE"
$key = "TEL";
if ($type!="") $key .= ";".$type;
$key.= ";CHARSET=".$this->encoding;
$this->properties[$key] = encode($number);
}
/**
* mise en forme de la photo
* warning NON TESTE !
*
* @param type
* @param photo
*/
function setPhoto($type, $photo) { // $type = "GIF" | "JPEG"
$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo);
}
/**
* mise en forme du nom formate
*
* @param name
*/
function setFormattedName($name) {
$this->properties["FN;CHARSET=".$this->encoding] = encode($name);
}
/**
* mise en forme du nom complet
*
* @param family
* @param first
* @param additional
* @param prefix
* @param suffix
*/
function setName($family="", $first="", $additional="", $prefix="", $suffix="") {
$this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix);
$this->filename = "$first%20$family.vcf";
if ($this->properties["FN"]=="") $this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
}
/**
* mise en forme de l'anniversaire
*
* @param date
*/
function setBirthday($date) { // $date format is YYYY-MM-DD
$this->properties["BDAY"] = $date;
}
/**
* mise en forme de l'adresse
*
* @param postoffice
* @param extended
* @param street
* @param city
* @param region
* @param zip
* @param country
* @param type
*/
function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") {
// $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL"
$key = "ADR";
if ($type!="") $key.= ";$type";
$key.= ";CHARSET=".$this->encoding;
$this->properties[$key] = encode($name).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country);
if ($this->properties["LABEL;$type;CHARSET=".$this->encoding] == "") {
//$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type);
}
}
/**
* mise en forme du label
*
* @param postoffice
* @param extended
* @param street
* @param city
* @param region
* @param zip
* @param country
* @param type
*/
function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") {
$label = "";
if ($postoffice!="") $label.= "$postoffice\r\n";
if ($extended!="") $label.= "$extended\r\n";
if ($street!="") $label.= "$street\r\n";
if ($zip!="") $label.= "$zip ";
if ($city!="") $label.= "$city\r\n";
if ($region!="") $label.= "$region\r\n";
if ($country!="") $country.= "$country\r\n";
$this->properties["LABEL;$type;CHARSET=".$this->encoding] = encode($label);
}
/**
* mise en forme de l'email
*
* @param address EMail
* @param type Vcard type
*/
function setEmail($address,$type="internet,pref") {
$this->properties["EMAIL;TYPE=".$type] = $address;
}
/**
* mise en forme de la note
*
* @param note
*/
function setNote($note) {
$this->properties["NOTE;CHARSET=".$this->encoding] = encode($note);
}
/**
* mise en forme de la fonction
*
* @param title
*/
function setTitle($title) {
$this->properties["TITLE;CHARSET=".$this->encoding] = encode($title);
}
/**
* mise en forme de la societe
*
* @param org
*/
function setOrg($org) {
$this->properties["ORG;CHARSET=".$this->encoding] = encode($org);
}
/**
* mise en forme du logiciel generateur
*
* @param prodid
*/
function setProdId($prodid) {
$this->properties["PRODID;CHARSET=".$this->encoding] = encode($prodid);
}
/**
* mise en forme du logiciel generateur
*
* @param uid
*/
function setUID($uid) {
$this->properties["UID;CHARSET=".$this->encoding] = encode($uid);
}
/**
* mise en forme de l'url
*
* @param url
* @param type
*/
function setURL($url, $type="") {
// $type may be WORK | HOME
$key = "URL";
if ($type!="") $key.= ";$type";
$this->properties[$key] = $url;
}
/**
* permet d'obtenir une vcard
*/
function getVCard() {
$text = "BEGIN:VCARD\r\n";
//$text.= "VERSION:3.0\r\n";
$text.= "VERSION:2.1\r\n";
foreach($this->properties as $key => $value) {
$text.= "$key:$value\r\n";
}
$text.= "REV:".date("Y-m-d")."T".date("H:i:s")."Z\r\n";
$text.= "MAILER: Dolibarr\r\n";
$text.= "END:VCARD\r\n";
return $text;
}
/**
* permet d'obtenir le nom de fichier
*/
function getFileName() {
return $this->filename;
}
}
?>

View File

@ -0,0 +1,7 @@
README (english)
----------------
This directory contains a PHP library for manipulating SMTPS.
Web: http://www.paehl.de/cms/php_scripts (Class from SMTP PHP Mail project)
Author: Dirk Paehl
Licence: GPL

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
README (english)
----------------
This directory contains a PHP library for manipulating VCal format.
Author: Kai Blankenhorn
Licence: GPL 2.0

View File

@ -0,0 +1,295 @@
<?php
/***************************************************************************
php vCard class
(c) Kai Blankenhorn
www.bitfolge.de/en
kaib@bitfolge.de
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 the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***************************************************************************
2007 v3.0 Laurent Destailleur eldy@users.sourceforge.net
Added functions (as in http://www.ietf.org/rfc/rfc2426.txt):
setTitle setOrg setProdId setUID
***************************************************************************/
/**
* \file htdocs/includes/vcard/vcard.class.php
* \brief Classe permettant de creer un fichier vcard.
* \author Kai Blankenhorn.
* \version 2.0
*
* Ensemble des fonctions permettant de creer un fichier vcard.
*/
function encode($string) {
//return escape($string);
return escape(dol_quoted_printable_encode(utf8_decode($string)));
}
function escape($string) {
return str_replace(";","\;",$string);
}
/** \brief Taken from php documentation comments
* No more used
*/
function dol_quoted_printable_encode($input, $line_max = 76) {
$hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
$lines = preg_split("/(\?:\r\n|\r|\n)/", $input);
$eol = "\r\n";
$linebreak = "=0D=0A";
$escape = "=";
$output = "";
for ($j=0;$j<count($lines);$j++) {
$line = $lines[$j];
$linlen = strlen($line);
$newline = "";
for($i = 0; $i < $linlen; $i++) {
$c = substr($line, $i, 1);
$dec = ord($c);
if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only
$c = "=20";
} elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
$h2 = floor($dec/16); $h1 = floor($dec%16);
$c = $escape.$hex["$h2"].$hex["$h1"];
}
if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
$output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
$newline = " ";
}
$newline .= $c;
} // end of for
$output .= $newline;
if ($j<count($lines)-1) $output .= $linebreak;
}
return trim($output);
}
/** \class vCard
\brief Classe permettant de creer un fichier vcard
Ensemble des fonctions permettant de creer un fichier vcard
*/
class vCard {
var $properties;
var $filename;
//var $encoding="UTF-8";
var $encoding="ISO-8859-1;ENCODING=QUOTED-PRINTABLE";
/**
\brief mise en forme du numero de telephone
\param number numero de telephone
\param type
*/
function setPhoneNumber($number, $type="") {
// type may be PREF | WORK | HOME | VOICE | FAX | MSG | CELL | PAGER | BBS | CAR | MODEM | ISDN | VIDEO or any senseful combination, e.g. "PREF;WORK;VOICE"
$key = "TEL";
if ($type!="") $key .= ";".$type;
$key.= ";CHARSET=".$this->encoding;
$this->properties[$key] = encode($number);
}
/**
\brief mise en forme de la photo
\param type
\param photo
\warning NON TESTE !
*/
// UNTESTED !!!
function setPhoto($type, $photo) { // $type = "GIF" | "JPEG"
$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo);
}
/**
\brief mise en forme du nom formate
\param name
*/
function setFormattedName($name) {
$this->properties["FN;CHARSET=".$this->encoding] = encode($name);
}
/**
\brief mise en forme du nom complet
\param family
\param first
\param additional
\param prefix
\param suffix
*/
function setName($family="", $first="", $additional="", $prefix="", $suffix="") {
$this->properties["N;CHARSET=".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix);
$this->filename = "$first%20$family.vcf";
if ($this->properties["FN"]=="") $this->setFormattedName(trim("$prefix $first $additional $family $suffix"));
}
/**
\brief mise en forme de l'anniversaire
\param date
*/
function setBirthday($date) { // $date format is YYYY-MM-DD
$this->properties["BDAY"] = $date;
}
/**
\brief mise en forme de l'adresse
\param postoffice
\param extended
\param street
\param city
\param region
\param zip
\param country
\param type
*/
function setAddress($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") {
// $type may be DOM | INTL | POSTAL | PARCEL | HOME | WORK or any combination of these: e.g. "WORK;PARCEL;POSTAL"
$key = "ADR";
if ($type!="") $key.= ";$type";
$key.= ";CHARSET=".$this->encoding;
$this->properties[$key] = encode($name).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country);
if ($this->properties["LABEL;$type;CHARSET=".$this->encoding] == "") {
//$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type);
}
}
/**
\brief mise en forme du label
\param postoffice
\param extended
\param street
\param city
\param region
\param zip
\param country
\param type
*/
function setLabel($postoffice="", $extended="", $street="", $city="", $region="", $zip="", $country="", $type="HOME;POSTAL") {
$label = "";
if ($postoffice!="") $label.= "$postoffice\r\n";
if ($extended!="") $label.= "$extended\r\n";
if ($street!="") $label.= "$street\r\n";
if ($zip!="") $label.= "$zip ";
if ($city!="") $label.= "$city\r\n";
if ($region!="") $label.= "$region\r\n";
if ($country!="") $country.= "$country\r\n";
$this->properties["LABEL;$type;CHARSET=".$this->encoding] = encode($label);
}
/**
\brief Mise en forme de l'email
\param address EMail
\param type Vcard type
*/
function setEmail($address,$type="internet,pref") {
$this->properties["EMAIL;TYPE=".$type] = $address;
}
/**
\brief mise en forme de la note
\param note
*/
function setNote($note) {
$this->properties["NOTE;CHARSET=".$this->encoding] = encode($note);
}
/**
\brief mise en forme de la fonction
\param title
*/
function setTitle($title) {
$this->properties["TITLE;CHARSET=".$this->encoding] = encode($title);
}
/**
\brief mise en forme de la societe
\param org
*/
function setOrg($org) {
$this->properties["ORG;CHARSET=".$this->encoding] = encode($org);
}
/**
\brief mise en forme du logiciel generateur
\param prodid
*/
function setProdId($prodid) {
$this->properties["PRODID;CHARSET=".$this->encoding] = encode($prodid);
}
/**
\brief mise en forme du logiciel generateur
\param uid
*/
function setUID($uid) {
$this->properties["UID;CHARSET=".$this->encoding] = encode($uid);
}
/**
\brief mise en forme de l'url
\param url
\param type
*/
function setURL($url, $type="") {
// $type may be WORK | HOME
$key = "URL";
if ($type!="") $key.= ";$type";
$this->properties[$key] = $url;
}
/**
\brief permet d'obtenir une vcard
*/
function getVCard() {
$text = "BEGIN:VCARD\r\n";
//$text.= "VERSION:3.0\r\n";
$text.= "VERSION:2.1\r\n";
foreach($this->properties as $key => $value) {
$text.= "$key:$value\r\n";
}
$text.= "REV:".date("Y-m-d")."T".date("H:i:s")."Z\r\n";
$text.= "MAILER:php vCard class by Kai Blankenhorn\r\n";
$text.= "END:VCARD\r\n";
return $text;
}
/**
\brief permet d'obtenir le nom de fichier
*/
function getFileName() {
return $this->filename;
}
}
?>

View File

@ -15,14 +15,14 @@ BoxLastCustomerOrders=Last customer orders
BoxLastBooks=Last books
BoxLastActions=Last actions
BoxLastContracts=Last contracts
BoxLastContacts=Last contacts/addresses
BoxLastContacts=Derniers contacts/adresses
BoxLastMembers=Last members
BoxCurrentAccounts=Current accounts balance
BoxSalesTurnover=Sales turnover
BoxTotalUnpaidCustomerBills=Total unpaid customer's invoices
BoxTotalUnpaidSuppliersBills=Total unpaid supplier's invoices
BoxTitleLastBooks=Last %s recorded books
BoxTitleNbOfCustomers=Number of clients
BoxTitleNbOfCustomers=Nombre de client
BoxTitleLastRssInfos=Last %s news from %s
BoxTitleLastProducts=Last %s modified products/services
BoxTitleLastCustomerOrders=Last %s modified customer orders
@ -44,11 +44,11 @@ BoxTitleCurrentAccounts=Current account's balances
BoxTitleSalesTurnover=Sales turnover
BoxTitleTotalUnpaidCustomerBills=Unpaid customer's invoices
BoxTitleTotalUnpaidSuppliersBills=Unpaid supplier's invoices
BoxTitleLastModifiedContacts=Last %s modified contacts/addresses
BoxTitleLastModifiedContacts=Last %s modified contacts/addresses
BoxMyLastBookmarks=My last %s bookmarks
FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Last successfull refresh date: %s
LastRefreshDate=Last refresh date
NoRecordedBookmarks=No bookmarks defined.
NoRecordedBookmarks=No bookmarks defined.
ClickToAdd=Click here to add.
NoRecordedCustomers=No recorded customers
NoRecordedContacts=No recorded contacts

View File

@ -86,4 +86,3 @@ ErrorProductWithRefNotExist=Product with reference '<i>%s</i>' don't exist
ErrorDeleteNotPossibleLineIsConsolidated=Delete not possible because record is linked to a bank transation that is conciliated
ErrorProdIdAlreadyExist=%s is assigned to another third
ErrorFailedToSendPassword=Failed to send password
ErrorFailedToLoadRSSFile=Fails to get RSS feed. Try to add constant MAIN_SIMPLEXMLLOAD_DEBUG if error messages does not provide enough information.

View File

@ -87,4 +87,3 @@ ErrorProductWithRefNotExist=La référence produit '<i>%s</i>' n'existe pas
ErrorDeleteNotPossibleLineIsConsolidated=Suppression impossible car l'enregistrement porte sur au moins une transaction bancaire rapprochée
ErrorProdIdAlreadyExist=%s est attribué à un autre tiers
ErrorFailedToSendPassword=Échec de l'envoi du mot de passe
ErrorFailedToLoadRSSFile=Echec de la récupération du flux RSS. Ajouter la constante MAIN_SIMPLEXMLLOAD_DEBUG si le message d'erreur n'est pas assez explicite.

View File

@ -10,12 +10,12 @@
// Reference language: en_US
CHARSET=UTF-8
BoxLastRssInfos=Информация RSS
BoxLastProducts=Последние %s товары / услуги
BoxLastProductsInContract=Последние %s проданные товары / услуги
BoxLastProducts=Последние %s товаров / услуг
BoxLastProductsInContract=Последние %s проданных товаров / услуг
BoxLastSupplierBills=Последние счета-фактуры поставщиков
BoxLastCustomerBills=Последние счета-фактуры покупателям
BoxLastProposals=Последние коммерческие предложения
BoxLastProspects=Последние измененные потенциальные клиенты
BoxLastProspects=Последние измененные потенциальные покупатели
BoxLastCustomers=Последние измененные покупатели
BoxLastCustomerOrders=Последние заказы покупателей
BoxLastSuppliers=Последние измененные поставщики
@ -26,8 +26,8 @@ BoxSalesTurnover=Оборот по продажам
BoxTitleLastBooks=Последние %s зарегистрированных сделок
BoxTitleNbOfCustomers=Кол-во покупателей
BoxTitleLastRssInfos=Последние новости %s из %s
BoxTitleLastProducts=Последние %s измененные товары / услуги
BoxTitleLastCustomerOrders=Последние %s измененные заказы покупателей
BoxTitleLastProducts=Последние %s измененных товаров / услуг
BoxTitleLastCustomerOrders=Последние %s измененных заказов покупателей
BoxTitleLastSuppliers=Последние %s зарегистрированных поставщиков
BoxTitleLastCustomers=Последние %s зарегистрированных покупателей
BoxTitleLastCustomersOrProspects=Последние %s зарегистрированных покупателей и потенциальных клиентов
@ -48,10 +48,20 @@ NoRecordedOrders=Нет зарегистрированных заказы пок
NoRecordedProposals=Нет зарегистрированных предложений
NoRecordedInvoices=Нет зарегистрированных счетов-фактур покупателям
NoRecordedSupplierInvoices=Нет зарегистрированных счетов-фактур поставщиков
// Date 2009-01-19 21:30:52
// STOP - Lines generated via parser
// START - Lines generated via autotranslator.php tool (2009-08-13 21:14:36).
// Reference language: en_US
LastRefreshDate=Дата последнего обновления
NoRecordedProducts=Нет зарегистрированных товаров / услуг
NoRecordedProspects=Нет зарегистрированных потенциальных клиентов
NoContractedProducts=Нет законтрактованных товаров / услуг
// STOP - Lines generated via autotranslator.php tool (2009-08-13 21:14:36).
// START - Lines generated via autotranslator.php tool (2009-08-19 20:18:27).
// Reference language: en_US
BoxOldestUnpaidCustomerBills=Самые старые неоплаченные счета-фактуры покупателям
BoxOldestUnpaidSupplierBills=Самые старые неоплаченные счета-фактуры поставщиков
BoxTotalUnpaidCustomerBills=Общая сумма неоплаченных счетов-фактур покупателям
@ -62,21 +72,11 @@ BoxTitleTotalUnpaidCustomerBills=Неоплаченные счета-факту
BoxTitleTotalUnpaidSuppliersBills=Неоплаченные счета-фактуры поставщиков
NoUnpaidCustomerBills=Нет неоплаченных счетов-фактур покупателям
NoUnpaidSupplierBills=Нет неоплаченных счетов-фактур поставщиков
// STOP - Lines generated via autotranslator.php tool (2009-08-19 20:18:27).
// START - Lines generated via autotranslator.php tool (2010-09-04 01:33:40).
// Reference language: en_US -> ru_RU
BoxTitleLastModifiedSuppliers=Последнее %s измененных поставщиков
BoxTitleLastModifiedCustomers=Последнее %s измененных покупателей
BoxTitleLastModifiedCustomers=Последнее %s измененных клиентов
BoxTitleLastModifiedProspects=Последнее %s измененных потенциальных клиентов
BoxLastContracts=Последние договоры
BoxLastContacts=Последние контакты / адреса
BoxLastMembers=Последнее участники
BoxTitleLastModifiedCustomers=Последние %s измененных покупателей
BoxTitleLastModifiedProspects=Последние %s измененных потенциальных клиентов
BoxTitleLastProductsInContract=Последние %s товаров / услуг в договорах
BoxTitleLastModifiedMembers=Последние %s измененных участников
BoxTitleLastModifiedContacts=Последние %s измененных контактов / адресов
NoRecordedContacts=Нет введенных контактов
BoxTitleLastContracts=Последние %s договоров
BoxTitleLastModifiedDonations=Последние %s измененных пожертвований
BoxTitleLastModifiedExpenses=Последние %s измененных расходов
NoModifiedSupplierBills=Нет введенных счетов-фактур поставщиков
NoRecordedContracts=Нет введенных договоров
// STOP - Lines generated via autotranslator.php tool (2011-08-25 22:47:13).
// STOP - Lines generated via autotranslator.php tool (2010-09-04 01:56:40).

View File

@ -24,7 +24,7 @@
/**
* \file htdocs/lib/CMailFile.class.php
* \brief File of class to send emails (with attachments or not)
* \version $Id: CMailFile.class.php,v 1.149 2011/08/26 23:19:53 eldy Exp $
* \version $Id: CMailFile.class.php,v 1.148 2011/07/31 23:25:43 eldy Exp $
* \author Dan Potter.
* \author Eric Seigne
* \author Laurent Destailleur.
@ -235,7 +235,7 @@ class CMailFile
// Use SMTPS library
// ------------------------------------------
require_once(DOL_DOCUMENT_ROOT."/core/class/smtps.php");
require_once(DOL_DOCUMENT_ROOT."/includes/smtps/SMTPs.php");
$smtps = new SMTPs();
$smtps->setCharSet($conf->file->character_set_client);

View File

@ -19,7 +19,7 @@
/**
* \file htdocs/lib/files.lib.php
* \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
*
* @param file Filename we looking for MIME type
* @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
@ -296,7 +295,6 @@ function dol_mimetype($file,$default='application/octet-stream',$mode=0)
/**
* Test if filename is a directory
*
* @param folder Name of folder
* @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
*
* @param $pathoffile
* @return boolean True or false
*/
@ -319,26 +316,8 @@ function dol_is_file($pathoffile)
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
*
* @param folder Name of folder
* @return boolean True if dir is empty or non-existing, False if it contains files
*/