@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | // $data[2] – page_name: The wiki page name. |
103 | 103 | // $data[3] – rev: The page revision, false for current wiki pages. |
104 | 104 | |
105 | - dbglog ( $event->data, "Event data in _removeFromIndex." ); |
|
105 | + dbglog($event->data, "Event data in _removeFromIndex."); |
|
106 | 106 | if (@file_exists($event->data [0] [0])) { |
107 | 107 | // file not new |
108 | 108 | if (!$event->data [0] [1]) { |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $path = mediaFN($this->getConf('media_kml')); |
132 | 132 | $lastmod = @filemtime($path); |
133 | 133 | $event->data ['items'] [] = new SitemapItem(ml($this->getConf('media_kml'), '', true, '&', true), $lastmod); |
134 | - dbglog ( $event->data ['items'], "Added a new SitemapItem object that points to the KML of public geocoded pages." ); |
|
134 | + dbglog($event->data ['items'], "Added a new SitemapItem object that points to the KML of public geocoded pages."); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
@@ -146,16 +146,16 @@ discard block |
||
146 | 146 | // $event→data['items']: Array of SitemapItem instances, the array of sitemap items that already contains all public pages of the wiki |
147 | 147 | // $event→data['sitemap']: The path of the file the sitemap will be saved to. |
148 | 148 | |
149 | - dbglog ($event->data['items'], "createSpatialSitemap loading helper" ); |
|
149 | + dbglog($event->data['items'], "createSpatialSitemap loading helper"); |
|
150 | 150 | if ($helper = & plugin_load('helper', 'spatialhelper_sitemap')) { |
151 | - dbglog ( $helper, "createSpatialSitemap loaded helper." ); |
|
151 | + dbglog($helper, "createSpatialSitemap loaded helper."); |
|
152 | 152 | |
153 | 153 | $kml = $helper->createKMLSitemap($this->getConf('media_kml')); |
154 | 154 | $rss = $helper->createGeoRSSSitemap($this->getConf('media_georss')); |
155 | 155 | |
156 | 156 | return $kml && $rss; |
157 | 157 | } else { |
158 | - dbglog ( $helper, "createSpatialSitemap NOT loaded helper." ); |
|
158 | + dbglog($helper, "createSpatialSitemap NOT loaded helper."); |
|
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | // data[4] true if the uploaded file exists already |
308 | 308 | // data[5] (since 2011-02-06) the PHP function used to move the file to the correct location |
309 | 309 | |
310 | - dbglog ( $event->data, "_handle_media_uploaded::event data" ); |
|
310 | + dbglog($event->data, "_handle_media_uploaded::event data"); |
|
311 | 311 | |
312 | 312 | // check the list of mimetypes |
313 | 313 | // if it's a supported type call appropriate index function |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | // data['name'] file name data['path'] full path to the file |
331 | 331 | // data['size'] file size |
332 | 332 | |
333 | - dbglog ( $event->data, "_handle_media_deleted::event data" ); |
|
333 | + dbglog($event->data, "_handle_media_deleted::event data"); |
|
334 | 334 | |
335 | 335 | // remove the media id from the index |
336 | 336 | $indexer = & plugin_load('helper', 'spatialhelper_index'); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $this->generateSpatialIndex(); |
65 | 65 | } else { |
66 | 66 | $this->spatial_idx = unserialize(io_readFile($this->idx_dir . '/spatial.idx', false)); |
67 | - dbglog ( $this->spatial_idx, 'done loading spatial index' ); |
|
67 | + dbglog($this->spatial_idx, 'done loading spatial index'); |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | if (empty ($geotags ['lon']) || empty ($geotags ['lat'])) { |
83 | 83 | return false; |
84 | 84 | } |
85 | - dbglog ( $geotags, "Geo metadata found for page $id" ); |
|
85 | + dbglog($geotags, "Geo metadata found for page $id"); |
|
86 | 86 | $geometry = new Point($geotags ['lon'], $geotags ['lat']); |
87 | 87 | $geohash = $geometry->out('geohash'); |
88 | - dbglog ( 'Update index for geohash: ' . $geohash ); |
|
88 | + dbglog('Update index for geohash: ' . $geohash); |
|
89 | 89 | $succes = $this->_addToIndex($geohash, $id); |
90 | 90 | } |
91 | 91 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $hashes [] = $hash; |
105 | 105 | } |
106 | 106 | } |
107 | - dbglog ( $hashes, "Found the following hashes for $id (should only be 1)" ); |
|
107 | + dbglog($hashes, "Found the following hashes for $id (should only be 1)"); |
|
108 | 108 | return $hashes; |
109 | 109 | } |
110 | 110 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $knownHash = $knownHashes [0]; |
126 | 126 | $knownIds = $this->spatial_idx [$knownHash]; |
127 | 127 | $i = array_search($id, $knownIds); |
128 | - dbglog ( "removing: $knownIds[$i] from the index." ); |
|
128 | + dbglog("removing: $knownIds[$i] from the index."); |
|
129 | 129 | unset ($knownIds [$i]); |
130 | 130 | $this->spatial_idx [$knownHash] = $knownIds; |
131 | 131 | if (empty ($this->spatial_idx [$knownHash])) { |
@@ -234,10 +234,10 @@ discard block |
||
234 | 234 | $pageIds = array(); |
235 | 235 | // check index for key/geohash |
236 | 236 | if (!array_key_exists($geohash, $this->spatial_idx)) { |
237 | - dbglog ( "Geohash $geohash not in index, just add $id." ); |
|
237 | + dbglog("Geohash $geohash not in index, just add $id."); |
|
238 | 238 | $pageIds [] = $id; |
239 | 239 | } else { |
240 | - dbglog ( 'Geohash for document is in index, find it.' ); |
|
240 | + dbglog('Geohash for document is in index, find it.'); |
|
241 | 241 | // check the index for document |
242 | 242 | $knownHashes = $this->findHashesForId($id, $this->spatial_idx); |
243 | 243 | if (empty ($knownHashes)) { |
@@ -249,17 +249,17 @@ discard block |
||
249 | 249 | $knownHash = $knownHashes [0]; |
250 | 250 | |
251 | 251 | if ($knownHash == $geohash) { |
252 | - dbglog ( "Document $id was found in index and has the same geohash, nothing to do." ); |
|
252 | + dbglog("Document $id was found in index and has the same geohash, nothing to do."); |
|
253 | 253 | return true; |
254 | 254 | } |
255 | 255 | |
256 | 256 | if (!empty ($knownHash)) { |
257 | - dbglog ( "Document/media $id was found in index but has different geohash (it moved)." ); |
|
257 | + dbglog("Document/media $id was found in index but has different geohash (it moved)."); |
|
258 | 258 | $knownIds = $this->spatial_idx [$knownHash]; |
259 | - dbglog ( $knownIds, "Known id's for this hash:" ); |
|
259 | + dbglog($knownIds, "Known id's for this hash:"); |
|
260 | 260 | // remove it from the old geohash element |
261 | 261 | $i = array_search($id, $knownIds); |
262 | - dbglog ( 'Unsetting:' . $knownIds [$i] ); |
|
262 | + dbglog('Unsetting:' . $knownIds [$i]); |
|
263 | 263 | unset ($knownIds [$i]); |
264 | 264 | $this->spatial_idx [$knownHash] = $knownIds; |
265 | 265 | // set on new geohash element |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $adjacent ['topright'] = $_geohashClass->adjacent($adjacent ['right'], 'top'); |
123 | 123 | $adjacent ['bottomright'] = $_geohashClass->adjacent($adjacent ['right'], 'bottom'); |
124 | 124 | $adjacent ['bottomleft'] = $_geohashClass->adjacent($adjacent ['left'], 'bottom'); |
125 | - dbglog ( $adjacent, "adjacent geo hashes:" ); |
|
125 | + dbglog($adjacent, "adjacent geo hashes:"); |
|
126 | 126 | |
127 | 127 | // find all the pages in the index that overlap with the adjacent hashes |
128 | 128 | $docIds = array(); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } |
139 | 139 | } |
140 | 140 | $docIds = array_unique($docIds); |
141 | - dbglog ( $docIds, "found docIDs" ); |
|
141 | + dbglog($docIds, "found docIDs"); |
|
142 | 142 | |
143 | 143 | // create associative array of pages + calculate distance |
144 | 144 | $pages = array(); |