Пример #1
0
 public static function init()
 {
     if (!Social_Client::$finish) {
         Social_Client::$finish = true;
         try {
             require_once realpath(dirname(__FILE__)) . "/Session.php";
             $session = new Social_Session();
             if (!$session->get("sa_config")) {
                 header("HTTP/1.0 404 Not Found");
                 die("Direct access not allowed");
                 Social_Logger::error("Direct access not allowed, ");
             }
             Social_Auth::init($session->get("sa_config"));
         } catch (Exception $e) {
             Social_Logger::error("Error occured while Social_Auth init");
             header("HTTP/1.0 404 Not Found");
             die("Error occured!");
         }
     }
 }
Пример #2
0
 function __construct($config)
 {
     Social_Auth::init($config);
 }