-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c63949f
commit b7848ba
Showing
444 changed files
with
57,290 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
$offset = Request::postParam("offset"); | ||
if($offset !== null){ | ||
$timeZone = \Lobby\Time::getTimezone($offset); | ||
if(@date_default_timezone_set($timeZone)) | ||
\Lobby\DB::saveOption("lobby_timezone", $timeZone); | ||
} | ||
?> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[2016-08-07 12:17:11] Command executed for compression : '/usr/bin/php' '/home/simsu/Other/projects/Web/Lobby/local/lobby.php' 'app' --a='site-compressor' --i='src/ajax/compress-bg.php' --data='siteID=lobby' > '/dev/null' | ||
[2016-08-07 13:01:34] Command executed for compression : '/usr/bin/php' '/home/simsu/Other/projects/Web/Lobby/local/lobby.php' 'app' --a='site-compressor' --i='src/ajax/compress-bg.php' --data='siteID=lobby' > '/dev/null' | ||
[2016-08-07 13:04:14] Command executed for compression : '/usr/bin/php' '/home/simsu/Other/projects/Web/Lobby/local/lobby.php' 'app' --a='site-compressor' --i='src/ajax/compress-bg.php' --data='siteID=lobby' > '/dev/null' | ||
[2016-08-07 13:13:06] Command executed for compression : '/usr/bin/php' '/home/simsu/Other/projects/Web/Lobby/local/lobby.php' 'app' --a='site-compressor' --i='src/ajax/compress-bg.php' --data='siteID=lobby' > '/dev/null' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[2016-08-07 07:36:34] Lobby Server Replied : | ||
[2016-08-07 07:37:19] Lobby Server Replied : | ||
[2016-08-07 07:37:36] Lobby Server Replied : | ||
[2016-08-07 07:38:25] Lobby Server Replied : | ||
[2016-08-07 07:42:45] Lobby Server Replied : | ||
[2016-08-07 07:43:58] Lobby Server Replied : | ||
[2016-08-07 07:45:11] Lobby Server Replied : | ||
[2016-08-07 19:23:21] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 53 : syntax error, unexpected '}', expecting '(' | ||
[2016-08-07 19:38:00] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 69 : syntax error, unexpected '}' | ||
[2016-08-07 19:38:10] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 69 : syntax error, unexpected '}', expecting '(' | ||
[2016-08-07 19:38:20] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 69 : syntax error, unexpected '}' | ||
[2016-08-07 19:38:30] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 69 : syntax error, unexpected '}' | ||
[2016-08-07 19:40:00] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:40:10] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:40:20] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:40:30] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:40:40] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:40:50] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:00] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:10] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:20] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:30] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:40] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:41:50] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:00] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:10] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:20] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:30] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:40] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:42:50] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:43:00] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:43:05] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) | ||
[2016-08-07 19:43:06] 4 caused by /home/simsu/Other/projects/Web/Lobby/local/contents/apps/site-compressor/App.php on line 51 : syntax error, unexpected '.1' (T_DNUMBER) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<html> | ||
<head> | ||
<?php | ||
/** | ||
* Load CSS Only | ||
*/ | ||
echo Assets::getServeLinkTag(); | ||
?> | ||
<title><?php echo $title;?> - Lobby</title> | ||
</head> | ||
<body> | ||
<div id="workspace"> | ||
<div class="contents"> | ||
<h1><?php echo $title;?></h1> | ||
<p><?php echo $description;?></p> | ||
<p> | ||
<a href="#" onclick="window.history.go(-1)">Return to previous page</a> | ||
</p> | ||
<p> | ||
© <a target='_blank' href='//lobby.subinsb.com'>Lobby</a> 2014 - <?php echo date("Y");?> | ||
</p> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<html> | ||
<head> | ||
<?php | ||
if(\Lobby::status("lobby.admin")){ | ||
\Hooks::doAction("admin.head.begin"); | ||
}else{ | ||
\Hooks::doAction("head.begin"); | ||
} | ||
\Response::head(); | ||
if(\Lobby::status("lobby.admin")){ | ||
\Hooks::doAction("admin.head.end"); | ||
}else{ | ||
\Hooks::doAction("head.end"); | ||
} | ||
?> | ||
</head> | ||
<body> | ||
<?php | ||
if(\Lobby::status("lobby.admin")){ | ||
\Hooks::doAction("admin.body.begin"); | ||
}else{ | ||
\Hooks::doAction("body.begin"); | ||
} | ||
?> | ||
<div id="workspace"> | ||
<?php | ||
echo \Response::getPageContent(); | ||
?> | ||
</div> | ||
</body> | ||
</html> |
55 changes: 55 additions & 0 deletions
55
includes/src/vendor/francium/process/tests/ProcessTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
use Fr\Process; | ||
|
||
class ProcessTest extends PHPUnit_Framework_TestCase { | ||
|
||
public function testStartAProcess(){ | ||
$tmpFile = tempnam(sys_get_temp_dir(), "FranciumProcess"); | ||
$PR = new Process(Process::getPHPExecutable(), array( | ||
"arguments" => array( | ||
"-r" => "echo 'hello';echo 'world';" | ||
), | ||
"output" => $tmpFile | ||
)); | ||
$PR->start(); | ||
|
||
$this->assertNotEquals("helloworld", file_get_contents($tmpFile)); | ||
|
||
/** | ||
* Let the bg process complete | ||
*/ | ||
sleep(1); | ||
$this->assertEquals("helloworld", file_get_contents($tmpFile)); | ||
|
||
// Remove temporary file | ||
unlink($tmpFile); | ||
} | ||
|
||
public function testStopAProcess(){ | ||
$tmpFile = tempnam(sys_get_temp_dir(), "FranciumProcess"); | ||
$PR = new Process(Process::getPHPExecutable(), array( | ||
"arguments" => array( | ||
"-r" => "file_put_contents('$tmpFile', 'hello');sleep('3');file_put_contents('$tmpFile', 'world');" | ||
) | ||
)); | ||
$PR->start(); | ||
|
||
/** | ||
* Let the bg process start | ||
*/ | ||
sleep(1); | ||
$this->assertEquals("hello", file_get_contents($tmpFile)); | ||
|
||
var_dump($PR->stop()); | ||
|
||
/** | ||
* It would take 5 seconds for bg process to complete | ||
*/ | ||
sleep(3); | ||
$this->assertNotEquals("world", file_get_contents($tmpFile)); | ||
|
||
// Remove temporary file | ||
unlink($tmpFile); | ||
} | ||
|
||
} |
124 changes: 124 additions & 0 deletions
124
includes/src/vendor/klein/klein/tests/Klein/Tests/AbstractKleinTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?php | ||
/** | ||
* Klein (klein.php) - A fast & flexible router for PHP | ||
* | ||
* @author Chris O'Hara <[email protected]> | ||
* @author Trevor Suarez (Rican7) (contributor and v2 refactorer) | ||
* @copyright (c) Chris O'Hara | ||
* @link https://github.com/chriso/klein.php | ||
* @license MIT | ||
*/ | ||
|
||
namespace Klein\Tests; | ||
|
||
use Klein\Klein; | ||
use Klein\Request; | ||
use Klein\Response; | ||
use Klein\Tests\Mocks\HeadersNoOp; | ||
use PHPUnit_Framework_TestCase; | ||
|
||
/** | ||
* AbstractKleinTest | ||
* | ||
* Base test class for PHP Unit testing | ||
*/ | ||
abstract class AbstractKleinTest extends PHPUnit_Framework_TestCase | ||
{ | ||
|
||
/** | ||
* The automatically created test Klein instance | ||
* (for easy testing and less boilerplate) | ||
* | ||
* @type Klein | ||
*/ | ||
protected $klein_app; | ||
|
||
|
||
/** | ||
* Setup our test | ||
* (runs before each test) | ||
* | ||
* @return void | ||
*/ | ||
protected function setUp() | ||
{ | ||
// Create a new klein app, | ||
// since we need one pretty much everywhere | ||
$this->klein_app = new Klein(); | ||
} | ||
|
||
/** | ||
* Quick method for dispatching and returning our output from our shared Klein instance | ||
* | ||
* This is mostly useful, since the tests would otherwise have to make a bunch of calls | ||
* concerning the argument order and constants. DRY, bitch. ;) | ||
* | ||
* @param Request $request Custom Klein "Request" object | ||
* @param Response $response Custom Klein "Response" object | ||
* @return mixed The output of the dispatch call | ||
*/ | ||
protected function dispatchAndReturnOutput($request = null, $response = null) | ||
{ | ||
return $this->klein_app->dispatch( | ||
$request, | ||
$response, | ||
false, | ||
Klein::DISPATCH_CAPTURE_AND_RETURN | ||
); | ||
} | ||
|
||
/** | ||
* Runs a callable and asserts that the output from the executed callable | ||
* matches the passed in expected output | ||
* | ||
* @param mixed $expected The expected output | ||
* @param callable $callback The callable function | ||
* @param string $message (optional) A message to display if the assertion fails | ||
* @return void | ||
*/ | ||
protected function assertOutputSame($expected, $callback, $message = '') | ||
{ | ||
// Start our output buffer so we can capture our output | ||
ob_start(); | ||
|
||
call_user_func($callback); | ||
|
||
// Grab our output from our buffer | ||
$out = ob_get_contents(); | ||
|
||
// Clean our buffer and destroy it, so its like no output ever happened. ;) | ||
ob_end_clean(); | ||
|
||
// Use PHPUnit's built in assertion | ||
$this->assertSame($expected, $out, $message); | ||
} | ||
|
||
/** | ||
* Loads externally defined routes under the filename's namespace | ||
* | ||
* @param Klein $app_context The application context to attach the routes to | ||
* @return array | ||
*/ | ||
protected function loadExternalRoutes(Klein $app_context = null) | ||
{ | ||
// Did we not pass an instance? | ||
if (is_null($app_context)) { | ||
$app_context = $this->klein_app ?: new Klein(); | ||
} | ||
|
||
$route_directory = __DIR__ . '/routes/'; | ||
$route_files = scandir($route_directory); | ||
$route_namespaces = array(); | ||
|
||
foreach ($route_files as $file) { | ||
if (is_file($route_directory . $file)) { | ||
$route_namespace = '/' . basename($file, '.php'); | ||
$route_namespaces[] = $route_namespace; | ||
|
||
$app_context->with($route_namespace, $route_directory . $file); | ||
} | ||
} | ||
|
||
return $route_namespaces; | ||
} | ||
} |
95 changes: 95 additions & 0 deletions
95
includes/src/vendor/klein/klein/tests/Klein/Tests/AbstractRouteFactoryTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
/** | ||
* Klein (klein.php) - A fast & flexible router for PHP | ||
* | ||
* @author Chris O'Hara <[email protected]> | ||
* @author Trevor Suarez (Rican7) (contributor and v2 refactorer) | ||
* @copyright (c) Chris O'Hara | ||
* @link https://github.com/chriso/klein.php | ||
* @license MIT | ||
*/ | ||
|
||
namespace Klein\Tests; | ||
|
||
use Klein\AbstractRouteFactory; | ||
use Klein\Route; | ||
|
||
/** | ||
* AbstractRouteFactoryTest | ||
*/ | ||
class AbstractRouteFactoryTest extends AbstractKleinTest | ||
{ | ||
|
||
/** | ||
* Helpers | ||
*/ | ||
|
||
protected function getDefaultMethodsToMock() | ||
{ | ||
return array( | ||
'build', | ||
); | ||
} | ||
|
||
protected function getMockForFactory() | ||
{ | ||
return $this->getMockForAbstractClass('\Klein\AbstractRouteFactory'); | ||
} | ||
|
||
protected function getMockBuilderForFactory(array $methods_to_mock = null) | ||
{ | ||
$methods_to_mock = $methods_to_mock ?: $this->getDefaultMethodsToMock(); | ||
|
||
return $this->getMockBuilder('\Klein\AbstractRouteFactory') | ||
->setMethods($methods_to_mock); | ||
} | ||
|
||
|
||
/** | ||
* Tests | ||
*/ | ||
|
||
public function testNamespaceGetSet() | ||
{ | ||
// Test data | ||
$test_namespace = '/users'; | ||
|
||
// Empty constructor | ||
$factory = $this->getMockForFactory(); | ||
|
||
$this->assertNull($factory->getNamespace()); | ||
|
||
// Set in constructor | ||
$factory = $this->getMockBuilderForFactory() | ||
->setConstructorArgs( | ||
array( | ||
$test_namespace, | ||
) | ||
) | ||
->getMock(); | ||
|
||
$this->assertSame($test_namespace, $factory->getNamespace()); | ||
|
||
// Set in method | ||
$factory = $this->getMockForFactory(); | ||
$factory->setNamespace($test_namespace); | ||
|
||
$this->assertSame($test_namespace, $factory->getNamespace()); | ||
} | ||
|
||
public function testAppendNamespace() | ||
{ | ||
// Test data | ||
$test_namespace = '/users'; | ||
$test_namespace_append = '/names'; | ||
|
||
$factory = $this->getMockForFactory(); | ||
$factory->setNamespace($test_namespace); | ||
$factory->appendNamespace($test_namespace_append); | ||
|
||
$this->assertSame( | ||
$test_namespace . $test_namespace_append, | ||
$factory->getNamespace() | ||
); | ||
} | ||
} |
Oops, something went wrong.