Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added constructor for NativeSessionStore to auto start sessions

  • Loading branch information...
commit 2a050613c264786396aa5c4fd8d58ef0cda1f65d 1 parent f18c8b4
@dustinwhittle dustinwhittle authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/Yahoo.inc
View
14 lib/Yahoo.inc
@@ -1119,7 +1119,7 @@ class YahooUser {
$data = array('contactsync' => $contactsync);
$body = json_encode($data);
-
+
$request_url = sprintf("http://%s/v1/user/%s/contacts", $YahooConfig["SOCIAL_WS_HOSTNAME"], $this->guid);
$response = $this->client->put($request_url, "application/json", $body);
@@ -1142,7 +1142,7 @@ class YahooUser {
$request_url = sprintf("http://%s/v1/user/%s/contacts", $YahooConfig["SOCIAL_WS_HOSTNAME"], $this->guid);
$response = $this->client->post($request_url, "application/json", $body);
-
+
return !(YahooUtil::is_response_error($response));
}
@@ -1184,7 +1184,7 @@ class YahooUser {
function loadProfile() {
// method renamed, keeping for compatibility.
YahooLogger::info("loadProfile is deprecated since 1.2: Please use getProfile");
-
+
return $this->getProfile();
}
@@ -1546,6 +1546,14 @@ class CookieSessionStore {
* stored on file system, but can be database or memcache backend.
*/
class NativeSessionStore {
+
+ function NativeSessionStore() {
+ $id = session_id();
+ if(empty($id)) {
+ session_start();
+ }
+ }
+
/**
* Indicates if the session store has a request token.
*
Please sign in to comment.
Something went wrong with that request. Please try again.