Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
['name' => 'PublicPage#showAuthenticate', 'url' => '/s/{token}/authenticate/{redirect}', 'verb' => 'GET'],
['name' => 'PublicPage#authenticate', 'url' => '/s/{token}/authenticate/{redirect}', 'verb' => 'POST'],


// utils
['name' => 'utils#getOptionsValues', 'url' => '/getOptionsValues', 'verb' => 'GET'],
['name' => 'utils#saveOptionValue', 'url' => '/saveOptionValue', 'verb' => 'POST'],
Expand Down
1 change: 0 additions & 1 deletion lib/BackgroundJob/AddPhotoJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use OCP\BackgroundJob\QueuedJob;
use OCP\Files\IRootFolder;
use OCP\ICache;

use OCP\ICacheFactory;

class AddPhotoJob extends QueuedJob {
Expand Down
1 change: 0 additions & 1 deletion lib/BackgroundJob/UpdatePhotoByFileJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use OCP\BackgroundJob\QueuedJob;
use OCP\Files\IRootFolder;
use OCP\ICache;

use OCP\ICacheFactory;

class UpdatePhotoByFileJob extends QueuedJob {
Expand Down
1 change: 0 additions & 1 deletion lib/BackgroundJob/UserInstallScanJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\QueuedJob;

use OCP\IConfig;
use OCP\IUserManager;
use Psr\Log\LoggerInterface;
Expand Down
1 change: 0 additions & 1 deletion lib/Command/RescanPhotos.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;

use Symfony\Component\Console\Output\OutputInterface;

class RescanPhotos extends Command {
Expand Down
1 change: 0 additions & 1 deletion lib/Command/RescanTracks.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;

use Symfony\Component\Console\Output\OutputInterface;

class RescanTracks extends Command {
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ private function setAddressCoordinates(float $lat, float $lng, string $adr, stri
}
}


/**
* get contacts with coordinates
*
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/MyMapsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

class MyMapsController extends Controller {


public function __construct(
string $AppName,
IRequest $request,
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PhotosController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function getNonLocalizedPhotos(?int $myMapId = null, ?string $timezone =
return new DataResponse($result);
}


/**
* @param $paths
* @param $lats
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PublicContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ private function N2FN(string $n): ?string {
}
}


/**
* @throws NotFoundException
* @throws NotPermittedException
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PublicFavoritesApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*
*/


namespace OCA\Maps\Controller;

use OCA\Maps\DB\FavoriteShareMapper;
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PublicPhotosController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IAppConfig;

use OCP\IRequest;
use OCP\ISession;
use OCP\IURLGenerator;
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/PublicTracksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use OCP\Share;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager as ShareManager;

use function OCA\Maps\Helper\remove_utf8_bom;

class PublicTracksController extends PublicPageController {
Expand Down
2 changes: 0 additions & 2 deletions lib/Controller/PublicUtilsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public function getOptionsValues(): DataResponse {
// Share map by sharing the folder
$ov['isShareable'] = ($permissions & (1 << 4)) && $folder->isShareable();


// get routing-specific admin settings values
$settingsKeys = [
'osrmCarURL',
Expand All @@ -198,7 +197,6 @@ public function getOptionsValues(): DataResponse {
return new DataResponse(['values' => $ov]);
}


/**
* Get content of mapbox traffic style
*/
Expand Down
1 change: 0 additions & 1 deletion lib/Controller/TracksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;

use function OCA\Maps\Helper\remove_utf8_bom;

class TracksController extends Controller {
Expand Down
5 changes: 0 additions & 5 deletions lib/Controller/UtilsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@
use OCP\App\IAppManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\ContentSecurityPolicy;

use OCP\AppFramework\Http\DataResponse;


use OCP\Files\IRootFolder;

use OCP\Files\NotFoundException;
use OCP\IConfig;
use OCP\IRequest;
use OCP\Lock\LockedException;

class UtilsController extends Controller {


private $config;
private $root;

Expand Down
1 change: 0 additions & 1 deletion lib/DB/DeviceShareMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public function create($deviceId, $timestampFrom, $timestampTo): Entity {
return $this->insert($newShare);
}


/**
* @param $deviceId
* @return DeviceShare[]
Expand Down
3 changes: 0 additions & 3 deletions lib/Helper/ExifGeoData.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class ExifGeoData extends \stdClass implements \JsonSerializable {
*/
private const COORDINATE_MODULO = 60;


/**
* Regex to extract date components from exif parameter
*/
Expand Down Expand Up @@ -245,7 +244,6 @@ private function string2time(string $timestamp): ?int {
return $result;
}


/**
* @param $geo
*/
Expand Down Expand Up @@ -275,7 +273,6 @@ private function string2float(string $value): ?float {
$result = floatval($value);
}
return $result;

}

public function isZeroIsland(): bool {
Expand Down
1 change: 0 additions & 1 deletion lib/Service/AddressService.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ private function lookupAddressExternal(string $adr): array {
$query_adr = 'q=' . urlencode(implode(', ', $splitted_adr));
}


$result_json = @file_get_contents(
'https://nominatim.openstreetmap.org/search?format=jsonv2&' . $query_adr,
false,
Expand Down
4 changes: 0 additions & 4 deletions lib/Service/FavoritesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ public function getFavoritesFromJSON($file): array {
$currentFavorite['extensions'][$key] = $v;
}


}
if (!array_key_exists('category', $currentFavorite)) {
$currentFavorite['category'] = $this->l10n->t('Personal');
Expand Down Expand Up @@ -667,7 +666,6 @@ public function importFavoritesFromKml(string $userId, $fp, string $name): int|a
$this->kmlInsidePlacemark = false;
$this->kmlCurrentCategory = '';


$xml_parser = xml_parser_create();
xml_set_object($xml_parser, $this);
xml_set_element_handler($xml_parser, $this->kmlStartElement(...), $this->kmlEndElement(...));
Expand Down Expand Up @@ -867,7 +865,6 @@ public function importFavoritesFromGeoJSON(string $userId, File $file): array {
$this->currentFavoritesList = [];
$this->importUserId = $userId;


// Decode file content from JSON
$data = json_decode((string)$file->getContent(), true, 512);

Expand Down Expand Up @@ -905,7 +902,6 @@ public function importFavoritesFromGeoJSON(string $userId, File $file): array {
$this->currentFavorite['comment'] = $value['properties']['Location']['Address'];
}


// Store this favorite
array_push($this->currentFavoritesList, $this->currentFavorite);
$this->nbImported++;
Expand Down
2 changes: 0 additions & 2 deletions lib/Service/GeophotoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ public function clearCache(string $userId = ''): bool {
$this->backgroundJobCache->clear('recentlyAdded:' . $userId);
$this->backgroundJobCache->clear('recentlyUpdated:' . $userId);
return true;

} catch (\Exception) {
return false;
}
Expand Down Expand Up @@ -291,7 +290,6 @@ private function getLocationGuesses(int $dateTaken): array {
}
}
return $locations;

}

/*
Expand Down
2 changes: 0 additions & 2 deletions lib/Service/PhotofilesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ public function deleteByFileIdUserId($fileId, $userId): void {
}
}


public function deleteByFolder(Node $folder): void {
$photos = $this->gatherPhotoFiles($folder, true);
foreach ($photos as $photo) {
Expand Down Expand Up @@ -360,7 +359,6 @@ public function addPhotoNow($photo, $userId): void {
}
}


private function insertPhoto($photo, $userId, \OCA\Maps\Helper\ExifGeoData $exif): void {
$photoEntity = new Geophoto();
$photoEntity->setFileId($photo->getId());
Expand Down
1 change: 0 additions & 1 deletion lib/Service/TracksService.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ private function dbRowToTrack(array $row, $folder, $userFolder, bool $defaultMap
];
}


/**
* @return mixed[]
*/
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/Controller/ContactsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace OCA\Maps\Controller;

use OCA\DAV\CardDAV\CardDavBackend;

use OCA\DAV\CardDAV\ContactsManager;
use OCA\Maps\AppInfo\Application;
use OCA\Maps\Service\AddressService;
Expand Down Expand Up @@ -106,7 +105,6 @@ protected function setUp(): void {
$this->root = $c->get(IRootFolder::class);
$this->mapFolder = $this->createMapFolder();


$this->contactsController = new ContactsController(
$this->appName,
$this->request,
Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/Controller/FavoritesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ public function testImportExportFavorites(): void {
$this->assertEquals('Nothing to export', $data);
}



public function testEditFavorites(): void {
// valid edition
$resp = $this->favoritesController->addFavorite('a', 3.1, 4.1, 'cat1', null, null);
Expand Down
40 changes: 20 additions & 20 deletions vendor-bin/csfixer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading