From a3644638aaf0418598196a870204e0b632a4c8ad Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 17 Apr 2015 06:28:40 -0400 Subject: [PATCH] Allow preference sections to define CSS class names --- skins/larry/svggradient.php | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/skins/larry/svggradient.php b/skins/larry/svggradient.php index 25b2e90..8db2c5f 100644 --- a/skins/larry/svggradient.php +++ b/skins/larry/svggradient.php @@ -9,9 +9,9 @@ * License. It is allowed to copy, distribute, transmit and to adapt the work * by keeping credits to the original autors in the README file. * See http://creativecommons.org/licenses/by-sa/3.0/ for details. - * - * $Id$ */ + +ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT)); header('Content-Type: image/svg+xml'); header("Expires: ".gmdate("D, d M Y H:i:s", time()+864000)." GMT"); @@ -20,6 +20,7 @@ $svg_stops = ''; $color_stops = explode(';', preg_replace('/[^a-f0-9,;%]/i', '', $_GET['c'])); +$gradient_coords = !empty($_GET['h']) ? 'x1="0%" y1="0%" x2="100%" y2="0%"' : 'x1="0%" y1="0%" x2="0%" y2="100%"'; $last = count($color_stops) - 1; foreach ($color_stops as $i => $stop) { list($color, $offset) = explode(',', $stop); @@ -34,7 +35,7 @@ ?> <svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" version="1.0" width="100%" height="100%"> <defs> - <linearGradient id="LG1" x1="0%" y1="0%" x2="0%" y2="100%" spreadMethod="pad"> + <linearGradient id="LG1" <?php echo $gradient_coords; ?> spreadMethod="pad"> <?php echo $svg_stops; ?> </linearGradient> </defs> -- Gitblit v1.9.1