Skip to content

Commit e44b94a

Browse files
committed
Revert "use a dispatcher to access static image files"
This reverts commit 944e9ba. It was accidentally pused to master before review. A PR with a revert for the revert will be pushed shortly.
1 parent 944e9ba commit e44b94a

35 files changed

+53
-207
lines changed

inc/ChangeLog/RevisionInfo.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function showFileIcon()
113113
return media_printicon($id);
114114
} elseif ($this->val('mode') == self::MODE_PAGE) {
115115
// page revision
116-
return '<img class="icon" src="' . DOKU_BASE . 'lib/exe/image.php/fileicons/file.png" alt="' . $id . '" />';
116+
return '<img class="icon" src="' . DOKU_BASE . 'lib/images/fileicons/file.png" alt="' . $id . '" />';
117117
}
118118
}
119119

@@ -286,11 +286,11 @@ public function showIconCompareWithPrevious()
286286

287287
if ($href) {
288288
return '<a href="' . $href . '" class="diff_link">'
289-
. '<img src="' . DOKU_BASE . 'lib/exe/image.php/diff.png" width="15" height="11"'
289+
. '<img src="' . DOKU_BASE . 'lib/images/diff.png" width="15" height="11"'
290290
. ' title="' . $lang['diff'] . '" alt="' . $lang['diff'] . '" />'
291291
. '</a>';
292292
} else {
293-
return '<img src="' . DOKU_BASE . 'lib/exe/image.php/blank.gif" width="15" height="11" alt="" />';
293+
return '<img src="' . DOKU_BASE . 'lib/images/blank.gif" width="15" height="11" alt="" />';
294294
}
295295
}
296296

@@ -322,11 +322,11 @@ public function showIconCompareWithCurrent()
322322

323323
if ($href) {
324324
return '<a href="' . $href . '" class="diff_link">'
325-
. '<img src="' . DOKU_BASE . 'lib/exe/image.php/diff.png" width="15" height="11"'
325+
. '<img src="' . DOKU_BASE . 'lib/images/diff.png" width="15" height="11"'
326326
. ' title="' . $lang['diff'] . '" alt="' . $lang['diff'] . '" />'
327327
. '</a>';
328328
} else {
329-
return '<img src="' . DOKU_BASE . 'lib/exe/image.php/blank.gif" width="15" height="11" alt="" />';
329+
return '<img src="' . DOKU_BASE . 'lib/images/blank.gif" width="15" height="11" alt="" />';
330330
}
331331
}
332332

@@ -354,7 +354,7 @@ public function showIconRevisions()
354354
$href = wl($id, ['do' => 'revisions'], false, '&');
355355
}
356356
return '<a href="' . $href . '" class="revisions_link">'
357-
. '<img src="' . DOKU_BASE . 'lib/exe/image.php/history.png" width="12" height="14"'
357+
. '<img src="' . DOKU_BASE . 'lib/images/history.png" width="12" height="14"'
358358
. ' title="' . $lang['btn_revs'] . '" alt="' . $lang['btn_revs'] . '" />'
359359
. '</a>';
360360
}

inc/File/StaticImage.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

inc/Menu/Item/AbstractItem.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class AbstractItem
97
*
@@ -66,7 +64,6 @@ public function __construct()
6664
$this->id = $ID;
6765
$this->type = $this->getType();
6866
$this->params['do'] = $this->type;
69-
$this->svg = StaticImage::path('menu/00-default_checkbox-blank-circle-outline.svg');
7067

7168
if (!actionOK($this->type)) throw new \RuntimeException("action disabled: {$this->type}");
7269
}

inc/Menu/Item/Admin.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Admin
97
*
@@ -16,7 +14,7 @@ public function __construct()
1614
{
1715
parent::__construct();
1816

19-
$this->svg = StaticImage::path('menu/settings.svg');
17+
$this->svg = DOKU_INC . 'lib/images/menu/settings.svg';
2018
}
2119

2220
/** @inheritdoc */

inc/Menu/Item/Back.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Back
97
*
@@ -26,6 +24,6 @@ public function __construct()
2624
$this->id = $parent;
2725
$this->params = ['do' => ''];
2826
$this->accesskey = 'b';
29-
$this->svg = StaticImage::path('menu/12-back_arrow-left.svg');
27+
$this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg';
3028
}
3129
}

inc/Menu/Item/Backlink.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Backlink
97
*
@@ -15,6 +13,6 @@ class Backlink extends AbstractItem
1513
public function __construct()
1614
{
1715
parent::__construct();
18-
$this->svg = StaticImage::path('menu/08-backlink_link-variant.svg');
16+
$this->svg = DOKU_INC . 'lib/images/menu/08-backlink_link-variant.svg';
1917
}
2018
}

inc/Menu/Item/Edit.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Edit
97
*
@@ -63,7 +61,7 @@ protected function setIcon()
6361
'source' => '05-source_file-xml.svg'
6462
];
6563
if (isset($icons[$this->type])) {
66-
$this->svg = StaticImage::path('menu/' . $icons[$this->type]);
64+
$this->svg = DOKU_INC . 'lib/images/menu/' . $icons[$this->type];
6765
}
6866
}
6967
}

inc/Menu/Item/ImgBackto.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class ImgBackto
97
*
@@ -17,7 +15,7 @@ public function __construct()
1715
global $ID;
1816
parent::__construct();
1917

20-
$this->svg = StaticImage::path('menu/12-back_arrow-left.svg');
18+
$this->svg = DOKU_INC . 'lib/images/menu/12-back_arrow-left.svg';
2119
$this->type = 'img_backto';
2220
$this->params = [];
2321
$this->accesskey = 'b';

inc/Menu/Item/Index.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Index
97
*
@@ -19,7 +17,7 @@ public function __construct()
1917
parent::__construct();
2018

2119
$this->accesskey = 'x';
22-
$this->svg = StaticImage::path('menu/file-tree.svg');
20+
$this->svg = DOKU_INC . 'lib/images/menu/file-tree.svg';
2321

2422
// allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml)
2523
if ($conf['start'] == $ID && !$conf['sitemap']) {

inc/Menu/Item/Login.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace dokuwiki\Menu\Item;
44

5-
use dokuwiki\File\StaticImage;
6-
75
/**
86
* Class Login
97
*
@@ -17,15 +15,15 @@ public function __construct()
1715
global $INPUT;
1816
parent::__construct();
1917

20-
$this->svg = StaticImage::path('menu/login.svg');
18+
$this->svg = DOKU_INC . 'lib/images/menu/login.svg';
2119
$this->params['sectok'] = getSecurityToken();
2220
if ($INPUT->server->has('REMOTE_USER')) {
2321
if (!actionOK('logout')) {
2422
throw new \RuntimeException("logout disabled");
2523
}
2624
$this->params['do'] = 'logout';
2725
$this->type = 'logout';
28-
$this->svg = StaticImage::path('menu/logout.svg');
26+
$this->svg = DOKU_INC . 'lib/images/menu/logout.svg';
2927
}
3028
}
3129
}

0 commit comments

Comments
 (0)