Skip to content

Commit

Permalink
- update sql install and update files
Browse files Browse the repository at this point in the history
- update package script file
  • Loading branch information
sergeytolkachyov committed Aug 29, 2023
1 parent ea2964e commit d3647aa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion com_swjprojects/admin/sql/install.mysql.utf8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ CREATE TABLE IF NOT EXISTS `#__swjprojects_projects`
`params` text NULL,
`ordering` int(11) NOT NULL DEFAULT 0,
`hits` int(10) NOT NULL DEFAULT 0,
`visible` INT(1) NOT NULL DEFAULT 1 COMMENT 'Is project visible or not in frontend',
PRIMARY KEY `id` (`id`),
KEY `idx_element` (`element`(100)),
KEY `idx_download` (`download_type`(100)),
KEY `idx_alias` (`alias`(191)),
KEY `idx_state` (`state`),
KEY `idx_catid` (`catid`),
KEY `idx_ordering` (`ordering`),
KEY `idx_hits` (`hits`)
KEY `idx_hits` (`hits`),
KEY `idx_visible` (`visible`)
)
ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
Expand Down
2 changes: 1 addition & 1 deletion com_swjprojects/admin/sql/updates/mysql/1.8.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @link https://septdir.com, https://web-tolk.ru
*/

ALTER TABLE `#__swjprojects_projects` ADD `visible` INT(1) NOT NULL DEFAULT '1' COMMENT 'Is project visible or not in frontend' AFTER `hits`;
ALTER TABLE `#__swjprojects_projects` ADD `visible` INT(1) NOT NULL DEFAULT 1 COMMENT 'Is project visible or not in frontend' AFTER `hits`;
20 changes: 16 additions & 4 deletions script.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ protected function checkUpdateServer()
{
$old = array(
'https://www.septdir.com/jupdate?element=pkg_swjprojects',
'https://www.septdir.com/marketplace/joomla/update?element=pkg_swjprojects'
'https://www.septdir.com/marketplace/joomla/update?element=pkg_swjprojects',
'https://www.septdir.com/solutions/joomla/update?element=pkg_swjprojects'
);
$new = 'https://www.septdir.com/solutions/joomla/update?element=pkg_swjprojects';
$new = 'https://web-tolk.ru/component/swjprojects/jupdate?element=pkg_swjprojects';

$db = Factory::getDbo();
$query = $db->getQuery(true)
Expand Down Expand Up @@ -153,12 +154,23 @@ public function update($parent)
{
$db->setQuery('UPDATE #__extensions SET package_id = 0 WHERE extension_id = ' . $plugin)->execute();
}

echo Text::_('PKG_SWJPROJECTS_WHATS_NEW');
}

/**
* This method is called when extension is updated.
*
* @param InstallerAdapter $parent Parent object calling object.
*
* @since 1.8.0
*/
public function install ($parent){
echo Text::_('PKG_SWJPROJECTS_WHATS_NEW');
}

function postflight($type, $parent)
{

echo Text::_('PKG_SWJPROJECTS_WHATS_NEW');

}
}

0 comments on commit d3647aa

Please sign in to comment.