Skip to content

Commit

Permalink
[5.2] Refactored JDatabaseDriver in some params
Browse files Browse the repository at this point in the history
  • Loading branch information
pe7er committed Jan 18, 2025
1 parent 53f4543 commit c855172
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Joomla\Component\Scheduler\Administrator\Helper\SchedulerHelper;
use Joomla\Component\Scheduler\Administrator\Table\TaskTable;
use Joomla\Component\Scheduler\Administrator\Task\TaskOption;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\ParameterType;
use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
Expand Down Expand Up @@ -413,7 +414,7 @@ public function getTask(array $options = []): ?\stdClass
/**
* Checks if there are any running tasks in the database.
*
* @param \JDatabaseDriver $db The database driver to use.
* @param DatabaseDriver $db The database driver to use.
* @return bool True if there are running tasks, false otherwise.
* @since 4.4.9
*/
Expand Down Expand Up @@ -481,7 +482,7 @@ static function (TaskOption $taskOption): string {
/**
* Retrieves the ID of the next task based on the given criteria.
*
* @param \JDatabaseDriver $db The database object.
* @param DatabaseDriver $db The database object.
* @param string $now The current time.
* @param array $options The options for retrieving the next task.
* - includeCliExclusive: Whether to include CLI exclusive tasks.
Expand Down Expand Up @@ -534,7 +535,7 @@ static function (TaskOption $taskOption): string {
/**
* Fetches a task from the database based on the current time.
*
* @param \JDatabaseDriver $db The database driver to use.
* @param DatabaseDriver $db The database driver to use.
* @param string $now The current time in the database's time format.
* @return \stdClass|null The fetched task object, or null if no task was found.
* @since 5.2.0
Expand Down
2 changes: 1 addition & 1 deletion installation/src/Model/DatabaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function createDatabase(array $options)
|| $type === 'pgsql' && strpos($e->getMessage(), 'database "' . $options->db_name . '" does not exist')
) {
/*
* Now we're really getting insane here; we're going to try building a new JDatabaseDriver instance
* Now we're really getting insane here; we're going to try building a new DatabaseDriver instance
* in order to trick the connection into creating the database
*/
if ($type === 'mysql') {
Expand Down

0 comments on commit c855172

Please sign in to comment.