Skip to content

Commit 7242a9e

Browse files
committed
make it work again
1 parent df1c652 commit 7242a9e

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

syntax.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
66
* @author Andreas Gohr <[email protected]>
77
*/
8-
9-
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../../').'/');
10-
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
11-
require_once(DOKU_PLUGIN.'syntax.php');
12-
require_once(DOKU_INC.'inc/search.php');
13-
require_once(DOKU_INC.'inc/JpegMeta.php');
14-
158
class syntax_plugin_panoview extends DokuWiki_Syntax_Plugin {
169

1710
/**
@@ -102,8 +95,6 @@ function handle($match, $state, $pos, Doku_Handler $handler) {
10295
function render($mode, Doku_Renderer $R, $data) {
10396
if($mode != 'xhtml') return false;
10497
global $ID;
105-
require_once(DOKU_INC.'inc/JSON.php');
106-
$json = new JSON();
10798

10899
$img = '<a href="'.ml($data['image'], array('id'=> $ID), false).'"><img src="'.
109100
ml($data['image'], array('w'=> $data['width'], 'h'=> $data['height'])).'" width="'.
@@ -126,7 +117,7 @@ function render($mode, Doku_Renderer $R, $data) {
126117
<span class="zoomOut" title="Zoom Out">-</span>
127118
<span class="maximize"><img src="'.DOKU_BASE.'lib/plugins/panoview/gfx/window.gif" style="position: absolute; bottom: 4px; right: 5px;" title="Maximize"></span>
128119
</p>
129-
<div class="options" style="display:none">'.hsc($json->encode($data)).'</div>
120+
<div class="options" style="display:none">'.hsc(json_encode($data)).'</div>
130121
</div>
131122
';
132123

@@ -257,7 +248,4 @@ function tile_unlock($d) {
257248
@rmdir($lockDir);
258249
@ignore_user_abort(0);
259250
}
260-
261251
}
262-
263-
//Setup VIM: ex: et ts=4 enc=utf-8 :

tiles.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../../../').'/');
88
define('DOKU_DISABLE_GZIP_OUTPUT', 1);
99
require_once(DOKU_INC.'inc/init.php');
10-
require_once(DOKU_INC.'inc/common.php');
11-
require_once(DOKU_INC.'inc/pageutils.php');
12-
require_once(DOKU_INC.'inc/httputils.php');
13-
require_once(DOKU_INC.'inc/pluginutils.php');
14-
require_once(DOKU_INC.'inc/auth.php');
1510
session_write_close();
1611

12+
global $conf;
13+
14+
1715
/** @var syntax_plugin_panoview $pl */
18-
$pl =& plugin_load('syntax', 'panoview');
16+
$pl = plugin_load('syntax', 'panoview');
1917

2018
$data = array();
2119
// get parameters
@@ -62,10 +60,10 @@
6260

6361
// send
6462
header('Content-type: image/jpeg');
65-
http_conditionalRequest(max($data['mtime'], $data['selft']));
63+
http_conditionalRequest(max($data['mtime'], $data['cachet']));
6664

6765
//use x-sendfile header to pass the delivery to compatible webservers
68-
if(http_sendfile($data['cache'])) exit;
66+
http_sendfile($data['cache']);
6967

7068
// send file contents
7169
$fp = @fopen($data['cache'], "rb");
@@ -75,6 +73,3 @@
7573
header("HTTP/1.0 500 Internal Server Error");
7674
print "Could not read tile - bad permissions?";
7775
}
78-
79-
80-
//Setup VIM: ex: et ts=4 enc=utf-8 :

0 commit comments

Comments
 (0)