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 5a307bfc62f..00000000000 Binary files a/htdocs/zapier/img/object_zapierfordolibarr.png and /dev/null differ