Add a constructor to create an empty $data.
Make connect static.
This commit is contained in:
parent
5de5b1687f
commit
1e820aad7c
@ -28,6 +28,10 @@ class Gallery3 {
|
|||||||
var $file;
|
var $file;
|
||||||
var $parent;
|
var $parent;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->data = new stdClass();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a remote Gallery3 instance
|
* Connect to a remote Gallery3 instance
|
||||||
*
|
*
|
||||||
@ -36,7 +40,7 @@ class Gallery3 {
|
|||||||
* @param string password
|
* @param string password
|
||||||
* @return object Gallery3
|
* @return object Gallery3
|
||||||
*/
|
*/
|
||||||
function connect($url, $user, $pass) {
|
static function connect($url, $user, $pass) {
|
||||||
$response = Gallery3_Helper::request(
|
$response = Gallery3_Helper::request(
|
||||||
"post", $url, null, array("user" => $user, "password" => $pass));
|
"post", $url, null, array("user" => $user, "password" => $pass));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user