mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-14 17:11:34 +01:00
Composer updated and 503 error added
This commit is contained in:
40
Source/composer.lock
generated
40
Source/composer.lock
generated
@@ -1,23 +1,23 @@
|
|||||||
{
|
{
|
||||||
"_readme": [
|
"_readme": [
|
||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "c34d26c2711c26f871ff9ca8a4401104",
|
"content-hash": "c34d26c2711c26f871ff9ca8a4401104",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "jkanetwork/dbwrapper",
|
"name": "jkanetwork/dbwrapper",
|
||||||
"version": "1.4.1",
|
"version": "1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitlab.com/CodeSolutionsProject/DBWrapper.git",
|
"url": "https://gitlab.com/CodeSolutionsProject/DBWrapper.git",
|
||||||
"reference": "d10246e5bd55950280f3f7802d885341f1477874"
|
"reference": "d366ae0f1f25d6a89c8c5a379118bf92aca45bdd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://gitlab.com/api/v4/projects/CodeSolutionsProject%2FDBWrapper/repository/archive.zip?sha=d10246e5bd55950280f3f7802d885341f1477874",
|
"url": "https://gitlab.com/api/v4/projects/CodeSolutionsProject%2FDBWrapper/repository/archive.zip?sha=d366ae0f1f25d6a89c8c5a379118bf92aca45bdd",
|
||||||
"reference": "d10246e5bd55950280f3f7802d885341f1477874",
|
"reference": "d366ae0f1f25d6a89c8c5a379118bf92aca45bdd",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
"license": [
|
"license": [
|
||||||
"APACHE"
|
"Apache-2.0"
|
||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@@ -46,20 +46,20 @@
|
|||||||
"sqlite",
|
"sqlite",
|
||||||
"wrapper"
|
"wrapper"
|
||||||
],
|
],
|
||||||
"time": "2017-09-22T01:18:27+00:00"
|
"time": "2018-05-16T13:37:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-mbstring",
|
"name": "symfony/polyfill-mbstring",
|
||||||
"version": "v1.5.0",
|
"version": "v1.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803"
|
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
|
||||||
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803",
|
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "1.5-dev"
|
"dev-master": "1.8-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -105,20 +105,20 @@
|
|||||||
"portable",
|
"portable",
|
||||||
"shim"
|
"shim"
|
||||||
],
|
],
|
||||||
"time": "2017-06-14T15:44:48+00:00"
|
"time": "2018-04-26T10:06:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v2.4.4",
|
"version": "v2.4.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "eddb97148ad779f27e670e1e3f19fb323aedafeb"
|
"reference": "7b604c89da162034bdf4bb66310f358d313dd16d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/eddb97148ad779f27e670e1e3f19fb323aedafeb",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/7b604c89da162034bdf4bb66310f358d313dd16d",
|
||||||
"reference": "eddb97148ad779f27e670e1e3f19fb323aedafeb",
|
"reference": "7b604c89da162034bdf4bb66310f358d313dd16d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -127,8 +127,8 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0",
|
"psr/container": "^1.0",
|
||||||
"symfony/debug": "~2.7",
|
"symfony/debug": "^2.7",
|
||||||
"symfony/phpunit-bridge": "~3.3@dev"
|
"symfony/phpunit-bridge": "^3.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"templating"
|
"templating"
|
||||||
],
|
],
|
||||||
"time": "2017-09-27T18:10:31+00:00"
|
"time": "2018-04-02T09:24:19+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [],
|
"packages-dev": [],
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class Config
|
|||||||
if(!Config::initialized())
|
if(!Config::initialized())
|
||||||
Config::init();
|
Config::init();
|
||||||
$DB = Config::$config["database"];
|
$DB = Config::$config["database"];
|
||||||
return dbw_connect($DB["SGBD"],$DB["path"],$DB["db"],$DB["user"],$DB["password"]);
|
return dbw_connect($DB["SGBD"], $DB["path"], $DB["db"], $DB["user"], $DB["password"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,18 +20,23 @@ $supported = ksonParse('data/supported.kson');
|
|||||||
$loader = new Twig_Loader_Filesystem($path['html']);
|
$loader = new Twig_Loader_Filesystem($path['html']);
|
||||||
$twig = new Twig_Environment($loader);
|
$twig = new Twig_Environment($loader);
|
||||||
$user = array();
|
$user = array();
|
||||||
|
$db=null;
|
||||||
|
try {
|
||||||
|
$db = new DB();
|
||||||
|
}catch (Exception $ex){
|
||||||
|
sendHTTPError(503);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
|
||||||
function run(){
|
function run(){
|
||||||
global $user;
|
global $user;
|
||||||
if(isset($_SESSION['sessionID'])){
|
if(isset($_SESSION['sessionID'])){
|
||||||
$db = new DB();
|
global $db;
|
||||||
if($db->checkCookie($_SESSION['sessionID'],$_SESSION['token'])){
|
if($db->checkCookie($_SESSION['sessionID'],$_SESSION['token'])){
|
||||||
$user = $db->loadProfile($_SESSION['sessionID']);
|
$user = $db->loadProfile($_SESSION['sessionID']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($_POST["search"])){
|
if (isset($_POST["search"])){
|
||||||
//echo $_POST["search"];
|
|
||||||
//die();
|
|
||||||
firstPage(false,true);
|
firstPage(false,true);
|
||||||
}
|
}
|
||||||
else if ($_GET) {
|
else if ($_GET) {
|
||||||
@@ -66,6 +71,8 @@ function run(){
|
|||||||
case "user":
|
case "user":
|
||||||
user();
|
user();
|
||||||
break;
|
break;
|
||||||
|
case "error":
|
||||||
|
sendHTTPError($_GET['error']);
|
||||||
/*case "del":
|
/*case "del":
|
||||||
deleteSource();*/
|
deleteSource();*/
|
||||||
break;
|
break;
|
||||||
@@ -96,6 +103,9 @@ function sendHTTPError($code){
|
|||||||
case 404:
|
case 404:
|
||||||
$text = "Page not found";
|
$text = "Page not found";
|
||||||
break;
|
break;
|
||||||
|
case 503:
|
||||||
|
$text = "Database unavailable";
|
||||||
|
break;
|
||||||
case 500:
|
case 500:
|
||||||
$text = "Internal server error";
|
$text = "Internal server error";
|
||||||
break;
|
break;
|
||||||
@@ -117,7 +127,7 @@ function sendHTTPError($code){
|
|||||||
*/
|
*/
|
||||||
function firstPage($filter=false,$globalSearch=false){
|
function firstPage($filter=false,$globalSearch=false){
|
||||||
global $supported,$twig,$path,$user;
|
global $supported,$twig,$path,$user;
|
||||||
$db = new DB();
|
global $db;
|
||||||
if(!$filter and !$globalSearch) //Common index
|
if(!$filter and !$globalSearch) //Common index
|
||||||
if(isset($_GET["p"])) //If page (not 0)
|
if(isset($_GET["p"])) //If page (not 0)
|
||||||
$query = $db->loadLast($_GET["p"]);
|
$query = $db->loadLast($_GET["p"]);
|
||||||
@@ -185,7 +195,7 @@ function add(){
|
|||||||
|
|
||||||
function codeViewer(){
|
function codeViewer(){
|
||||||
global $supported,$twig,$path,$user;
|
global $supported,$twig,$path,$user;
|
||||||
$db = new DB();
|
global $db;
|
||||||
|
|
||||||
if(isset($_POST['lang'])){
|
if(isset($_POST['lang'])){
|
||||||
$db->addSource($_GET['id'],$_POST['lang'],htmlentities($_POST['code']),$user["IDU"]);
|
$db->addSource($_GET['id'],$_POST['lang'],htmlentities($_POST['code']),$user["IDU"]);
|
||||||
@@ -331,7 +341,7 @@ function user(){
|
|||||||
$passact = $_POST["passact"];
|
$passact = $_POST["passact"];
|
||||||
$newpass = $_POST["newpass"];
|
$newpass = $_POST["newpass"];
|
||||||
//echo "EEEEEOOO";
|
//echo "EEEEEOOO";
|
||||||
$db = new DB();
|
global $db;
|
||||||
if($db->checkPass($user['email'],$passact)){
|
if($db->checkPass($user['email'],$passact)){
|
||||||
$status=1;
|
$status=1;
|
||||||
$db->updatePass($user['IDU'],$newpass);
|
$db->updatePass($user['IDU'],$newpass);
|
||||||
|
|||||||
Reference in New Issue
Block a user