Skip to content

Commit

Permalink
finally removed the static s3php files and replaced with composer
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Sep 3, 2023
1 parent 19d7cb0 commit 4c1124d
Show file tree
Hide file tree
Showing 1,398 changed files with 930 additions and 75,594 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
tmp/*
inc/config.inc.php
data/*
lib/vendor
bin
.git
.github
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
test.php
notice.txt
notice.txt
lib/vendor
3 changes: 3 additions & 0 deletions api/base64.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

//loading core and controllers
include_once(ROOT . DS . 'inc' . DS. 'core.php');
//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';
loadAllContentControllers();

// check if client has permission to upload
Expand Down
3 changes: 3 additions & 0 deletions api/geturl.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

//loading core and controllers
include_once(ROOT . DS . 'inc' . DS. 'core.php');
//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';
loadAllContentControllers();

// check if client has permission to upload
Expand Down
3 changes: 3 additions & 0 deletions api/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

//loading core and controllers
include_once(ROOT . DS . 'inc' . DS. 'core.php');
//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';

if($_REQUEST['ip']=='pls') exit(getUserIP());

Expand Down
3 changes: 3 additions & 0 deletions api/pastebin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

//loading core and controllers
include_once(ROOT . DS . 'inc' . DS. 'core.php');
//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';
$controllers = loadAllContentControllers();
if(!in_array('TextController',$controllers))
exit(json_encode(array('status'=>'err','reason'=>'Text controller not enabled')));
Expand Down
3 changes: 3 additions & 0 deletions api/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

//loading core and controllers
include_once(ROOT . DS . 'inc' . DS. 'core.php');
//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';
$allowedcontentcontrollers = loadAllContentControllers();

// check write permissions first
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ ADD . /var/www/.
ADD docker/rootfs/start.sh /etc/start.sh
RUN chmod +x /etc/start.sh

# Composer intall
WORKDIR /var/www/lib
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader

# nginx stuff
WORKDIR /var/www
ADD docker/rootfs/nginx.conf /etc/nginx/http.d/default.conf
RUN mkdir -p /run/nginx
RUN mkdir -p /var/log/nginx
Expand Down
4 changes: 4 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
include_once(ROOT.DS.'inc'.DS.'core.php');
loadAllContentControllers();

//load external things if existing
if(file_exists(ROOT.'/lib/vendor/autoload.php'))
require ROOT.'/lib/vendor/autoload.php';


//send the URL to the architect. It'll know what to do
$url = $_GET['url']?$_GET['url']:ltrim($_SERVER['REQUEST_URI'],'/');
Expand Down
5 changes: 5 additions & 0 deletions lib/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require": {
"aws/aws-sdk-php": "^3.33"
}
}
Loading

0 comments on commit 4c1124d

Please sign in to comment.