This is 1.6

This commit is contained in:
Bernd Bestel 2017-11-05 14:48:43 +01:00
parent 2d5ed67ae1
commit 9114dec695
8 changed files with 15 additions and 13 deletions

View File

@ -59,7 +59,7 @@ class Grocy
*/
public static function ExecuteDbStatement(PDO $pdo, string $sql)
{
if ($pdo->exec(utf8_encode($sql)) === false)
if ($pdo->exec($sql) === false)
{
throw new Exception($pdo->errorInfo());
}
@ -74,7 +74,7 @@ class Grocy
{
if (self::ExecuteDbStatement($pdo, $sql) === true)
{
return $pdo->query(utf8_encode($sql));
return $pdo->query($sql);
}
return false;
@ -96,7 +96,7 @@ class Grocy
{
if (self::$InstalledVersion == null)
{
self::$InstalledVersion = file_get_contents(__DIR__ . '/version.txt');
self::$InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/version.txt'));
}
return self::$InstalledVersion;

View File

@ -9,11 +9,11 @@ class GrocyDemoDataGenerator
{
$sql = "
UPDATE locations SET name = 'Vorratskammer', description = '' WHERE id = 1;
INSERT INTO locations (name) VALUES ('S<EFBFBD><EFBFBD>igkeitenschrank'); --2
INSERT INTO locations (name) VALUES ('Süßigkeitenschrank'); --2
INSERT INTO locations (name) VALUES ('Konservenschrank'); --3
INSERT INTO locations (name) VALUES ('K<EFBFBD>hlschrank'); --4
INSERT INTO locations (name) VALUES ('Kühlschrank'); --4
UPDATE quantity_units SET name = 'St<EFBFBD>ck' WHERE id = 1;
UPDATE quantity_units SET name = 'Stück' WHERE id = 1;
INSERT INTO quantity_units (name) VALUES ('Packung'); --2
INSERT INTO quantity_units (name) VALUES ('Glas'); --3
INSERT INTO quantity_units (name) VALUES ('Dose'); --4
@ -21,14 +21,14 @@ class GrocyDemoDataGenerator
INSERT INTO quantity_units (name) VALUES ('Bund'); --6
DELETE FROM products WHERE id IN (1, 2);
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock, min_stock_amount) VALUES ('Gummib<EFBFBD>rchen', 2, 2, 2, 1, 8); --3
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock, min_stock_amount) VALUES ('Gummibärchen', 2, 2, 2, 1, 8); --3
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock, min_stock_amount) VALUES ('Chips', 2, 2, 2, 1, 10); --4
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Eier', 1, 2, 1, 10); --5
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Nudeln', 1, 2, 2, 1); --6
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Essiggurken', 3, 3, 3, 1); --7
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Gulaschsuppe', 3, 4, 4, 1); --8
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Joghurt', 4, 5, 5, 1); --9
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('K<EFBFBD>se', 4, 2, 2, 1); --10
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Käse', 4, 2, 2, 1); --10
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Aufschnitt', 4, 2, 2, 1); --11
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Paprika', 4, 1, 1, 1); --12
INSERT INTO products (name, location_id, qu_id_purchase, qu_id_stock, qu_factor_purchase_to_stock) VALUES ('Gurke', 4, 1, 1, 1); --13

View File

@ -7,6 +7,6 @@ mkdir "%releasePath%"
for /f "tokens=*" %%a in ('type version.txt') do set version=%%a
del "%releasePath%\grocy_%version%.zip"
"build_tools\7za.exe" a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\*" -xr!.* -xr!build_tools -xr!build.bat -xr!composer.json -xr!composer.lock -xr!composer.phar -xr!grocy.phpproj -xr!grocy.phpproj.user -xr!grocy.sln -xr!bower.json -xr!publication_assets
"build_tools\7za.exe" a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\*" -xr!.* -xr!build_tools -xr!build.bat -xr!composer.json -xr!composer.lock -xr!bower.json -xr!publication_assets
"build_tools\7za.exe" a -r "%releasePath%\grocy_%version%.zip" "%projectPath%\.htaccess"
"build_tools\7za.exe" d "%releasePath%\grocy_%version%.zip" data\*.* data\sessions

View File

@ -1 +1 @@
1.5.0
1.6.0

View File

@ -1,6 +1,6 @@
$(function()
{
$('#habits-overview-table').DataTable({
$('#batteries-overview-table').DataTable({
'pageLength': 50,
'order': [[1, 'desc']]
});

View File

@ -26,7 +26,7 @@
<?php echo GrocyLogicBatteries::GetNextChargeTime($curentBatteryEntry->battery_id); ?>
<time class="timeago timeago-contextual" datetime="<?php echo GrocyLogicBatteries::GetNextChargeTime($curentBatteryEntry->battery_id); ?>"></time>
<?php else: ?>
Whenever you want...
...
<?php endif; ?>
</td>
</tr>

View File

@ -22,7 +22,7 @@
<?php echo GrocyLogicHabits::GetNextHabitTime($curentHabitEntry->habit_id); ?>
<time class="timeago timeago-contextual" datetime="<?php echo GrocyLogicHabits::GetNextHabitTime($curentHabitEntry->habit_id); ?>"></time>
<?php else: ?>
Whenever you want...
...
<?php endif; ?>
</td>
<td>

View File

@ -64,6 +64,7 @@
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="disabled"><a href="#"><strong>Record data</strong></a></li>
<li data-nav-for-page="purchase.php">
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;Purchase</a>
</li>
@ -131,6 +132,7 @@
</ul>
<ul class="nav nav-sidebar">
<li class="disabled"><a href="#"><strong>Record data</strong></a></li>
<li data-nav-for-page="purchase.php">
<a class="discrete-link" href="/purchase"><i class="fa fa-shopping-cart fa-fw"></i>&nbsp;Purchase</a>
</li>