From 6695bf027e48c91b6baf08ccf21e271a02658347 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 13 Sep 2018 09:51:28 +0200 Subject: [PATCH 1/2] added nategood/httpful to composer in core --- composer.json | 2 ++ composer.lock | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 0b1b06750..f8e26e736 100644 --- a/composer.json +++ b/composer.json @@ -267,6 +267,8 @@ "ml/json-ld": "1.*", "mottie/tablesorter": "^2.29", + "nategood/httpful": "^0.2.20", + "netcarver/textile": "^3.5", "nicolaskruchten/pivottable": "^2.15.0", diff --git a/composer.lock b/composer.lock index 0e505abcd..a160578ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0a7b99cf08f40f15cad6397a2097d834", - "content-hash": "4065f6ebe38d16462908ebbdac8adf7d", + "hash": "e5e3e110545316baa4087a8e1a283a7c", + "content-hash": "e191f9af8e2103de78eaa130122ec72b", "packages": [ { "name": "BlackrockDigital/startbootstrap-sb-admin-2", @@ -1159,6 +1159,56 @@ ], "time": "2018-07-10 13:32:19" }, + { + "name": "nategood/httpful", + "version": "0.2.20", + "source": { + "type": "git", + "url": "https://github.com/nategood/httpful.git", + "reference": "c1cd4d46a4b281229032cf39d4dd852f9887c0f6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nategood/httpful/zipball/c1cd4d46a4b281229032cf39d4dd852f9887c0f6", + "reference": "c1cd4d46a4b281229032cf39d4dd852f9887c0f6", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "psr-0": { + "Httpful": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nate Good", + "email": "me@nategood.com", + "homepage": "http://nategood.com" + } + ], + "description": "A Readable, Chainable, REST friendly, PHP HTTP Client", + "homepage": "http://github.com/nategood/httpful", + "keywords": [ + "api", + "curl", + "http", + "requests", + "rest", + "restful" + ], + "time": "2015-10-26 16:11:30" + }, { "name": "netcarver/textile", "version": "v3.6.0", From 0916a27ecbca59c7d0e876fce022f57bf77f444a Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 13 Sep 2018 09:55:06 +0200 Subject: [PATCH 2/2] - replaced spaces by hyphens in lv group names - updated comment for getBenutzerFunktionen --- application/models/education/Lehrveranstaltung_model.php | 2 +- application/models/person/Benutzerfunktion_model.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/application/models/education/Lehrveranstaltung_model.php b/application/models/education/Lehrveranstaltung_model.php index c55ce8e10..e2578b388 100644 --- a/application/models/education/Lehrveranstaltung_model.php +++ b/application/models/education/Lehrveranstaltung_model.php @@ -88,7 +88,7 @@ class Lehrveranstaltung_model extends DB_Model $query = " - SELECT lehrveranstaltung_id, ? || '_' || kuerzel || '_' || lvpostfix AS lvgroupname + SELECT lehrveranstaltung_id, ? || '_' || kuerzel || '_' || replace(lvpostfix, ' ', '-') AS lvgroupname FROM( SELECT DISTINCT ON (kuerzel, lvpostfix) lehrveranstaltung_id, diff --git a/application/models/person/Benutzerfunktion_model.php b/application/models/person/Benutzerfunktion_model.php index 6a15df107..e6f030e7f 100644 --- a/application/models/person/Benutzerfunktion_model.php +++ b/application/models/person/Benutzerfunktion_model.php @@ -25,8 +25,10 @@ class Benutzerfunktion_model extends DB_Model /** * Gets all Benutzer for a given OE and specified Benutzerfunktionen - * @param $oe_kurzbz * @param $funktion_kurzbz string with one benutzerfunktionname or array with one or more + * @param $oe_kurzbz + * @param bool $activeoeonly if true, retrieve only active Organisationseinheiten + * @param bool $activebenonly if true, retrieve only active Benutzer * @return array|null */ public function getBenutzerFunktionen($funktion_kurzbz, $oe_kurzbz = null, $activeoeonly = false, $activebenonly = false) @@ -41,7 +43,7 @@ class Benutzerfunktion_model extends DB_Model if ($activebenonly === true) $query .= " JOIN public.tbl_benutzer USING(uid)"; - $query .= "WHERE (datum_von <= NOW() OR datum_von IS NULL) AND (datum_bis >= NOW() OR datum_bis IS NULL)"; + $query .= " WHERE (datum_von <= NOW() OR datum_von IS NULL) AND (datum_bis >= NOW() OR datum_bis IS NULL)"; if (is_string($funktion_kurzbz)) {