Permalink
Browse files

Bunch of little bugs found while trying to actually to run things

  • Loading branch information...
1 parent fb3fa80 commit 81fc746b810ada357c6d13e5e390ad26e9cd7d0d @danielbeardsley danielbeardsley committed Oct 24, 2011
Showing with 5 additions and 9 deletions.
  1. +3 −3 ticket.php
  2. +1 −5 trac.php
  3. +1 −1 trac2github.php
View
@@ -12,7 +12,7 @@ public static function loadFromTrac($id) {
return $result ? new self($result) : null;
}
- public __construct($dbAttributes) {
+ public function __construct($dbAttributes) {
$this->attr = $dbAttributes;
$this->id = $this->attr['id'];
}
@@ -29,9 +29,9 @@ public function toIssueJson() {
}
public function saveToGithub() {
- self::github->add_issue($this->toIssueJson());
+ self::$github->add_issue($this->toIssueJson());
if ($this->$attr['status'] == 'closed') {
- self::github->update_issue($this->id, array('state' => 'closed'));
+ self::$github->update_issue($this->id, array('state' => 'closed'));
}
}
View
@@ -1,15 +1,11 @@
<?php
class Trac {
- public static $host;
- public static $user;
- public static $db;
-
private static $db;
public static function init($host, $dbname, $user, $password) {
self::$db = new PDO(
- 'mysqlhost='.$host.
+ 'mysql:host='.$host.
';dbname='.$dbname,
$user,
$password);
View
@@ -2,8 +2,8 @@
require("github.php");
require("trac.php");
-require("config.php");
require("ticket.php");
+require("config.php");
error_reporting(E_ALL ^ E_NOTICE);

0 comments on commit 81fc746

Please sign in to comment.