Skip to content

Commit

Permalink
move the old mapper to a different namespace and fix write operations
Browse files Browse the repository at this point in the history
by using OCP\AppFramework\Db\Entity in the compat mapper

fixes mtierltd#211
  • Loading branch information
MTier Ltd committed Mar 26, 2023
1 parent b271494 commit d8c0480
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Mit dem integrierten Dashboard lässt sich anhand eines Kuchen-/Donut-Diagramms

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!
</description>
<version>0.0.78</version>
<version>0.0.79</version>
<licence>agpl</licence>
<author mail="[email protected]" >MTier Ltd.</author>
<namespace>TimeTracker</namespace>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
namespace OCA\TimeTracker\Db;
namespace OCA\TimeTracker\AppFramework\Db;

use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\Entity;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\IDBConnection;

Expand Down
6 changes: 3 additions & 3 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ class Application extends App {
public function __construct(array $urlParams=array()){
parent::__construct('timetracker', $urlParams);

if (!\class_exists('\OCA\TimeTracker\Db\CompatibleMapper')) {
if (!\class_exists('\OCA\TimeTracker\AppFramework\Db\CompatibleMapper')) {
if (\class_exists(\OCP\AppFramework\Db\Mapper::class)) {
\class_alias(\OCP\AppFramework\Db\Mapper::class, 'OCA\TimeTracker\Db\CompatibleMapper');
\class_alias(\OCP\AppFramework\Db\Mapper::class, 'OCA\TimeTracker\AppFramework\Db\CompatibleMapper');
} else {
\class_alias(\OCA\TimeTracker\Db\OldNextcloudMapper::class, 'OCA\TimeTracker\Db\CompatibleMapper');
\class_alias(\OCA\TimeTracker\AppFramework\Db\OldNextcloudMapper::class, 'OCA\TimeTracker\AppFramework\Db\CompatibleMapper');
}
}

Expand Down
2 changes: 2 additions & 0 deletions lib/Db/ClientMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class ClientMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/GoalMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class GoalMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/ProjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class ProjectMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/ReportItemMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class ReportItemMapper extends CompatibleMapper {


Expand Down
2 changes: 2 additions & 0 deletions lib/Db/TagMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class TagMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/TimelineEntryMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class TimelineEntryMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/TimelineMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class TimelineMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/UserToClientMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class UserToClientMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/UserToProjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class UserToProjectMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/WorkIntervalMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class WorkIntervalMapper extends CompatibleMapper {

private $dbengine;
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/WorkIntervalToTagMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class WorkIntervalToTagMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down
2 changes: 2 additions & 0 deletions lib/Db/WorkItemMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

use OCP\IDBConnection;

use OCA\TimeTracker\AppFramework\Db\CompatibleMapper;

class WorkItemMapper extends CompatibleMapper {

public function __construct(IDBConnection $db) {
Expand Down

0 comments on commit d8c0480

Please sign in to comment.