Skip to content

Commit

Permalink
Use new database credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
notr1ch committed Jan 12, 2024
1 parent d94a409 commit 0596b5c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions cron/wiki_hotness.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
<?php
chdir( __DIR__ );
require_once '../../../../../config/db_config.php';
require_once '../../../../../config/secrets.php';
require_once '../../../lp-config/variables/wikis.php';

$db_host = $server;
$db_name = 'liquipedia';
$db_user = $login;
$db_password = $pass;
unset( $login, $pass, $server );

$db = null;
try {
$db = new PDO( 'mysql:host=' . $db_host . ';dbname=' . $db_name, $db_user, $db_password );
$db = new PDO( 'mysql:host=' . $dbCredentials['wiki']['host'] . ';dbname=' . $dbCredentials['wiki']['database'], $dbCredentials['wiki']['user'], $dbCredentials['wiki']['pass'] );
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$db->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC );
$db->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );
Expand Down

0 comments on commit 0596b5c

Please sign in to comment.