]> git.pld-linux.org Git - packages/dokuwiki.git/blob - iconsizes-dump.patch
add option to dump different icon sizes
[packages/dokuwiki.git] / iconsizes-dump.patch
1 From dcd19aee23d60b285ec5d4991eb1f3b51cae34b7 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
3 Date: Tue, 9 Jun 2015 11:16:12 +0300
4 Subject: [PATCH] fileicons: allow specify what sizes to dump
5 URL: https://github.com/splitbrain/dokuwiki/pull/1187
6 Status: Rejected by upstream
7
8 ---
9  lib/images/fileicons/index.php | 17 ++++++++++++++++-
10  1 file changed, 16 insertions(+), 1 deletion(-)
11
12 diff --git a/lib/images/fileicons/index.php b/lib/images/fileicons/index.php
13 index 09b6c9d..ffb41c5 100644
14 --- a/lib/images/fileicons/index.php
15 +++ b/lib/images/fileicons/index.php
16 @@ -28,6 +28,13 @@
17  </head>
18  <body>
19  
20 +<?php
21 +$sizes = isset($_GET['sizes']) ? explode(',', (string)$_GET['sizes']) : array(16, 32);
22 +?>
23 +
24 +<?php
25 +if (in_array(16, $sizes)) :
26 +?>
27  <div class="white box">
28  <?php
29  foreach (glob('*.png') as $img) {
30 @@ -45,7 +52,13 @@
31  </div>
32  
33  <br style="clear: left" />
34 +<?php
35 +endif;
36 +?>
37  
38 +<?php
39 +if (in_array(32, $sizes)) :
40 +?>
41  <div class="white box">
42      <?php
43      foreach (glob('32x32/*.png') as $img) {
44 @@ -61,7 +74,9 @@
45      }
46      ?>
47  </div>
48 -
49 +<?php
50 +endif;
51 +?>
52  
53  </body>
54  </html>
This page took 0.059507 seconds and 4 git commands to generate.