Skip to content

Commit

Permalink
Better file conflict solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Enelar committed Feb 12, 2016
1 parent 7392bd0 commit 48a97b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
15 changes: 14 additions & 1 deletion db.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<?php
// Compatibility with https://github.com/Enelar/pgsql_php
class db
{
public static function __callStatic( $name, $args )
{
return call_user_func_array(array(self::$db, $name), $args);
}

require_once('phpsqldb.php')
public static $db;

public static function Bind( $obj )
{
self::$db = $obj;
}
}
8 changes: 4 additions & 4 deletions oneline.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php namespace phpsql;

require_once('phpsqldb.php');
require_once(__DIR__.'/db.php');

function OneLineConfig($conf)
{
require_once('phpsql.php');
require_once('wrapper.php');
require_once(__DIR__.'/phpsql.php');
require_once(__DIR__.'/wrapper.php');

list($scheme) = explode(":", $conf);
require_once("{$scheme}.php");
require_once(__DIR__."/{$scheme}.php");

$phpsql = new \phpsql();
$connection = $phpsql->Connect($conf);
Expand Down
16 changes: 0 additions & 16 deletions phpsqldb.php

This file was deleted.

0 comments on commit 48a97b1

Please sign in to comment.