Skip to content

Commit

Permalink
Removing global reference to $db from pudlOrm::get()
Browse files Browse the repository at this point in the history
  • Loading branch information
darkain committed Oct 16, 2018
1 parent 5e30c2f commit 8fd8e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pudlOrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function create($data=false, $update=false, $database=NULL) {

$database = (!is_null($database)) ? $database : $db;

return static::get(
return static::get($database,
$database->insertExtract(
static::table,
$data,
Expand All @@ -111,7 +111,7 @@ public static function create($data=false, $update=false, $database=NULL) {
////////////////////////////////////////////////////////////////////////////
//GET AN INSTANCE OF THIS OBJECT FROM THE DATABASE
////////////////////////////////////////////////////////////////////////////
public static function get($id=false) {
public static function get($db, $id=false) {
global $get, $afurl;

if ($id instanceof getvar || $id instanceof afUrl) {
Expand Down

0 comments on commit 8fd8e9b

Please sign in to comment.