Commit f5d8656f authored by cividesk's avatar cividesk

Corrects PH Notices

parent 03f39d7e
...@@ -559,7 +559,7 @@ CREATE TABLE IF NOT EXISTS `github_user` ( ...@@ -559,7 +559,7 @@ CREATE TABLE IF NOT EXISTS `github_user` (
`email` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`location` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `location` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`avatar_url` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `avatar_url` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`first_commit` DATETIME, `first_commit` DATETIME DEFAULT NULL,
PRIMARY KEY (`login`) PRIMARY KEY (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
......
...@@ -48,16 +48,19 @@ foreach($repos as $repo) { ...@@ -48,16 +48,19 @@ foreach($repos as $repo) {
/* @var $commit GitHubCommit */ /* @var $commit GitHubCommit */
// Write commit to database // Write commit to database
$stm_c->bindParam(':hash', $commit->getSha()); $hash = $commit->getSha();
$stm_c->bindParam(':hash', $hash);
$author_login = ($commit->getAuthor() ? $commit->getAuthor()->getLogin() : ''); $author_login = ($commit->getAuthor() ? $commit->getAuthor()->getLogin() : '');
$stm_c->bindParam(':author_login', $author_login); $stm_c->bindParam(':author_login', $author_login);
$stm_c->bindParam(':author_date', $commit->getCommit()->getAuthor()->getDate()); $author_date = $commit->getCommit()->getAuthor()->getDate();
$stm_c->bindParam(':author_date', $author_date);
$committer_login = ($commit->getCommitter() ? $commit->getCommitter()->getLogin() : ''); $committer_login = ($commit->getCommitter() ? $commit->getCommitter()->getLogin() : '');
$stm_c->bindParam(':committer_login', $committer_login); $stm_c->bindParam(':committer_login', $committer_login);
$stm_c->bindParam(':committer_date', $commit->getCommit()->getCommitter()->getDate()); $committer_date = $commit->getCommit()->getCommitter()->getDate();
$stm_c->bindParam(':message', $commit->getCommit()->getMessage()); $stm_c->bindParam(':committer_date', $committer_date);
$stm_c->execute(); $message = $commit->getCommit()->getMessage();
$new_commits++; $stm_c->bindParam(':message', $message);
if ($stm_c->execute()) $new_commits++;
} }
$commits = $client->getNextPage(); $commits = $client->getNextPage();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment