diff --git a/Admin/clean_install3x.sql b/Admin/clean_install3x.sql index a9e8a4f0..bc6518af 100644 --- a/Admin/clean_install3x.sql +++ b/Admin/clean_install3x.sql @@ -15,11 +15,11 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_view_cache` ( `fileName` VARCHAR(100) NOT NULL, `task` VARCHAR(100) NOT NULL, `site` INT(11) NOT NULL, - `request` VARCHAR(255) NOT NULL, + `request` VARCHAR(190) NOT NULL, `language` VARCHAR(15) NOT NULL, `template` VARCHAR(150) NOT NULL, `configFile` TEXT NOT NULL, - `userGroups` VARCHAR(200) NOT NULL, + `userGroups` VARCHAR(190) NOT NULL, `created` DATETIME NOT NULL, PRIMARY KEY (`cid`), KEY `sid` (`sid`), @@ -84,9 +84,7 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_config` ( COLLATE = utf8mb4_unicode_ci; INSERT IGNORE INTO `#__sobipro_config` (`sKey`, `sValue`, `section`, `critical`, `cSection`) VALUES - ('allowed_attributes_array', - 'YTo4OntpOjA7czo1OiJjbGFzcyI7aToxO3M6MjoiaWQiO2k6MjtzOjU6InN0eWxlIjtpOjM7czo0OiJocmVmIjtpOjQ7czozOiJzcmMiO2k6NTtzOjQ6Im5hbWUiO2k6NjtzOjM6ImFsdCI7aTo3O3M6NToidGl0bGUiO30=', - 0, 0, 'html'), + ('allowed_attributes_array', 'YTo4OntpOjA7czo1OiJjbGFzcyI7aToxO3M6MjoiaWQiO2k6MjtzOjU6InN0eWxlIjtpOjM7czo0OiJocmVmIjtpOjQ7czozOiJzcmMiO2k6NTtzOjQ6Im5hbWUiO2k6NjtzOjM6ImFsdCI7aTo3O3M6NToidGl0bGUiO30=', 0, 0, 'html'), ('allowed_tags_array', 'YToxNzp7aTowO3M6MToiYSI7aToxO3M6MToicCI7aToyO3M6MjoiYnIiO2k6MztzOjI6ImhyIjtpOjQ7czozOiJkaXYiO2k6NTtzOjI6ImxpIjtpOjY7czoyOiJ1bCI7aTo3O3M6NDoic3BhbiI7aTo4O3M6NToidGFibGUiO2k6OTtzOjI6InRyIjtpOjEwO3M6MjoidGQiO2k6MTE7czozOiJpbWciO2k6MTI7czoyOiJoMSI7aToxMztzOjI6ImgyIjtpOjE0O3M6MjoiaDMiO2k6MTU7czoyOiJoNCI7aToxNjtzOjI6Img1Ijt9', 0, 0, 'html'), ('alphamenu_extra_fields_array', '', 0, 0, 'alphamenu_extra_fields_array'), ('compress_js', '0', 0, 0, 'cache'), @@ -125,9 +123,9 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_errors` ( `errSect` VARCHAR(50) NOT NULL, `errUid` INT(11) NOT NULL, `errIp` VARCHAR(15) NOT NULL, - `errRef` VARCHAR(255) NOT NULL, - `errUa` VARCHAR(255) NOT NULL, - `errReq` VARCHAR(255) NOT NULL, + `errRef` TEXT NOT NULL, + `errUa` TEXT NOT NULL, + `errReq` TEXT NOT NULL, `errCont` TEXT NOT NULL, `errBacktrace` TEXT NOT NULL, PRIMARY KEY (`eid`) @@ -163,12 +161,12 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_field` ( `showIn` ENUM ('both', 'details', 'vcard', 'hidden') NOT NULL DEFAULT 'both', `allowedAttributes` TEXT NOT NULL, `allowedTags` TEXT NOT NULL, - `editor` VARCHAR(255) NOT NULL, + `editor` VARCHAR(190) NOT NULL, `inSearch` TINYINT(4) NOT NULL DEFAULT '1', `withLabel` TINYINT(4) NOT NULL, `cssClass` VARCHAR(50) NOT NULL, `parse` TINYINT(4) NOT NULL, - `template` VARCHAR(255) NOT NULL, + `template` VARCHAR(190) NOT NULL, `notice` VARCHAR(150) NOT NULL, `params` TEXT NOT NULL, `defaultValue` TEXT NOT NULL, @@ -309,34 +307,25 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_language` ( COLLATE = utf8mb4_unicode_ci; -INSERT IGNORE INTO `#__sobipro_language` (`sKey`, `sValue`, `section`, `language`, `oType`, `fid`, `id`, `params`, `options`, `explanation`) -VALUES - ('bankdata', - '
Payment Subject: "Entry #{entry.id} in {section.name} at {cfg:site_name}."
\r\nPlease click on the button below to pay via Paypal.
\r\n', 1, 'en-GB', 'application', 0, 1, - '', '', ''), - ('ppsubject', 'Entry #{entry.id} in {section.name} at {cfg:site_name}.', 1, 'en-GB', 'application', 0, 1, '', '', ''), - ('rejection-of-a-new-entry', - 'Entry {entry.name} has been rejected as it does not comply with the rules.\n\n
Payment Subject: "Entry #{entry.id} in {section.name} at {cfg:site_name}."
\r\nPlease click on the button below to pay via Paypal.
\r\n', 1, 'en-GB', 'application', 0, 1, '', '', ''), +('ppsubject', 'Entry #{entry.id} in {section.name} at {cfg:site_name}.', 1, 'en-GB', 'application', 0, 1, '', '', ''), +('rejection-of-a-new-entry', 'Entry {entry.name} has been rejected as it does not comply with the rules.\n\n
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque laoreet rhoncus tempor. Suspendisse dapibus vulputate dolor ut tincidunt. Suspendisse tristique laoreet dui, ut tempor orci dictum ut. Quisque aliquam urna ac justo tristique interdum. Aliquam in dui eget lectus elementum lacinia eget eu sem. Nam eu felis tellus, ac cursus velit.
', - '2', '', '2', - '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-desktop\\'',\\''font\\'':\\''font-awesome-3\\''}', - '2'), + (2, 1, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque laoreet rhoncus tempor. Suspendisse dapibus vulputate dolor ut tincidunt. Suspendisse tristique laoreet dui, ut tempor orci dictum ut. Quisque aliquam urna ac justo tristique interdum. Aliquam in dui eget lectus elementum lacinia eget eu sem. Nam eu felis tellus, ac cursus velit.
', '2', '', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-desktop\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), (3, 2, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque laoreet rhoncus tempor. Suspendisse dapibus vulputate dolor ut tincidunt. Suspendisse tristique laoreet dui, ut tempor orci dictum ut. Quisque aliquam urna ac justo tristique interdum. Aliquam in dui eget lectus elementum lacinia eget eu sem. Nam eu felis tellus, ac cursus velit.
', '2', '', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-gamepad\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), (4, 3, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque laoreet rhoncus tempor. Suspendisse dapibus vulputate dolor ut tincidunt. Suspendisse tristique laoreet dui, ut tempor orci dictum ut. Quisque aliquam urna ac justo tristique interdum. Aliquam in dui eget lectus elementum lacinia eget eu sem. Nam eu felis tellus, ac cursus velit.
', '2', '', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-medkit\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), (5, 4, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque laoreet rhoncus tempor. Suspendisse dapibus vulputate dolor ut tincidunt. Suspendisse tristique laoreet dui, ut tempor orci dictum ut. Quisque aliquam urna ac justo tristique interdum. Aliquam in dui eget lectus elementum lacinia eget eu sem. Nam eu felis tellus, ac cursus velit.
', '2', '', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-home\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), @@ -106,14 +102,8 @@ INSERT IGNORE INTO `#__sobipro_category` (`id`, `position`, `description`, `pars (31, 2, 'A book is a set of written, printed, illustrated, or blank sheets, made of ink, paper, parchment, or other materials, fastened together to hinge at one side. A single sheet within a book is a leaf, and each side of a leaf is a page.
', '2', 'A book is a set of written, printed, illustrated, or blank sheets, made of ink, paper, parchment, or other materials, fastened together to hinge at one side.', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-book\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), (32, 3, 'Music is an art form whose medium is sound. Generally, a song is considered the smallest standalone work of music, especially when involving singing.
', '2', 'Music is an art form whose medium is sound. ', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-music\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), (33, 4, 'A toy is an item that can be used for play. Toys are generally played with by children and pets. Playing with toys is an enjoyable means of training the young for life in society. Different materials are used to make toys enjoyable to both young and old.
', '2', 'A toy is an item that can be used for play. Toys are generally played with by children and pets.', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-rocket\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), - (34, 5, - 'Home improvement, home renovation or remodeling is the process of renovating or making additions to one\\''s home. Building materials and hardware for home improvement projects are typically purchased at home improvement stores.
', - '2', 'Home improvement, home renovation or remodeling is the process of renovating or making additions to one\\''s home. ', '2', - '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-home\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), - (36, 1, - 'A car is a wheeled, self-powered motor vehicle used for transportation. Most definitions of the term specify that cars are designed to run primarily on roads, to have seating for one to eight people, to typically have four wheels, and to be constructed principally for the transport of people rather than goods.
', - '2', 'A car is a wheeled, self-powered motor vehicle used for transportation. ', '2', - '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-truck\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'); + (34, 5, 'Home improvement, home renovation or remodeling is the process of renovating or making additions to one\\''s home. Building materials and hardware for home improvement projects are typically purchased at home improvement stores.
', '2', 'Home improvement, home renovation or remodeling is the process of renovating or making additions to one\\''s home. ', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-home\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'), + (36, 1, 'A car is a wheeled, self-powered motor vehicle used for transportation. Most definitions of the term specify that cars are designed to run primarily on roads, to have seating for one to eight people, to typically have four wheels, and to be constructed principally for the transport of people rather than goods.
', '2', 'A car is a wheeled, self-powered motor vehicle used for transportation. ', '2', '{\\''element\\'':\\''i\\'',\\''class\\'':\\''icon-truck\\'',\\''font\\'':\\''font-awesome-3\\''}', '2'); CREATE TABLE IF NOT EXISTS `#__sobipro_config` ( `sKey` VARCHAR(150) NOT NULL DEFAULT '', @@ -128,9 +118,7 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_config` ( COLLATE = utf8mb4_unicode_ci; INSERT IGNORE INTO `#__sobipro_config` (`sKey`, `sValue`, `section`, `critical`, `cSection`) VALUES - ('allowed_attributes_array', - 'YTo4OntpOjA7czo1OiJjbGFzcyI7aToxO3M6MjoiaWQiO2k6MjtzOjU6InN0eWxlIjtpOjM7czo0OiJocmVmIjtpOjQ7czozOiJzcmMiO2k6NTtzOjQ6Im5hbWUiO2k6NjtzOjM6ImFsdCI7aTo3O3M6NToidGl0bGUiO30=', - 0, 0, 'html'), + ('allowed_attributes_array', 'YTo4OntpOjA7czo1OiJjbGFzcyI7aToxO3M6MjoiaWQiO2k6MjtzOjU6InN0eWxlIjtpOjM7czo0OiJocmVmIjtpOjQ7czozOiJzcmMiO2k6NTtzOjQ6Im5hbWUiO2k6NjtzOjM6ImFsdCI7aTo3O3M6NToidGl0bGUiO30=', 0, 0, 'html'), ('allowed_attributes_array', 'YTo4OntpOjA7czo1OiJjbGFzcyI7aToxO3M6MjoiaWQiO2k6MjtzOjU6InN0eWxlIjtpOjM7czo0OiJocmVmIjtpOjQ7czozOiJzcmMiO2k6NTtzOjQ6Im5hbWUiO2k6NjtzOjM6ImFsdCI7aTo3O3M6NToidGl0bGUiO30=', 1, 0, 'html'), ('allowed_tags_array', 'YToxNzp7aTowO3M6MToiYSI7aToxO3M6MToicCI7aToyO3M6MjoiYnIiO2k6MztzOjI6ImhyIjtpOjQ7czozOiJkaXYiO2k6NTtzOjI6ImxpIjtpOjY7czoyOiJ1bCI7aTo3O3M6NDoic3BhbiI7aTo4O3M6NToidGFibGUiO2k6OTtzOjI6InRyIjtpOjEwO3M6MjoidGQiO2k6MTE7czozOiJpbWciO2k6MTI7czoyOiJoMSI7aToxMztzOjI6ImgyIjtpOjE0O3M6MjoiaDMiO2k6MTU7czoyOiJoNCI7aToxNjtzOjI6Img1Ijt9', 0, 0, 'html'), ('allowed_tags_array', 'YToxNzp7aTowO3M6MToiYSI7aToxO3M6MToicCI7aToyO3M6MjoiYnIiO2k6MztzOjI6ImhyIjtpOjQ7czozOiJkaXYiO2k6NTtzOjI6ImxpIjtpOjY7czoyOiJ1bCI7aTo3O3M6NDoic3BhbiI7aTo4O3M6NToidGFibGUiO2k6OTtzOjI6InRyIjtpOjEwO3M6MjoidGQiO2k6MTE7czozOiJpbWciO2k6MTI7czoyOiJoMSI7aToxMztzOjI6ImgyIjtpOjE0O3M6MjoiaDMiO2k6MTU7czoyOiJoNCI7aToxNjtzOjI6Img1Ijt9', 1, 0, 'html'), @@ -241,9 +229,9 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_errors` ( `errSect` VARCHAR(50) NOT NULL, `errUid` INT(11) NOT NULL, `errIp` VARCHAR(15) NOT NULL, - `errRef` VARCHAR(255) NOT NULL, - `errUa` VARCHAR(255) NOT NULL, - `errReq` VARCHAR(255) NOT NULL, + `errRef` TEXT NOT NULL, + `errUa` TEXT NOT NULL, + `errReq` TEXT NOT NULL, `errCont` TEXT NOT NULL, `errBacktrace` TEXT NOT NULL, PRIMARY KEY (`eid`) @@ -279,12 +267,12 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_field` ( `showIn` ENUM ('both', 'details', 'vcard', 'hidden') NOT NULL DEFAULT 'both', `allowedAttributes` TEXT NOT NULL, `allowedTags` TEXT NOT NULL, - `editor` VARCHAR(255) NOT NULL, + `editor` VARCHAR(190) NOT NULL, `inSearch` TINYINT(4) NOT NULL DEFAULT '1', `withLabel` TINYINT(4) NOT NULL, `cssClass` VARCHAR(50) NOT NULL, `parse` TINYINT(4) NOT NULL, - `template` VARCHAR(255) NOT NULL, + `template` VARCHAR(190) NOT NULL, `notice` VARCHAR(150) NOT NULL, `params` TEXT NOT NULL, `defaultValue` TEXT NOT NULL, @@ -1364,15 +1352,15 @@ INSERT IGNORE INTO `#__sobipro_language` (`sKey`, `sValue`, `section`, `language CREATE TABLE IF NOT EXISTS `#__sobipro_object` ( `id` INT(11) NOT NULL AUTO_INCREMENT, - `nid` VARCHAR(255) NOT NULL, - `name` VARCHAR(250) DEFAULT NULL, + `nid` VARCHAR(190) NOT NULL, + `name` VARCHAR(190) DEFAULT NULL, `approved` TINYINT(1) DEFAULT NULL, `confirmed` TINYINT(1) DEFAULT NULL, `counter` INT(11) NOT NULL DEFAULT '0', `cout` INT(11) DEFAULT NULL, `coutTime` DATETIME DEFAULT NULL, `createdTime` DATETIME DEFAULT NULL, - `defURL` VARCHAR(250) DEFAULT NULL, + `defURL` VARCHAR(190) DEFAULT NULL, `metaDesc` TEXT, `metaKeys` TEXT, `metaAuthor` VARCHAR(150) NOT NULL, @@ -1384,7 +1372,7 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_object` ( `params` TEXT, `parent` INT(11) DEFAULT NULL, `state` TINYINT(4) NOT NULL, - `stateExpl` VARCHAR(250) DEFAULT NULL, + `stateExpl` MEDIUMTEXT DEFAULT NULL, `updatedTime` DATETIME NOT NULL, `updater` INT(11) DEFAULT NULL, `updaterIP` VARCHAR(15) DEFAULT NULL, @@ -1580,11 +1568,11 @@ INSERT IGNORE INTO `#__sobipro_permissions_map` (`rid`, `sid`, `pid`) VALUES CREATE TABLE IF NOT EXISTS `#__sobipro_permissions_rules` ( `rid` INT(11) NOT NULL AUTO_INCREMENT, - `name` VARCHAR(250) NOT NULL, + `name` VARCHAR(190) NOT NULL, `nid` VARCHAR(50) NOT NULL, `validSince` DATETIME NOT NULL, `validUntil` DATETIME NOT NULL, - `note` VARCHAR(250) NOT NULL, + `note` MEDIUMTEXT NOT NULL, `state` TINYINT(4) NOT NULL, PRIMARY KEY (`rid`) ) @@ -1603,7 +1591,7 @@ CREATE TABLE IF NOT EXISTS `#__sobipro_plugins` ( `version` VARCHAR(50) NOT NULL, `description` TEXT, `author` VARCHAR(150) DEFAULT NULL, - `authorURL` VARCHAR(250) DEFAULT NULL, + `authorURL` VARCHAR(190) DEFAULT NULL, `authorMail` VARCHAR(150) DEFAULT NULL, `enabled` TINYINT(1) DEFAULT NULL, `type` VARCHAR(100) NOT NULL, diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fef9470..b9df5690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public (#) Added paragraph to response message in SAM (Issue #92) (#) Reverted previous commits for #90 and #91 as it didn't help (#) JFolder:: delete: The path is not a folder. (Issue #95) + (#) 'Specified key was too long; max key length is 767 bytes' (Issue #96) ### 1.4.7.1 (4 May 2018) diff --git a/Media/images/image.png b/Media/images/image.png deleted file mode 100644 index a47dd71c..00000000 Binary files a/Media/images/image.png and /dev/null differ diff --git a/spinstall.php b/spinstall.php index 9f528545..39794345 100644 --- a/spinstall.php +++ b/spinstall.php @@ -144,17 +144,13 @@ public function update(JAdapterInstance $adapter) } $dest = JPATH_ROOT . '/images/sobipro/categories/image.png'; - $src = JPATH_ROOT . '/media/sobipro/images/image.png'; - if ( !(file_exists( $dest )) && file_exists($src)) { - JFile::copy( $src, $dest ); + if ( !(file_exists( $dest )) && file_exists( JPATH_ROOT . '/components/com_sobipro/tmp/install/image.png' ) ) { + JFile::move( JPATH_ROOT . '/components/com_sobipro/tmp/install/image.png', JPATH_ROOT . '/images/sobipro/categories/image.png' ); } - $db = JFactory::getDBO(); - $db->setQuery( 'CREATE TABLE IF NOT EXISTS `#__sobipro_view_cache` (`cid` INT(11) NOT NULL AUTO_INCREMENT, `section` INT(11) NOT NULL, `sid` INT(11) NOT NULL, `fileName` VARCHAR(100) NOT NULL, `task` VARCHAR(100) NOT NULL, `site` INT(11) NOT NULL, `request` VARCHAR(255) NOT NULL, `language` VARCHAR(15) NOT NULL, `template` VARCHAR(150) NOT NULL, `configFile` TEXT NOT NULL, `userGroups` VARCHAR(200) NOT NULL, `created` DATETIME NOT NULL, PRIMARY KEY (`cid`), KEY `sid` (`sid`), KEY `section` (`section`), KEY `language` (`language`), KEY `task` (`task`), KEY `request` (`request`), KEY `site` (`site`), KEY `userGroups` (`userGroups`)) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; -' - ); + $db->setQuery( 'CREATE TABLE IF NOT EXISTS `#__sobipro_view_cache` (`cid` INT(11) NOT NULL AUTO_INCREMENT, `section` INT(11) NOT NULL, `sid` INT(11) NOT NULL, `fileName` VARCHAR(100) NOT NULL, `task` VARCHAR(100) NOT NULL, `site` INT(11) NOT NULL, `request` VARCHAR(190) NOT NULL, `language` VARCHAR(15) NOT NULL, `template` VARCHAR(150) NOT NULL, `configFile` TEXT NOT NULL, `userGroups` VARCHAR(190) NOT NULL, `created` DATETIME NOT NULL, PRIMARY KEY (`cid`), KEY `sid` (`sid`), KEY `section` (`section`), KEY `language` (`language`), KEY `task` (`task`), KEY `request` (`request`), KEY `site` (`site`), KEY `userGroups` (`userGroups`)) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;' ); $db->execute(); $db->setQuery( 'CREATE TABLE IF NOT EXISTS `#__sobipro_view_cache_relation` (`cid` INT(11) NOT NULL, `sid` INT(11) NOT NULL, PRIMARY KEY (`cid`, `sid`)) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;' );