From e20673614ccf6fa885ff0968cf1f47839ee61c45 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 4 Oct 2017 19:17:03 +0000 Subject: [PATCH] wip #1719 @1 --- inc/ws/Controlleur/class.ws.maintenance.php | 68 +++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 81c26ce41..2bee8c15f 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1440,6 +1440,74 @@ class wsMaintenance { 'nav-sound-off' => 'nav-soundoff', 'nav-sound-on' => 'nav-soundon', ); + + $shares = array('email', 'facebook', 'twitter', 'googleplus', 'linkedin', 'viadeo'); + + $names = array_flip($names); + + foreach ($iconSets as $iconSet) { + $res = ' +'; + $dir = WS_ICONS . '/' . $iconSet . '/mobile/'; + $dr = opendir($dir); + while ($f = readdir($dr)) { + if ($f == '.' || $f == '..') { + continue; + } + $file = $dir . $f; + if (is_dir($file)) { + continue; + } + $e = explode('.', $f); + $ext = array_pop($e); + if ($ext != 'svg') { + continue; + } + + $name = $e[0]; + if (isset($names[$name])) { + $name = $names[$name]; + } + + $dom = new DOMDocument(); + $dom->loadXML(file_get_contents($file)); + $svg = $dom->getElementsByTagName('svg')[0]; + + $res .= "\n\t" . ''; + $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg); + $res .= "\n\t" . ''; + + if ($name == 'nav-fullscreen') { + $name = 'nav-fullscreen-exit'; + $res .= "\n\t" . ''; + $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg); + $res .= "\n\t" . ''; + } + + } + + foreach ($shares as $share) { + $name = 'share-' . $share; + + $dom = new DOMDocument(); + $dom->loadXML(file_get_contents(WS_ICONS . '/share/share-' . $share . '.svg')); + $svg = $dom->getElementsByTagName('svg')[0]; + + $res .= "\n\t" . ''; + $res .= "\n\t\t" . CubeIT_Util_Xml::innerXML($svg); + $res .= "\n\t" . ''; + + } + $res .= "\n" . ' + + + + + '; + + $res .= "\n" . ''; + file_put_contents(WS_ICONS . '/' . $iconSet . '/interface.svg', $res); + } } } -- 2.39.5