Skip to content
This repository was archived by the owner on Jul 29, 2020. It is now read-only.

Commit d21f002

Browse files
committed
version 1.11
php5.3 to php7.2 initial support
1 parent 195b0e9 commit d21f002

5 files changed

Lines changed: 28 additions & 7 deletions

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ clean:
2121
rm -rf debian/*.substvars
2222
rm -rf docs/*
2323
rm -f debianTest/composer.lock
24+
rm -rf vendor/* composer.lock
2425

2526
doc:
2627
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`; \

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
}
1010
],
1111
"require": {
12-
"php": ">= 5.6",
12+
"php": ">=5.6 <7.3",
1313
"ext-curl": "*",
14-
"vitexsoftware/ease-framework": "dev-master"
14+
"vitexsoftware/ease-framework": "dev-master *"
1515
},
1616
"autoload": {
1717
"psr-4": {

debian/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "PHP Based Library for easy interaction with czech accounting system Flexibee.",
44
"homepage": "https://github.com/Spoje-NET/FlexiPeeHP",
55
"license": "GPL-2.0+",
6-
"version": "1.10",
6+
"version": "1.11",
77
"type": "library",
88
"authors": [
99
{

src/FlexiPeeHP/FlexiBeeRO.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ class FlexiBeeRO extends \Ease\Sand
277277
'delimeter',
278278
'detail', //See: https://www.flexibee.eu/api/dokumentace/ref/detail-levels
279279
'dir',
280-
'dry-run',
281280
'dry-run', // See: https://www.flexibee.eu/api/dokumentace/ref/dry-run/
282281
'encoding',
283282
'export-settings',
@@ -818,13 +817,16 @@ public function evidenceUrlWithSuffix($urlSuffix)
818817
public function updateApiURL()
819818
{
820819
$this->apiURL = $this->getEvidenceURL();
821-
$id = $this->__toString();
820+
$id = $this->getRecordID();
821+
if(empty($id)){
822+
$id = $this->getRecordCode();
823+
}
822824
if (!empty($id)) {
823825
$this->apiURL .= '/'.self::urlEncode($id);
824826
}
825827
$this->apiURL .= '.'.$this->format;
826828
}
827-
/* * ;
829+
/*
828830
* Add Default Url params to given url if not overrided
829831
*
830832
* @param string $urlRaw
@@ -2241,6 +2243,23 @@ public function downloadInFormat($format, $destDir = './',
22412243
return $fileOnDisk;
22422244
}
22432245

2246+
2247+
/**
2248+
* Take data for object
2249+
*
2250+
* @param array $data Data to keep
2251+
*
2252+
* @return int number of records taken
2253+
*/
2254+
public function takeData($data)
2255+
{
2256+
$result = parent::takeData($data);
2257+
if(array_key_exists($this->getKeyColumn(), $data) || array_key_exists('kod', $data)){
2258+
$this->updateApiURL();
2259+
}
2260+
return $result;
2261+
}
2262+
22442263
/**
22452264
* Compile and send Report about Error500 to FlexiBee developers
22462265
* If FlexiBee is running on localost try also include java backtrace

src/FlexiPeeHP/Stitek.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public static function getLabels($object)
7070
* Convert coma-separated list to array
7171
*
7272
* @param string $listRaw
73+
*
7374
* @return array
7475
*/
7576
public static function listToArray($listRaw)
@@ -80,7 +81,7 @@ public static function listToArray($listRaw)
8081
} else {
8182
$list = [$listRaw => $listRaw];
8283
}
83-
return $list;
84+
return empty($listRaw) ? [] : $list;
8485
}
8586

8687
/**

0 commit comments

Comments
 (0)