Skip to content

Commit d8c0480

Browse files
author
MTier Ltd
committed
move the old mapper to a different namespace and fix write operations
by using OCP\AppFramework\Db\Entity in the compat mapper fixes #211
1 parent b271494 commit d8c0480

15 files changed

+30
-5
lines changed

appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Mit dem integrierten Dashboard lässt sich anhand eines Kuchen-/Donut-Diagramms
3535

3636
Diese App wird aktuell noch weiterentwickelt, also: Augen offen halten für neue Features! Und falls Dir irgendwelche Verbesserungsvorschläge, Probleme oder neue Features einfallen, schau mal auf unserem [GitHub Projekt](https://github.com/mtierltd/timetracker) vorbei, vielleicht wird Dein Thema bereits diskutiert! Und falls nicht, starte gerne eine neue Diskussion, wir freuen uns auf Dein Feedback!
3737
</description>
38-
<version>0.0.78</version>
38+
<version>0.0.79</version>
3939
<licence>agpl</licence>
4040
<author mail="[email protected]" >MTier Ltd.</author>
4141
<namespace>TimeTracker</namespace>

lib/Db/OldNextcloudMapper.php renamed to lib/AppFramework/Db/OldNextcloudMapper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
* along with this program. If not, see <http://www.gnu.org/licenses/>
2626
*
2727
*/
28-
namespace OCA\TimeTracker\Db;
28+
namespace OCA\TimeTracker\AppFramework\Db;
2929

3030
use OCP\AppFramework\Db\DoesNotExistException;
31+
use OCP\AppFramework\Db\Entity;
3132
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
3233
use OCP\IDBConnection;
3334

lib/AppInfo/Application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class Application extends App {
2626
public function __construct(array $urlParams=array()){
2727
parent::__construct('timetracker', $urlParams);
2828

29-
if (!\class_exists('\OCA\TimeTracker\Db\CompatibleMapper')) {
29+
if (!\class_exists('\OCA\TimeTracker\AppFramework\Db\CompatibleMapper')) {
3030
if (\class_exists(\OCP\AppFramework\Db\Mapper::class)) {
31-
\class_alias(\OCP\AppFramework\Db\Mapper::class, 'OCA\TimeTracker\Db\CompatibleMapper');
31+
\class_alias(\OCP\AppFramework\Db\Mapper::class, 'OCA\TimeTracker\AppFramework\Db\CompatibleMapper');
3232
} else {
33-
\class_alias(\OCA\TimeTracker\Db\OldNextcloudMapper::class, 'OCA\TimeTracker\Db\CompatibleMapper');
33+
\class_alias(\OCA\TimeTracker\AppFramework\Db\OldNextcloudMapper::class, 'OCA\TimeTracker\AppFramework\Db\CompatibleMapper');
3434
}
3535
}
3636

lib/Db/ClientMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class ClientMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

lib/Db/GoalMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class GoalMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

lib/Db/ProjectMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class ProjectMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

lib/Db/ReportItemMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class ReportItemMapper extends CompatibleMapper {
911

1012

lib/Db/TagMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class TagMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

lib/Db/TimelineEntryMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class TimelineEntryMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

lib/Db/TimelineMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
use OCP\IDBConnection;
77

8+
use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;
9+
810
class TimelineMapper extends CompatibleMapper {
911

1012
public function __construct(IDBConnection $db) {

0 commit comments

Comments
 (0)