Remove todos from code

This commit is contained in:
Matias Griese
2016-03-03 20:52:10 +02:00
parent e0c579d513
commit ed0d562a3e
5 changed files with 1 additions and 13 deletions

View File

@@ -682,7 +682,7 @@ class Pages
/** @var UniformResourceLocator $locator */
$locator = $this->grav['locator'];
// TODO: Use streams to allow page overrides. Right now only one folder gets looked at.
$pages_dir = $locator->findResource('page://');
if ($config->get('system.cache.enabled')) {
@@ -719,7 +719,6 @@ class Pages
$taxonomy->taxonomy($taxonomy_map);
}
} else {
// TODO: This function needs to be streams safe if we want to allow page overrides.
$this->recurse($pages_dir);
$this->buildRoutes();
}
@@ -760,7 +759,6 @@ class Pages
*/
protected function recurse($directory, Page &$parent = null)
{
// TODO: Cannot do this with streams.
$directory = rtrim($directory, DS);
$page = new Page;
@@ -779,7 +777,6 @@ class Pages
}
}
// TODO: Do we want to use real folders or streams as page path?
$page->path($directory);
if ($parent) {
$page->parent($parent);
@@ -799,7 +796,6 @@ class Pages
}
$content_exists = false;
// TODO: Another solution needed for streams support.
$pages_found = glob($directory . '/*' . CONTENT_EXT);
$page_extension = '';
@@ -830,7 +826,6 @@ class Pages
// set current modified of page
$last_modified = $page->modified();
// TODO: Add iterator from streams.
$iterator = new \FilesystemIterator($directory);
/** @var \DirectoryIterator $file */
@@ -851,7 +846,6 @@ class Pages
}
} elseif ($file->isDir() && !in_array($file->getFilename(), $this->ignore_folders)) {
if (!$page->path()) {
// TODO: Do we want to use real folders or streams as page path?
$page->path($file->getPath());
}

View File

@@ -171,7 +171,6 @@ class Plugin implements EventSubscriberInterface
*/
protected function mergeConfig(Page $page, $deep = false, $params = [])
{
// FIXME: This should be done with Config class; it has configuration merging with blueprints.
$class_name = $this->name;
$class_name_merged = $class_name . '.merged';
$defaults = $this->config->get('plugins.' . $class_name, []);

View File

@@ -11,7 +11,6 @@ class LoggerServiceProvider implements ServiceProviderInterface
public function register(Container $container)
{
$log = new Logger('grav');
// TODO: Use streams.
$log_file = LOG_DIR.'grav.log';
$log->pushHandler(new StreamHandler($log_file, Logger::DEBUG));

View File

@@ -18,7 +18,6 @@ class Session extends BaseSession
*/
public function __construct(Grav $grav)
{
// FIXME: We really should have wrapper and not to extend the class!!
$this->grav = $grav;
}
@@ -48,7 +47,6 @@ class Session extends BaseSession
if ($config->get('system.session.enabled') || $is_admin) {
// Define session service.
// FIXME: NOT LIKE THIS!
parent::__construct($session_timeout, $session_path);
$domain = $uri->host();

View File

@@ -749,7 +749,6 @@ class Uri
$external = false;
$base = $grav['base_url_relative'];
$base_url = rtrim($base . $grav['pages']->base(), '/') . $language_append;
// TODO: Add streams support for pages.
$pages_dir = $grav['locator']->findResource('page://');
// if absolute and starts with a base_url move on
@@ -940,7 +939,6 @@ class Uri
if ($type == 'link' && $language->enabled()) {
$language_append = $language->getLanguageURLPrefix();
}
// TODO: Add streams support for pages.
$pages_dir = $grav['locator']->findResource('page://');
if (is_null($relative)) {
$base = $grav['base_url'];