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

Commit 1af52f1

Browse files
committed
Allow use DateTime object as parameter for query creation
1 parent c68e47c commit 1af52f1

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

debian/fixversion.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/bin/bash
2-
PACKAGE=`cat debian/composer.json | grep '"name"' | head -n 1 | awk -F'"' '{print $4}'`
3-
VERSION=`cat debian/composer.json | grep version | awk -F'"' '{print $4}'`
4-
sed -i -e '/\"version\"/c\ \"version\": \"'${VERSION}'",' debian/flexipeehp/usr/share/php/FlexiPeeHP/composer.json
5-
6-
sed -i -e "/public static \$libVersion/c\ public static \$libVersion = '${VERSION}';" debian/flexipeehp/usr/share/php/FlexiPeeHP/FlexiBeeRO.php
7-
sed -i -e "/public static \$libVersion/c\ public static \$libVersion = '${VERSION}';" src/FlexiPeeHP/FlexiBeeRO.php
2+
VERSTR=`dpkg-parsechangelog --show-field Version`
3+
sed -i -e '/\"version\"/c\ \"version\": \"'${VERSTR}'",' debian/flexipeehp/usr/share/php/FlexiPeeHP/composer.json
4+
sed -i -e "/public static \$libVersion/c\ public static \$libVersion = '${VERSTR}';" debian/flexipeehp/usr/share/php/FlexiPeeHP/FlexiBeeRO.php
5+
sed -i -e "/public static \$libVersion/c\ public static \$libVersion = '${VERSTR}';" src/FlexiPeeHP/FlexiBeeRO.php
86

97
#dch -b -v ${VERSION}-${REVISION} --package "${PACKAGE}" "${CHANGES}"

src/FlexiPeeHP/FlexiBeeRO.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,8 @@ public static function flexiUrl(array $data, $joiner = 'and', $defop = 'eq')
17801780
case 'DatePeriod':
17811781
$parts[$column] = $column." between '".$data[$column]->getStartDate()->format(self::$DateFormat)."' '".$data[$column]->getEndDate()->format(self::$DateFormat)."'";
17821782
break;
1783+
case 'DateTime':
1784+
$parts[$column] = $column." eq '".$data[$column]->format(self::$DateFormat)."'";
17831785
default:
17841786
$parts[$column] = $column." $defop '".$data[$column]."'";
17851787
break;

0 commit comments

Comments
 (0)