_common.php 대신 composer로 대체

This commit is contained in:
2018-04-03 21:15:12 +09:00
parent e0cbf34d43
commit 0c64087c0f
49 changed files with 90 additions and 174 deletions
-9
View File
@@ -1,9 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '.');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+10 -1
View File
@@ -27,7 +27,16 @@
"d_setting",
"src/kakao"
]
}
},
"classmap": [
"d_setting/"
],
"exclude-from-classmap": [
"**/*.orig.php"
],
"files":[
"f_config/config.php"
]
}
}
Generated
+5 -5
View File
@@ -90,16 +90,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.1",
"version": "6.3.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111"
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/49e42e6539f775e80c74086a710a882e1d5a8111",
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"shasum": ""
},
"require": {
@@ -151,7 +151,7 @@
"rest",
"web service"
],
"time": "2018-03-26T12:06:26+00:00"
"time": "2018-03-26T16:33:04+00:00"
},
{
"name": "guzzlehttp/promises",
-9
View File
@@ -1,9 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+28 -7
View File
@@ -1,14 +1,35 @@
<?php
namespace sammo;
ob_start();
require(__dir__.'/../vendor/autoload.php');
require_once(__dir__.'/func.php');
define('__LINE__',__FILE__." ".__FUNCTION__." ".__LINE__." : ");
define('IMAGE', '../../image');
define('IMAGES', '../../images');
//define('IMAGE', 'http://115.68.28.99/image');
//define('IMAGES', 'http://115.68.28.99/images');
define('ROOT', realpath(__dir__.'/..'));
function CustomHeader() {
//xxx: CustomHeader를 제거하기 전까진 유지
WebUtil::setHeaderNoCache();
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
// through to the standard PHP error handler
return false;
}
$date = date("Ymd_His");
file_put_contents(__DIR__.'/../d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n", FILE_APPEND);
/* Don't execute PHP internal error handler */
//return true;
}
set_error_handler("\sammo\logErrorByCustomHandler");
function Error($msg) {
file_put_contents(ROOT.'/d_log/err.txt', $msg."\n", FILE_APPEND);
exit(1);
}
-28
View File
@@ -1,28 +0,0 @@
<?php
namespace sammo;
function CustomHeader() {
//xxx: CustomHeader를 제거하기 전까진 유지
WebUtil::setHeaderNoCache();
}
function logErrorByCustomHandler(int $errno, string $errstr, string $errfile, int $errline, array $errcontext){
if (!(error_reporting() & $errno)) {
// This error code is not included in error_reporting, so let it fall
// through to the standard PHP error handler
return false;
}
$date = date("Ymd_His");
file_put_contents(__DIR__.'/../d_log/err_log.txt',"$date, $errno, $errstr, $errfile, $errline\n", FILE_APPEND);
/* Don't execute PHP internal error handler */
//return true;
}
set_error_handler("\sammo\logErrorByCustomHandler");
function Error($msg) {
file_put_contents(ROOT.'/d_log/err.txt', $msg."\n", FILE_APPEND);
exit(1);
}
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
+1 -2
View File
@@ -1,8 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
session_start();
session_destroy();
+1 -2
View File
@@ -1,8 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
function dbConnFail($params){
Json::die([
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
function dbConnFail($params){
Json::die([
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '../..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
-1
View File
@@ -54,7 +54,6 @@ define('__OLINE__',__LINE__);
define('__LINE__',__FILE__." ".__FUNCTION__." ".__LINE__." : ");
ini_set("session.cache_expire", 10080); // minutes
ob_start();
include "MYDB.php";
-11
View File
@@ -1,11 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::requireLogin()->setReadOnly();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::requireLogin(null);
$db = RootDB::db();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance();
if(!$session->isLoggedIn()){
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::requireLogin(null);
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance()->setReadOnly();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
// 외부 파라미터
$response['server'] = [];
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$session = Session::Instance()->setReadOnly();
if($session->userGrade < 6){
-11
View File
@@ -1,11 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '../..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$category = Util::array_get($_GET['category'], 0);
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
$images = IMAGES;
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/vendor/autoload.php');
if(!class_exists('\\sammo\\RootDB')){
header ('Location:install.php');
-2
View File
@@ -1,6 +1,4 @@
<?php
namespace sammo;
require_once('_common.php');
header('location:f_install/install.php');
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/vendor/autoload.php');
$RootDB = RootDB::db();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/vendor/autoload.php');
function getVersion($target=null){
if($target){
-10
View File
@@ -1,10 +0,0 @@
<?php
namespace sammo;
if(!defined('ROOT')){
define('ROOT', '..');
}
require_once(ROOT.'/f_config/config.php');
CustomHeader();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
require('lib.join.php');
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require_once('_common.php');
require(__dir__.'/../vendor/autoload.php');
require('lib.join.php');
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
+3 -3
View File
@@ -1,13 +1,13 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
session_start();
$session = Session::Instance()->setReadOnly();
$access_token = Util::array_get($_SESSION['access_token']);
$access_token = $session->access_token;
if(!$access_token){
header('Location:oauth_fail.html');
}
-2
View File
@@ -1,8 +1,6 @@
<?php
namespace sammo;
require_once('_common.php');
function checkUsernameDup($username){
if(!$username){
return '계정명을 입력해주세요';
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
namespace sammo;
require('_common.php');
require(__dir__.'/../vendor/autoload.php');
use \kakao\Kakao_REST_API_Helper as Kakao_REST_API_Helper;
+2
View File
@@ -15,4 +15,6 @@ return array(
'MeekroDBEval' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
'MeekroDBException' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
'WhereClause' => $vendorDir . '/sergeytsalkov/meekrodb/db.class.php',
'kakao\\KakaoKey' => $baseDir . '/d_setting/KakaoKey.php',
'sammo\\RootDB' => $baseDir . '/d_setting/RootDB.php',
);
+1
View File
@@ -9,4 +9,5 @@ return array(
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'870dc64919afa8b0f700701bb2c6a783' => $baseDir . '/f_config/config.php',
);
+3
View File
@@ -10,6 +10,7 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'870dc64919afa8b0f700701bb2c6a783' => __DIR__ . '/../..' . '/f_config/config.php',
);
public static $prefixLengthsPsr4 = array (
@@ -125,6 +126,8 @@ class ComposerStaticInit67b09c83b85c3bc0027caefe5bba171a
'MeekroDBEval' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
'MeekroDBException' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
'WhereClause' => __DIR__ . '/..' . '/sergeytsalkov/meekrodb/db.class.php',
'kakao\\KakaoKey' => __DIR__ . '/../..' . '/d_setting/KakaoKey.php',
'sammo\\RootDB' => __DIR__ . '/../..' . '/d_setting/RootDB.php',
);
public static function getInitializer(ClassLoader $loader)
+6 -6
View File
@@ -87,17 +87,17 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.3.1",
"version_normalized": "6.3.1.0",
"version": "6.3.2",
"version_normalized": "6.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111"
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/49e42e6539f775e80c74086a710a882e1d5a8111",
"reference": "49e42e6539f775e80c74086a710a882e1d5a8111",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"reference": "68d0ea14d5a3f42a20e87632a5f84931e2709c90",
"shasum": ""
},
"require": {
@@ -113,7 +113,7 @@
"suggest": {
"psr/log": "Required for using the Log middleware"
},
"time": "2018-03-26T12:06:26+00:00",
"time": "2018-03-26T16:33:04+00:00",
"type": "library",
"extra": {
"branch-alias": {
+5
View File
@@ -1,5 +1,10 @@
# Change Log
## 6.3.2 - 2018-03-26
* Fix: Release process
## 6.3.1 - 2018-03-26
* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014)
+1 -1
View File
@@ -12,7 +12,7 @@ use Psr\Http\Message\UriInterface;
*/
interface ClientInterface
{
const VERSION = '6.3.1';
const VERSION = '6.3.2';
/**
* Send an HTTP request.