From 1720a18b9af92698b66fafa9268acdd23204e38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 11 May 2015 12:47:38 +0200 Subject: [PATCH] Changed the name of the module to importorderlines, added compatibility with custom folder and updated dependencies --- importorderlines/admin/admin.php | 6 +++++- .../class/actions_importorderlines.class.php | 2 +- importorderlines/composer.json | 2 +- importorderlines/composer.lock | 12 ++++++------ .../core/modules/modImportorderlines.class.php | 4 ++-- importorderlines/langs/es_ES/importorderlines.lang | 4 ++-- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/importorderlines/admin/admin.php b/importorderlines/admin/admin.php index f0b2284..7386a9b 100644 --- a/importorderlines/admin/admin.php +++ b/importorderlines/admin/admin.php @@ -19,7 +19,11 @@ * along with Multismtp. If not, see . */ -require '../../main.inc.php'; +if (file_exists('../../main.inc.php')) { + require '../../main.inc.php'; +} else { + require '../../../main.inc.php'; +} $langs->load('admin'); $langs->load('importorderlines@importorderlines'); diff --git a/importorderlines/class/actions_importorderlines.class.php b/importorderlines/class/actions_importorderlines.class.php index b97c517..e37d9dc 100644 --- a/importorderlines/class/actions_importorderlines.class.php +++ b/importorderlines/class/actions_importorderlines.class.php @@ -19,7 +19,7 @@ * along with Multismtp. If not, see . */ -class ActionsImportorderlineexcel +class ActionsImportorderlines { /** * @param array() $parameters Hook metadatas (context, etc...) diff --git a/importorderlines/composer.json b/importorderlines/composer.json index bcf0b70..770cc56 100644 --- a/importorderlines/composer.json +++ b/importorderlines/composer.json @@ -1,6 +1,6 @@ { "require" : { - "phpoffice/phpexcel": "1.8" + "phpoffice/phpexcel": "~1.8" }, "config" : { "vendor-dir" : "lib" diff --git a/importorderlines/composer.lock b/importorderlines/composer.lock index 353103d..56ad6be 100644 --- a/importorderlines/composer.lock +++ b/importorderlines/composer.lock @@ -4,20 +4,20 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "827da9bb9fbf53e5a92048ec576b2636", + "hash": "0bc59dea1d5af6a53d15d6b3de93d12b", "packages": [ { "name": "phpoffice/phpexcel", - "version": "1.8.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/PHPOffice/PHPExcel.git", - "reference": "e69a5e4d0ffa7fb6f171859e0a04346e580df30b" + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/e69a5e4d0ffa7fb6f171859e0a04346e580df30b", - "reference": "e69a5e4d0ffa7fb6f171859e0a04346e580df30b", + "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/372c7cbb695a6f6f1e62649381aeaa37e7e70b32", + "reference": "372c7cbb695a6f6f1e62649381aeaa37e7e70b32", "shasum": "" }, "require": { @@ -61,7 +61,7 @@ "xls", "xlsx" ], - "time": "2014-03-02 15:22:49" + "time": "2015-05-01 07:00:55" } ], "packages-dev": [], diff --git a/importorderlines/core/modules/modImportorderlines.class.php b/importorderlines/core/modules/modImportorderlines.class.php index a165528..c6be7ed 100644 --- a/importorderlines/core/modules/modImportorderlines.class.php +++ b/importorderlines/core/modules/modImportorderlines.class.php @@ -77,7 +77,7 @@ function __construct($db) // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = 'Import order lines'; // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) - $this->description = "Import order lines from spreasheet files"; + $this->description = "Imports order lines from spreadsheet files"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = '1.0'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) @@ -106,7 +106,7 @@ function __construct($db) $this->hidden = false; // A condition to hide module $this->depends = array( 'modCommande', - 'modProducts' + 'modProduct' ); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with diff --git a/importorderlines/langs/es_ES/importorderlines.lang b/importorderlines/langs/es_ES/importorderlines.lang index ba3ad48..5606c71 100644 --- a/importorderlines/langs/es_ES/importorderlines.lang +++ b/importorderlines/langs/es_ES/importorderlines.lang @@ -1,6 +1,6 @@ #Module info -Module402001Name=Importar líneas de pedido desde un archivo Excel -Module402001Desc=Importa líneas de pedido desde un archivo Excel +Module402001Name=Importar líneas de pedido desde una hoja de cálculo +Module402001Desc=Importa líneas de pedido desde una hoja de cálculo ImportOrderLinesInfo=Información del módulo Importación de líneas de pedido ImportOrderLines=Importar líneas de pedido