Skip to content

Commit

Permalink
Saving files before refreshing line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizarrus committed Sep 24, 2024
1 parent 5d4c171 commit 85c3a5a
Show file tree
Hide file tree
Showing 94 changed files with 2,551 additions and 1,723 deletions.
1 change: 1 addition & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Template Files
RewriteRule ^theme/([^/]+)/(.*)$ index.php?theme=$1&file=$2 [QSA,L]
RewriteRule ^(css|js|fonts|images|assets)/(.*)$ default/$1/$2 [QSA,L]

# Handle Front Controller
Expand Down
5 changes: 3 additions & 2 deletions classes/Accounting/Auth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Accounting;

class Auth {
public static function isLoggedIn() : bool {
return AuthFactory::getInstance()->isLoggedIn();
Expand Down Expand Up @@ -60,5 +62,4 @@ public static function getPermissions() : array {
return AuthFactory::getInstance()->getPermissions();
}
}

?>
?>
4 changes: 2 additions & 2 deletions classes/Accounting/AuthFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Accounting;

use fruithost\Localization\I18N;
Expand Down Expand Up @@ -236,5 +237,4 @@ public function getPermissions() : array {
return $this->permissions;
}
}

?>
?>
2 changes: 1 addition & 1 deletion classes/Accounting/Session.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

namespace fruithost\Accounting;

class Session {
public static function init() : void {
if(!isset($_SESSION)) {
Expand Down
4 changes: 2 additions & 2 deletions classes/Accounting/User.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Accounting;

use fruithost\Security\Encryption;
Expand Down Expand Up @@ -209,5 +210,4 @@ public function getPermissions() : array {
return $this->permissions;
}
}

?>
?>
8 changes: 8 additions & 0 deletions classes/Hardware/NetworkAddress.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Hardware;

class NetworkAddress {
Expand Down
14 changes: 11 additions & 3 deletions classes/Hardware/NetworkFamily.enum.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?php
namespace fruithost\Hardware;
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

enum NetworkFamily : string {
case IPV4 = "inet";
namespace fruithost\Hardware;

enum NetworkFamily : string {
case IPV4 = "inet";
case IPV6 = "inet6";
case UNKNOWN = "";

Expand Down
8 changes: 8 additions & 0 deletions classes/Hardware/NetworkFlag.enum.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Hardware;

enum NetworkFlag : string {
Expand Down
8 changes: 8 additions & 0 deletions classes/Hardware/NetworkState.enum.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Hardware;

enum NetworkState : string {
Expand Down
12 changes: 11 additions & 1 deletion classes/Installer/Installer.class.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Installer;

class Installer {
/* Repositorys */
public static function getRepositorys(?string $url = null) : array {
Expand Down Expand Up @@ -29,4 +38,5 @@ public static function getFile($repository, $file) : string | int | null {
public static function getRepositorysByID(array $ids) : array {
return Repository::getInstance()->getRepositorysByID($ids);
}
}
}
?>
5 changes: 4 additions & 1 deletion classes/Installer/InstallerFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Installer;

class InstallerFactory {
private static ?InstallerFactory $instance = null;

Expand All @@ -21,4 +23,5 @@ public static function getInstance() : InstallerFactory {
}

public function getList() {}
}
}
?>
4 changes: 3 additions & 1 deletion classes/Installer/Repository.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Installer;

use fruithost\Storage\Database;
Expand Down Expand Up @@ -171,4 +172,5 @@ public function getFile($repository, $file) : string | int | null {

return $content;
}
}
}
?>
1 change: 1 addition & 0 deletions classes/Localization/I18N.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

namespace fruithost\Localization;

use fruithost\Accounting\Auth;
use fruithost\Network\Request;
use fruithost\Storage\Database;
Expand Down
2 changes: 1 addition & 1 deletion classes/Modules/Module.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Module {
private ?ModuleInfo $info = null;
private ?ModuleInterface $instance = null;
private bool $enabled = false;
private bool$locked = false;
private bool $locked = false;

public function __construct(string $path) {
$this->path = $path;
Expand Down
8 changes: 8 additions & 0 deletions classes/Modules/ModuleError.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* fruithost | OpenSource Hosting
*
* @author Adrian Preuß
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Modules;

class ModuleError {
Expand Down
2 changes: 1 addition & 1 deletion classes/Network/ResponseFactory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private function __construct() {
}

public function setContentType(string $type) : void {
$headers['Content-Type'] = $type;
$this->headers['Content-Type'] = $type;
}

public function addHeader(string $name, string $value) : void {
Expand Down
12 changes: 11 additions & 1 deletion classes/Services/PHP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @version 1.0.0
* @license MIT
*/

namespace fruithost\Services;

use fruithost\Accounting\Auth;
Expand Down Expand Up @@ -43,11 +44,16 @@ public function __construct() {
} catch(\Exception $e) {
$this->debug[] = $e->getMessage();
}

if(!empty($ini)) {
if(isset($ini['www'])) {
if(isset($ini['www']['listen'])) {
$this->socket = $ini['www']['listen'];
}
} else if(isset($ini['panel'])) {
if(isset($ini['panel']['listen'])) {
$this->socket = str_replace('$pool', 'panel', $ini['panel']['listen']);
}
}
}

Expand All @@ -65,6 +71,10 @@ public function setPath(string $path) : void {
}

public function getHeader() : ?string {
if(empty($this->content)) {
return null;
}

return explode("\r\n\r\n", $this->content)[0];
}

Expand Down Expand Up @@ -274,4 +284,4 @@ public function highlight(array | string $data) : array | string {
I18N::__('yes')
I18N::__('no value')
*/
?>
?>
Loading

0 comments on commit 85c3a5a

Please sign in to comment.