summaryrefslogtreecommitdiff
path: root/iconsizes-dump.patch
diff options
context:
space:
mode:
authorElan Ruusamäe2015-07-19 14:15:24 (GMT)
committerElan Ruusamäe2015-07-19 14:16:19 (GMT)
commit1813e16cd5e624631fbd988669f6b5ff92c1d77a (patch)
tree5bc2678f139713d1786091ed4e8135cbd15452db /iconsizes-dump.patch
parentb196ede3ef3f90c787928dc2ae85fe7963134196 (diff)
downloaddokuwiki-1813e16cd5e624631fbd988669f6b5ff92c1d77a.zip
dokuwiki-1813e16cd5e624631fbd988669f6b5ff92c1d77a.tar.gz
add option to dump different icon sizes
rejected by upstream https://github.com/splitbrain/dokuwiki/pull/1187
Diffstat (limited to 'iconsizes-dump.patch')
-rw-r--r--iconsizes-dump.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/iconsizes-dump.patch b/iconsizes-dump.patch
new file mode 100644
index 0000000..f017497
--- /dev/null
+++ b/iconsizes-dump.patch
@@ -0,0 +1,54 @@
+From dcd19aee23d60b285ec5d4991eb1f3b51cae34b7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
+Date: Tue, 9 Jun 2015 11:16:12 +0300
+Subject: [PATCH] fileicons: allow specify what sizes to dump
+URL: https://github.com/splitbrain/dokuwiki/pull/1187
+Status: Rejected by upstream
+
+---
+ lib/images/fileicons/index.php | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/lib/images/fileicons/index.php b/lib/images/fileicons/index.php
+index 09b6c9d..ffb41c5 100644
+--- a/lib/images/fileicons/index.php
++++ b/lib/images/fileicons/index.php
+@@ -28,6 +28,13 @@
+ </head>
+ <body>
+
++<?php
++$sizes = isset($_GET['sizes']) ? explode(',', (string)$_GET['sizes']) : array(16, 32);
++?>
++
++<?php
++if (in_array(16, $sizes)) :
++?>
+ <div class="white box">
+ <?php
+ foreach (glob('*.png') as $img) {
+@@ -45,7 +52,13 @@
+ </div>
+
+ <br style="clear: left" />
++<?php
++endif;
++?>
+
++<?php
++if (in_array(32, $sizes)) :
++?>
+ <div class="white box">
+ <?php
+ foreach (glob('32x32/*.png') as $img) {
+@@ -61,7 +74,9 @@
+ }
+ ?>
+ </div>
+-
++<?php
++endif;
++?>
+
+ </body>
+ </html>