-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Showing
200 changed files
with
18,659 additions
and
1,244 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 |
---|---|---|
|
@@ -7,6 +7,8 @@ composer.lock | |
# Grav Specific | ||
cache/* | ||
!cache/.* | ||
assets/* | ||
!assets/.* | ||
logs/* | ||
!logs/.* | ||
images/* | ||
|
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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.8.0 | ||
0.9.0 |
Empty file.
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
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 |
---|---|---|
@@ -1,25 +1,32 @@ | ||
{ | ||
"name": "rhuk/grav", | ||
"name": "getgrav/grav", | ||
"type": "library", | ||
"description": "Grav is a powerful flat CMS influenced by Pico, Stacey, Kirby and others...", | ||
"keywords": ["cms"], | ||
"description": "Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS", | ||
"keywords": ["cms","flat-file cms","flat cms","flatfile cms","php"], | ||
"homepage": "http://getgrav.org", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Andy Miller", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.10", | ||
"twig/twig": "1.16.*@dev", | ||
"erusev/parsedown": "dev-master", | ||
"symfony/yaml": "2.5.*@dev", | ||
"symfony/console": "2.5.*@dev", | ||
"doctrine/cache": "1.4.*@dev", | ||
"tracy/tracy": "dev-master", | ||
"gregwar/image": "dev-master", | ||
"ircmaxell/password-compat": "1.0.*" | ||
"php": ">=5.4.0", | ||
"twig/twig": "~1.16", | ||
"erusev/parsedown-extra": "dev-master", | ||
"symfony/yaml": "~2.5", | ||
"symfony/console": "~2.5", | ||
"symfony/event-dispatcher": "~2.5", | ||
"doctrine/cache": "~1.3", | ||
"tracy/tracy": "~2.2", | ||
"gregwar/image": "~2.0", | ||
"ircmaxell/password-compat": "1.0.*", | ||
"mrclay/minify": "~2.2", | ||
"donatj/phpuseragentparser": "dev-master", | ||
"pimple/pimple": "~3.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Grav\\": "system/src/" | ||
}, | ||
"files": ["system/defines.php"] | ||
}, | ||
"archive": { | ||
"exclude": ["VERSION"] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,46 +1,37 @@ | ||
<?php | ||
namespace Grav\Common; | ||
namespace Grav; | ||
|
||
if (version_compare($ver = PHP_VERSION, $req = '5.4.0', '<')) { | ||
throw new \RuntimeException(sprintf('You are running PHP %s, but Grav needs at least <strong>PHP %s</strong> to run.', $ver, $req)); | ||
exit(sprintf('You are running PHP %s, but Grav needs at least <strong>PHP %s</strong> to run.', $ver, $req)); | ||
} | ||
$autoload = __DIR__ . '/vendor/autoload.php'; | ||
if (!is_file($autoload)) { | ||
exit('Please run: <i>composer install -o</i>'); | ||
} | ||
|
||
use Tracy\Debugger; | ||
use Grav\Common\Grav; | ||
use Grav\Common\Debugger; | ||
|
||
// Register system libraries to the auto-loader. | ||
$loader = require_once __DIR__ . '/system/autoload.php'; | ||
// Register the auto-loader. | ||
$loader = require_once $autoload; | ||
|
||
if (!ini_get('date.timezone')) { | ||
date_default_timezone_set('UTC'); | ||
} | ||
|
||
// Use output buffering to prevent headers from being sent too early. | ||
ob_start(); | ||
|
||
// Start the timer and enable debugger in production mode as we do not have system configuration yet. | ||
// Debugger catches all errors and logs them, for example if the script doesn't have write permissions. | ||
Debugger::timer(); | ||
Debugger::enable(Debugger::DEVELOPMENT, is_dir(LOG_DIR) ? LOG_DIR : null); | ||
|
||
$grav = new Grav; | ||
$grav = Grav::instance( | ||
[ | ||
'loader' => $loader, | ||
'debugger' => new Debugger(Debugger::PRODUCTION) | ||
] | ||
); | ||
|
||
try { | ||
// Register all the Grav bits into registry. | ||
$registry = Registry::instance(); | ||
$registry->store('autoloader', $loader); | ||
$registry->store('Grav', $grav); | ||
$registry->store('Uri', new Uri); | ||
$registry->store('Config', Config::instance(CACHE_DIR . 'config.php')); | ||
$registry->store('Cache', new Cache); | ||
$registry->store('Twig', new Twig); | ||
$registry->store('Pages', new Page\Pages); | ||
$registry->store('Taxonomy', new Taxonomy); | ||
|
||
$grav['debugger']->init(); | ||
$grav->process(); | ||
|
||
} catch (\Exception $e) { | ||
$grav->fireEvent('onFatalException', $e); | ||
$grav->fireEvent('onFatalException'); | ||
throw $e; | ||
} | ||
|
||
ob_end_flush(); |
This file was deleted.
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
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,36 @@ | ||
schemes: | ||
plugin: | ||
type: ReadOnlyStream | ||
paths: | ||
- user/plugins | ||
- system/plugins | ||
|
||
# asset: | ||
# type: ReadOnlyStream | ||
# paths: | ||
# - assets | ||
|
||
# cache: | ||
# type: ReadOnlyStream | ||
# paths: | ||
# - cache | ||
|
||
# log: | ||
# type: ReadOnlyStream | ||
# paths: | ||
# - logs | ||
|
||
page: | ||
type: ReadOnlyStream | ||
paths: | ||
- user/pages | ||
|
||
account: | ||
type: ReadOnlyStream | ||
paths: | ||
- user/accounts | ||
|
||
data: | ||
type: ReadOnlyStream | ||
paths: | ||
- user/data |
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
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
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,36 @@ | ||
<?php | ||
namespace Grav\Common; | ||
|
||
/** | ||
* Simple wrapper for the very simple parse_user_agent() function | ||
*/ | ||
class Browser { | ||
|
||
protected $useragent; | ||
|
||
public function __construct() | ||
{ | ||
$this->useragent = parse_user_agent(); | ||
} | ||
|
||
public function getBrowser() | ||
{ | ||
return strtolower($this->useragent['browser']); | ||
} | ||
|
||
public function getPlatform() | ||
{ | ||
return strtolower($this->useragent['platform']); | ||
} | ||
|
||
public function getLongVersion() | ||
{ | ||
return $this->useragent['version']; | ||
} | ||
|
||
public function getVersion() | ||
{ | ||
$version = explode('.', $this->getLongVersion()); | ||
return intval($version[0]); | ||
} | ||
} |
Oops, something went wrong.