2018-09-26 12:50:37 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @file hybridauth.lnk.php
|
|
|
|
* @date 2018-09-26
|
|
|
|
* @author Go Namhyeon <gnh1201@gmail.com>
|
|
|
|
* @brief HybridAuth library RSF Linker
|
|
|
|
***/
|
|
|
|
|
|
|
|
if(!function_exists("load_hybridauth")) {
|
|
|
|
function load_hybridauth() {
|
2018-09-26 13:04:25 +00:00
|
|
|
$result = false;
|
|
|
|
|
|
|
|
$configfile = "./vendor/library/hauth.config.php";
|
2018-09-26 12:50:37 +00:00
|
|
|
$required_files = array(
|
|
|
|
"hybridauth/hybridauth/library/Hybrid/Auth",
|
|
|
|
"hybridauth/hybridauth/library/Hybrid/Endpoint",
|
2018-09-26 12:54:40 +00:00
|
|
|
"facebook-sdk-v5/src/Facebook/autoload" // support facebook
|
2018-09-26 12:50:37 +00:00
|
|
|
);
|
|
|
|
foreach($required_files as $file) {
|
2018-09-26 12:52:36 +00:00
|
|
|
$inc_file = "./vendor/" . $file . ".php";
|
|
|
|
if(!file_exists($inc_file)) {
|
|
|
|
set_error("File not exists. " . $inc_file);
|
2018-09-26 13:04:25 +00:00
|
|
|
show_errors();
|
2018-09-26 12:52:36 +00:00
|
|
|
} else {
|
|
|
|
include("./vendor/" . $file . ".php");
|
|
|
|
}
|
2018-09-26 12:50:37 +00:00
|
|
|
}
|
2018-09-26 13:04:25 +00:00
|
|
|
|
|
|
|
if(file_exists($configfile)) {
|
|
|
|
$result = $configfile;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $result;
|
2018-09-26 12:50:37 +00:00
|
|
|
}
|
|
|
|
}
|