Skip to content

Commit

Permalink
Remove pre-v2.0.0 mods
Browse files Browse the repository at this point in the history
  • Loading branch information
billtomczak committed Dec 4, 2023
1 parent 949e0ed commit 679ece3
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/admin/library/Free/Installer/AbstractScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ protected function customPostFlight(string $type, InstallerAdapter $parent): voi
$include = JPATH_ADMINISTRATOR . '/components/com_osdownloads/include.php';
if (is_file($include) && include $include) {
$this->checkAndCreateDefaultCategory();
$this->fixDatabase();
$this->clearProData();

if ($type == 'update') {
Expand Down Expand Up @@ -167,28 +166,6 @@ protected function moveLayouts()
}
}

/**
* Apply any needed database fixes
*/
protected function fixDatabase()
{
$db = $this->dbo;

/**
* We moved to null dates as of v1.13.0
* Finally fixed this as of v2.1.1
*/
foreach (['publish_up', 'publish_down'] as $field) {
$field = $db->quoteName($field);
$query = $db->getQuery(true)
->update('#__osdownloads_documents')
->where($field . ' = ' . $db->quote('0000-00-00 00:00:00'))
->set($field . ' = NULL');

$db->setQuery($query)->execute();
}
}

/**
* Clear out any pro data that may have hung around after a pro install
*
Expand Down

0 comments on commit 679ece3

Please sign in to comment.