]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 2 Jan 2013 14:39:01 +0000 (14:39 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 2 Jan 2013 14:39:01 +0000 (14:39 +0000)
inc/ws/Controlleur/class.ws.flash.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Metier/class.ws.theme.parametres.php
inc/ws/Util/packager/class.ws.packager.win.exe.php
inc/ws/Util/packager/class.ws.packager.win.inst.php

index 5b7fba8218db03f867ad38fde5bc069431cda042..a82a13eca7836356f31e74c0b7553d286e53ec9f 100644 (file)
@@ -159,7 +159,7 @@ class wsFlash extends cubeFlashGateway {
 \r
                        move_uploaded_file($infos['tmp_name'], $dest);\r
 \r
-                       if (isset($this->args['type']) && $this->args['type'] == 'ico') {\r
+                       if (isset($this->args['type']) && $this->args['type'] == 'favicon') {\r
                                $icotool = new cubeCommandLine('icotool');\r
                                $icotool->setArg('c');\r
                                $icotool->setArg('o', $dir . '/fluidbook.ico');\r
index 45aaae954ad86b2dd4dc2da500ad79558c0ae529..7260e2e80380abff006b4c6ff0809620f310b459 100644 (file)
@@ -131,7 +131,7 @@ class wsBookParametres extends wsParametres {
                $this->fields['searchShowNoResultsPages'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __("Afficher les pages sans résultats"));\r
 \r
                $this->forms['search'] = array('label' => __('Moteur de recherche'),\r
-                       'fieldsnames' => array('search', 'searchHideNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction'));\r
+                       'fieldsnames' => array('search', 'searchShowNoResultsPages', '|', 'ignoreSearch', 'ignoreSearchSeparators', 'textExtraction'));\r
 \r
                $this->fields['soundTheme'] = array('type' => 'combo', 'default' => 'classic', 'editable' => true, 'label' => __("Thème sonore"),\r
                        'datas' => array(__('Pas de son') => '',\r
@@ -241,8 +241,9 @@ class wsBookParametres extends wsParametres {
                        'fieldsnames' => array('basket', 'basketManager', 'basketReferences', 'basketImages', 'basketPDFBackground'));\r
                // .\r
                $this->fields['offlineLink'] = array('type' => 'text', 'default' => 'http://', 'editable' => true, 'label' => __("URL du Fluidbook"), 'hint' => __('URL du fluidbook utilisée pour la version Offline (CD-ROM, clé USB, Exécutables)'));\r
+               $this->fields['offlineTitle'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'application"));\r
                $this->forms['offline'] = array('label' => __('Version offline'),\r
-                       'fieldsnames' => array('offlineLink'));\r
+                       'fieldsnames' => array('offlineTitle', 'offlineLink'));\r
 \r
                $this->fields['mobileVersion'] = array('type' => 'combo', 'default' => 'html5-images', 'editable' => true, 'label' => __('Version mobile'), 'grade' => 3,\r
                        'datas' => array(__('Rediriger vers le PDF') => 'pdf',\r
index 22d57d9e42130bd3cba9163ed0c59b53cc9e4e70..fa9ccf6c2649a106354ff84c6528c19882d43474 100644 (file)
@@ -214,19 +214,19 @@ class wsThemeParametres extends wsParametres {
                        'label' => __('Icone (pour favicon et CD-ROM)'),\r
                        'path' => $themeRoot,\r
                        'fileFilter' => $imageFilter,\r
-                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=ico',\r
+                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=favicon',\r
                        'hint' => __('Image PNG de 256x256'));\r
                $this->fields['iosicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
                        'label' => __('Icone (pour application iOS)'),\r
                        'path' => $themeRoot,\r
                        'fileFilter' => $imageFilter,\r
-                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=ico',\r
+                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=iosicon',\r
                        'hint' => __('Image PNG de 1024x1024'));\r
                $this->fields['androidicon'] = array('type' => 'file', 'default' => '', 'editable' => true,\r
                        'label' => __('Icone (pour application Android)'),\r
                        'path' => $themeRoot,\r
                        'fileFilter' => $imageFilter,\r
-                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=ico',\r
+                       'uploadURL' => SITE_PATH . 'flash/uploadThemeFile/?theme_id=' . $this->parent->theme_id . '&amp;type=androidicon',\r
                        'hint' => __('Image PNG de 1024x1024'));\r
 \r
                $this->forms['logo'] = array('label' => __('Personnalisation du logo'),\r
index fb9bfbb6c9fd2142106c1a258fcebd91d4407e76..d5d640e43851b3e1ed548f2b7fcdf25688b5e9d1 100644 (file)
@@ -8,7 +8,11 @@ class wsPackagerWinEXE extends wsPackager {
                parent::__construct($book_id);\r
                $this->version = 'win-exe';\r
 \r
-               $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 30)) . '.exe';\r
+               if ($this->book->parametres->offlineTitle == "") {\r
+                       $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 30)) . '.exe';\r
+               } else {\r
+                       $this->exeName = cubeText::str2URL($this->book->parametres->offlineTitle) . '.exe';\r
+               }\r
        }\r
 \r
        protected function preparePackage() {\r
index b9805857dec341ded26a228364c45b2056409cc2..475d16a055928854ef729811eecde8acea9edbde 100644 (file)
@@ -28,18 +28,21 @@ class wsPackagerWinINST extends wsPackagerWinEXE {
                $daoLang = new wsDAOLang($core->con);\r
                $lang = $daoLang->selectById($this->book->lang);\r
 \r
+               $fname = str_replace('.exe', '', $this->exeName);\r
+               $title = $this->book->parametres->offlineTitle == '' ? $this->book->parametres->title : $this->book->parametres->offlineTitle;\r
+\r
                $nsi = file_get_contents(WS_COMPILE_ASSETS . '/script.nsi');\r
-               $nsi = str_replace('$name', utf8_decode($this->book->parametres->title), $nsi);\r
+               $nsi = str_replace('$name', utf8_decode($title), $nsi);\r
                $nsi = str_replace('$htmldir', utf8_decode(WS_COMPILE_ASSETS), $nsi);\r
-               $nsi = str_replace('$fname', str_replace('.exe', '', $this->exeName), $nsi);\r
+               $nsi = str_replace('$fname', $fname, $nsi);\r
                $nsi = str_replace('$fdir', $winvdir, $nsi);\r
-               $nsi = str_replace('$titre', utf8_decode($this->book->parametres->title), $nsi);\r
+               $nsi = str_replace('$titre', utf8_decode($title), $nsi);\r
                $nsi = str_replace('$lang', utf8_decode($lang->nsis), $nsi);\r
                $nsi = str_replace('$nsisdir', '/usr/share/nsis', $nsi);\r
                $nsi = str_replace('$output', $this->getPathBase('exe'), $nsi);\r
                $favicon = $this->vdir . '/data/fluidbook.ico';\r
                if ($this->theme->parametres->favicon == '') {\r
-                       $this->copy(WS_COMPILE_ASSETS . '/fluidbook.ico',$favicon);\r
+                       $this->copy(WS_COMPILE_ASSETS . '/fluidbook.ico', $favicon);\r
                }\r
                $nsi = str_replace('$favicon', $favicon, $nsi);\r
 \r
@@ -51,7 +54,6 @@ class wsPackagerWinINST extends wsPackagerWinEXE {
                $url = 'http://installer.fluidbook.com/make.php?nsi=' . base64_encode($this->nsi) . '&junk=' . TIME;\r
 \r
                file_get_contents($url);\r
-               fb($url);\r
                return $this->getURLBase('exe');\r
        }\r
 \r