-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPhotoStation_VideosOnMap.patch
More file actions
96 lines (78 loc) · 3.5 KB
/
PhotoStation_VideosOnMap.patch
File metadata and controls
96 lines (78 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
diff -cr Original/include/file.php Patched/include/file.php
*** Original/include/file.php 2019-05-30 05:57:54.000000000 +0200
--- Patched/include/file.php 2020-04-04 14:50:35.000000000 +0200
***************
*** 369,375 ****
return $params;
}
! public static function ListGPSGroup ($sharename, $labels, $bounds, $zoom = 5, $hasPhoto = true, $hasVideo = false)
{
// init variables
$items = array('total' => 0, 'items' => array());
--- 369,375 ----
return $params;
}
! public static function ListGPSGroup ($sharename, $labels, $bounds, $zoom = 5, $hasPhoto = true, $hasVideo = true)
{
// init variables
$items = array('total' => 0, 'items' => array());
***************
*** 391,404 ****
}
// TODO: array('*') means get all fields of photo_image
! // if hasVideo = true, this query will be crashed
$query_params = self::GetQueryByConditions($hasPhoto, $hasVideo, array(
'sharename' => $sharename,
'labels' => $labels,
'gps' => true,
'bounds' => $simpleBounds
! ), array('*'));
if (false === $query_params) {
goto End;
--- 391,405 ----
}
// TODO: array('*') means get all fields of photo_image
! // if hasVideo = true, this query will be crashed --> corrected by flingo64 and DaCapitalist
$query_params = self::GetQueryByConditions($hasPhoto, $hasVideo, array(
'sharename' => $sharename,
'labels' => $labels,
'gps' => true,
'bounds' => $simpleBounds
! //), array('*'));
! ), array('id', 'disabled', 'gps', 'resolutionx', 'resolutiony', 'shareid', 'privilege_shareid', 'lat', 'lng'));
if (false === $query_params) {
goto End;
diff -cr Original/webapi/photo.php Patched/webapi/photo.php
*** Original/webapi/photo.php 2019-05-30 05:57:54.000000000 +0200
--- Patched/webapi/photo.php 2020-04-04 15:09:33.000000000 +0200
***************
*** 267,273 ****
}
$hasPhoto = in_array('photo', $params['type']);
! $hasVideo = in_array('video', $params['type']);
// create the variable which name is the same as the key of params
foreach ($params as $k => $v) {
--- 267,274 ----
}
$hasPhoto = in_array('photo', $params['type']);
! //$hasVideo = in_array('video', $params['type']);
! $hasVideo = true;
// create the variable which name is the same as the key of params
foreach ($params as $k => $v) {
***************
*** 919,928 ****
}
if ("album" === $params['listType']) {
! $itemObjs = File::ListGPSGroup($params['sharename'], array(), $params['bounds'], $params['zoom'], in_array('photo', $params['type']), false);
} else if ("label" === $params["listType"]) {
! $itemObjs = File::ListGPSGroup('/', $params['labelIds'], $params['bounds'], $params['zoom'], in_array('photo', $params['type']), false);
} else if ("smart" === $params["listType"]) {
$itemObjs = SmartAlbum::GetSmartAlbumInstance()->ListGPSGroup($params['smart'], $params['bounds'], $params['zoom']);
--- 920,929 ----
}
if ("album" === $params['listType']) {
! $itemObjs = File::ListGPSGroup($params['sharename'], array(), $params['bounds'], $params['zoom'], in_array('photo', $params['type']), true);
} else if ("label" === $params["listType"]) {
! $itemObjs = File::ListGPSGroup('/', $params['labelIds'], $params['bounds'], $params['zoom'], in_array('photo', $params['type']), true);
} else if ("smart" === $params["listType"]) {
$itemObjs = SmartAlbum::GetSmartAlbumInstance()->ListGPSGroup($params['smart'], $params['bounds'], $params['zoom']);