From 4054ebaf27da13e7d607d232997aba35d8071796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 7 Sep 2019 15:12:07 +0200 Subject: [PATCH] wip --- htdocs/core/modules/modZapier.class.php | 10 +++++--- .../mysql/tables}/llx_zapier_hook.key.sql | 6 ++--- .../mysql/tables}/llx_zapier_hook.sql | 24 +++++++++--------- .../tables}/llx_zapier_hook_extrafields.sql | 4 +-- .../img/{zapier.png => object_zapier.png} | Bin .../zapier/img/object_zapierfordolibarr.png | Bin 360 -> 0 bytes 6 files changed, 23 insertions(+), 21 deletions(-) rename htdocs/{zapier/sql => install/mysql/tables}/llx_zapier_hook.key.sql (66%) rename htdocs/{zapier/sql => install/mysql/tables}/llx_zapier_hook.sql (68%) rename htdocs/{zapier/sql => install/mysql/tables}/llx_zapier_hook_extrafields.sql (93%) rename htdocs/zapier/img/{zapier.png => object_zapier.png} (100%) delete mode 100644 htdocs/zapier/img/object_zapierfordolibarr.png diff --git a/htdocs/core/modules/modZapier.class.php b/htdocs/core/modules/modZapier.class.php index 7f7ee47ba1e..da6a8aa1547 100644 --- a/htdocs/core/modules/modZapier.class.php +++ b/htdocs/core/modules/modZapier.class.php @@ -67,7 +67,7 @@ class modZapier extends DolibarrModules // Name of image file used for this module. // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' - $this->picto = 'technic'; + $this->picto = 'zapier@zapier'; // Define some features supported by module (triggers, login, substitutions, menus, css, etc...) $this->module_parts = array( // Set this to 1 if module has its own trigger directory (core/triggers) @@ -109,7 +109,9 @@ class modZapier extends DolibarrModules // Example: this->dirs = array("/zapier/temp","/zapier/subdir"); $this->dirs = array("/zapier/temp"); // Config pages. Put here list of php page, stored into zapier/admin directory, to use to setup module. - $this->config_page_url = array("setup.php@zapier"); + $this->config_page_url = array( + // "setup.php@zapier" + ); // Dependencies // A condition to hide module $this->hidden = false; @@ -119,7 +121,7 @@ class modZapier extends DolibarrModules $this->requiredby = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); - $this->langfiles = array("zapier@zapier"); + $this->langfiles = array("zapier"); // Minimum version of PHP required by module //$this->phpmin = array(5, 5); // Minimum version of Dolibarr required by module @@ -148,7 +150,7 @@ class modZapier extends DolibarrModules 'fr_FR:ParentCompany'=>'Maison mère ou revendeur' )*/ if (! isset($conf->zapier) || ! isset($conf->zapier->enabled)) { - $conf->zapier=new stdClass(); + $conf->zapier = new stdClass(); $conf->zapier->enabled=0; } // Array to add new pages in new tabs diff --git a/htdocs/zapier/sql/llx_zapier_hook.key.sql b/htdocs/install/mysql/tables/llx_zapier_hook.key.sql similarity index 66% rename from htdocs/zapier/sql/llx_zapier_hook.key.sql rename to htdocs/install/mysql/tables/llx_zapier_hook.key.sql index d707e6bba1a..4bce26ae0ea 100644 --- a/htdocs/zapier/sql/llx_zapier_hook.key.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook.key.sql @@ -14,9 +14,9 @@ -- along with this program. If not, see http://www.gnu.org/licenses/. ---ALTER TABLE llx_zapierfordolibarr_hook ADD INDEX idx_fieldobject (fieldobject); +--ALTER TABLE llx_zapier_hook ADD INDEX idx_fieldobject (fieldobject); ---ALTER TABLE llx_zapierfordolibarr_hook ADD UNIQUE INDEX uk_zapierfordolibarr_hook_fieldxy(fieldx, fieldy); +--ALTER TABLE llx_zapier_hook ADD UNIQUE INDEX uk_zapier_hook_fieldxy(fieldx, fieldy); ---ALTER TABLE llx_zapierfordolibarr_hook ADD CONSTRAINT llx_zapierfordolibarr_hook_fk_field FOREIGN KEY (fk_field) REFERENCES llx_zapierfordolibarr_myotherobject(rowid); +--ALTER TABLE llx_zapier_hook ADD CONSTRAINT llx_zapier_hook_fk_field FOREIGN KEY (fk_field) REFERENCES llx_zapier_myotherobject(rowid); diff --git a/htdocs/zapier/sql/llx_zapier_hook.sql b/htdocs/install/mysql/tables/llx_zapier_hook.sql similarity index 68% rename from htdocs/zapier/sql/llx_zapier_hook.sql rename to htdocs/install/mysql/tables/llx_zapier_hook.sql index 829ec2bfdc4..27d56352bff 100644 --- a/htdocs/zapier/sql/llx_zapier_hook.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook.sql @@ -14,16 +14,16 @@ -- along with this program. If not, see http://www.gnu.org/licenses/. -CREATE TABLE llx_zapierfordolibarr_hook( - rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, - url varchar(255), - event varchar(255), - module varchar(128), - action varchar(128), - status integer, - date_creation DATETIME NOT NULL, +CREATE TABLE llx_zapier_hook( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + url varchar(255), + event varchar(255), + module varchar(128), + action varchar(128), + status integer, + date_creation DATETIME NOT NULL, fk_user integer NOT NULL, - tms TIMESTAMP NOT NULL, - import_key varchar(14) -) ENGINE=innodb; \ No newline at end of file + tms TIMESTAMP NOT NULL, + import_key varchar(14) +) ENGINE=innodb; diff --git a/htdocs/zapier/sql/llx_zapier_hook_extrafields.sql b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql similarity index 93% rename from htdocs/zapier/sql/llx_zapier_hook_extrafields.sql rename to htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql index c840007412b..09fef4cc399 100644 --- a/htdocs/zapier/sql/llx_zapier_hook_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql @@ -13,11 +13,11 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see http://www.gnu.org/licenses/. -create table llx_zapierfordolibarr_hook_extrafields +create table llx_zapier_hook_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, fk_object integer NOT NULL, - import_key varchar(14) -- import key + import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/zapier/img/zapier.png b/htdocs/zapier/img/object_zapier.png similarity index 100% rename from htdocs/zapier/img/zapier.png rename to htdocs/zapier/img/object_zapier.png diff --git a/htdocs/zapier/img/object_zapierfordolibarr.png b/htdocs/zapier/img/object_zapierfordolibarr.png deleted file mode 100644 index 5a307bfc62f85df909a3cf024f27ee87d44be275..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xamSQK*5Dp-y;YjHK@;M7UB8!3Q zuY)k7lg8`{prB-lYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt)eIT^vI+ zChono-m4{0gyqBiz=Ju)w^;&N<{#X1a0!1>bC%GsW3bBL=<%|p84;9-@5SwA|2OIEL% zb=QtBT0T9C&(LA{syqXqqW_DHn`b;(x5}@uA-g2{Ncy)Mhpp~Sy0eY()*3IP6|4C4 z(mDEHWvtPCEP7WZe7{4e?P9&>AE%^j|Mz!&9rL?{G_w^d>;^y&GkCiCxvX