Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
10f9b53557
@ -200,6 +200,10 @@
|
|||||||
|
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||||
|
|
||||||
|
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidClassName" />
|
<rule ref="PEAR.NamingConventions.ValidClassName" />
|
||||||
|
|||||||
@ -200,6 +200,10 @@
|
|||||||
|
|
||||||
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
<rule ref="PEAR.Functions.FunctionCallSignature" />
|
||||||
|
|
||||||
|
<rule ref="PEAR.Functions.FunctionCallSignature.Indent">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
<rule ref="PEAR.Functions.ValidDefaultValue" />
|
||||||
|
|
||||||
<rule ref="PEAR.NamingConventions.ValidClassName" />
|
<rule ref="PEAR.NamingConventions.ValidClassName" />
|
||||||
|
|||||||
@ -25,10 +25,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class Localtax
|
* Class to manage local tax
|
||||||
* \brief Put here description of your class
|
|
||||||
*/
|
*/
|
||||||
class localtax extends CommonObject
|
class Localtax extends CommonObject
|
||||||
{
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $ref;
|
var $ref;
|
||||||
|
|||||||
@ -40,13 +40,13 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//add payment of localtax
|
//add payment of localtax
|
||||||
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||||
{
|
{
|
||||||
$localtax = new localtax($db);
|
$localtax = new Localtax($db);
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
|||||||
//delete payment of localtax
|
//delete payment of localtax
|
||||||
if ($_GET["action"] == 'delete')
|
if ($_GET["action"] == 'delete')
|
||||||
{
|
{
|
||||||
$localtax = new localtax($db);
|
$localtax = new Localtax($db);
|
||||||
$result=$localtax->fetch($_GET['id']);
|
$result=$localtax->fetch($_GET['id']);
|
||||||
|
|
||||||
if ($localtax->rappro == 0)
|
if ($localtax->rappro == 0)
|
||||||
@ -131,7 +131,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$vatpayment = new localtax($db);
|
$vatpayment = new Localtax($db);
|
||||||
$result = $vatpayment->fetch($id);
|
$result = $vatpayment->fetch($id);
|
||||||
if ($result <= 0)
|
if ($result <= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges');
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
$localtax_static = new localtax($db);
|
$localtax_static = new Localtax($db);
|
||||||
|
|
||||||
print_fiche_titre($langs->transcountry("LT2Payments",$mysoc->country_code));
|
print_fiche_titre($langs->transcountry("LT2Payments",$mysoc->country_code));
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2011-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* 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
|
||||||
@ -18,7 +18,11 @@
|
|||||||
/**
|
/**
|
||||||
* \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
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to parse RSS files
|
||||||
*/
|
*/
|
||||||
class RssParser
|
class RssParser
|
||||||
{
|
{
|
||||||
@ -38,20 +42,38 @@ class RssParser
|
|||||||
private $_lastfetchdate; // Last successful fetch
|
private $_lastfetchdate; // Last successful fetch
|
||||||
private $_rssarray=array();
|
private $_rssarray=array();
|
||||||
|
|
||||||
|
// For parsing with xmlparser
|
||||||
|
var $stack = array(); // parser stack
|
||||||
|
var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright');
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
*/
|
||||||
|
public function __construct($db)
|
||||||
|
{
|
||||||
|
$this->db=$db;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getFormat
|
* getFormat
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getFormat() {
|
public function getFormat()
|
||||||
|
{
|
||||||
return $this->_format;
|
return $this->_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* getUrlRss
|
* getUrlRss
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getUrlRss() {
|
public function getUrlRss()
|
||||||
|
{
|
||||||
return $this->_urlRSS;
|
return $this->_urlRSS;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -59,7 +81,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLanguage() {
|
public function getLanguage()
|
||||||
|
{
|
||||||
return $this->_language;
|
return $this->_language;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -67,7 +90,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getGenerator() {
|
public function getGenerator()
|
||||||
|
{
|
||||||
return $this->_generator;
|
return $this->_generator;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -75,7 +99,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getCopyright() {
|
public function getCopyright()
|
||||||
|
{
|
||||||
return $this->_copyright;
|
return $this->_copyright;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -83,7 +108,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLastBuildDate() {
|
public function getLastBuildDate()
|
||||||
|
{
|
||||||
return $this->_lastbuilddate;
|
return $this->_lastbuilddate;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -91,7 +117,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getImageUrl() {
|
public function getImageUrl()
|
||||||
|
{
|
||||||
return $this->_imageurl;
|
return $this->_imageurl;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -99,7 +126,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLink() {
|
public function getLink()
|
||||||
|
{
|
||||||
return $this->_link;
|
return $this->_link;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -107,7 +135,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getTitle() {
|
public function getTitle()
|
||||||
|
{
|
||||||
return $this->_title;
|
return $this->_title;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -115,7 +144,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDescription() {
|
public function getDescription()
|
||||||
|
{
|
||||||
return $this->_description;
|
return $this->_description;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -123,7 +153,8 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getLastFetchDate() {
|
public function getLastFetchDate()
|
||||||
|
{
|
||||||
return $this->_lastfetchdate;
|
return $this->_lastfetchdate;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -131,24 +162,9 @@ class RssParser
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getItems() {
|
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
|
|
||||||
*
|
|
||||||
* @param DoliDB $db Database handler
|
|
||||||
*/
|
|
||||||
public function __construct($db)
|
|
||||||
{
|
{
|
||||||
$this->db=$db;
|
return $this->_rssarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user