From 921212732878bd8bcf358f94aa4129e2862f5c3c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 10 Jul 2013 15:00:12 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.url.php | 3 ++- inc/ws/Util/html5/class.ws.html5.compiler.php | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index c08d364af..865570c41 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -290,7 +290,8 @@ class wsUrl { } $res.=''; - $phonegapVersions = array('2.8.1' => '2.8.1'); + $v = wsHTML5Compiler::getPhonegapVersions(); + $phonegapVersions = array_combine($v, $v); $res.='

' . __('Paramètres avancés') . '

'; $res.=''; diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 9df43eb93..8d0a91b9b 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -229,6 +229,11 @@ class wsHTML5Compiler { return $v; } + $versions = self::getPhonegapVersions(); + return array_pop($versions); + } + + public static function getPhonegapVersions() { $versions = array(); $dr = opendir(WS_COMPILE_ASSETS . '/_html5/js/libs/phonegap'); @@ -239,7 +244,8 @@ class wsHTML5Compiler { $versions[] = $file; } usort($versions, 'version_compare'); - return array_pop($versions); + $versions=array_reverse($versions, true); + return $versions; } public function getCssScale() { @@ -550,7 +556,7 @@ class wsHTML5Compiler { } } - $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash','cache'); + $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print', 'hiddenContents', 'splash', 'cache'); foreach ($vars as $v) { $html = str_replace('', $$v, $html); } @@ -578,7 +584,7 @@ class wsHTML5Compiler { $thtml = $uhtml; - $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash','cache'); + $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print', 'hiddenContents', 'splash', 'cache'); foreach ($vars as $v) { $uhtml = str_replace('', $$v, $uhtml); } -- 2.39.5