From 70e347cfce77ca75ee9101fddf35c660ee99f936 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Sun, 13 Sep 2015 19:25:43 -0600 Subject: [PATCH] removed todo's --- system/src/Grav/Common/Data/Validation.php | 1 - system/src/Grav/Common/GPM/Installer.php | 2 +- system/src/Grav/Common/Page/Page.php | 6 +----- system/src/Grav/Common/Page/Pages.php | 1 - system/src/Grav/Common/Taxonomy.php | 1 - system/src/Grav/Common/Themes.php | 1 - system/src/Grav/Common/Twig/TwigExtension.php | 1 - system/src/Grav/Common/User/User.php | 1 - 8 files changed, 2 insertions(+), 12 deletions(-) diff --git a/system/src/Grav/Common/Data/Validation.php b/system/src/Grav/Common/Data/Validation.php index bc9db3a73..ac5535f92 100644 --- a/system/src/Grav/Common/Data/Validation.php +++ b/system/src/Grav/Common/Data/Validation.php @@ -385,7 +385,6 @@ class Validation */ public static function typeDatetime($value, array $params, array $field) { - // TODO: add min, max and range. if ($value instanceof \DateTime) { return true; } elseif (!is_string($value)) { diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index 6e3d6a484..884dbbd09 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -111,7 +111,7 @@ class Installer public static function nonSophisticatedInstall(\ZipArchive $zip, $install_path, $tmp) { - $container = $zip->getNameIndex(0); // TODO: better way of determining if zip has container folder + $container = $zip->getNameIndex(0); if (file_exists($install_path)) { Folder::delete($install_path); } diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 71507d1aa..65f29bc53 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -701,7 +701,6 @@ class Page public function file() { if ($this->name) { - // TODO: use CompiledMarkdownFile after fixing issues in it. return MarkdownFile::instance($this->filePath()); } return null; @@ -740,12 +739,11 @@ class Page $clone->_original = $this; $clone->parent($parent); $clone->id(time().md5($clone->filePath())); - // TODO: make sure that the path is in user context. + if ($parent->path()) { $clone->path($parent->path() . '/' . $clone->folder()); } - // TODO: make sure we always have the route. if ($parent->route()) { $clone->route($parent->route() . '/'. $clone->slug()); } else { @@ -1854,7 +1852,6 @@ class Page } $collection->setParams($params); - // TODO: MOVE THIS INTO SOMEWHERE ELSE? /** @var Uri $uri */ $uri = self::getGrav()['uri']; /** @var Config $config */ @@ -1879,7 +1876,6 @@ class Page } } } - // TODO: END OF MOVE if (isset($params['dateRange'])) { $start = isset($params['dateRange']['start']) ? $params['dateRange']['start'] : 0; diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 3c857c0d1..ff2bbe83e 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -886,7 +886,6 @@ class Pages foreach ($list as $key => $sort) { $info = $pages[$key]; - // TODO: order by manual needs a hash from the passed variables if we make this more general. $this->sort[$path][$order_by][$key] = $info; } } diff --git a/system/src/Grav/Common/Taxonomy.php b/system/src/Grav/Common/Taxonomy.php index 791a43b7b..e280e81f7 100644 --- a/system/src/Grav/Common/Taxonomy.php +++ b/system/src/Grav/Common/Taxonomy.php @@ -62,7 +62,6 @@ class Taxonomy foreach ((array) $config->get('site.taxonomies') as $taxonomy) { if (isset($page_taxonomy[$taxonomy])) { foreach ((array) $page_taxonomy[$taxonomy] as $item) { - // TODO: move to pages class? $this->taxonomy_map[$taxonomy][(string) $item][$page->path()] = array('slug' => $page->slug()); } } diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index 8b0866a1e..3691e22ae 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -188,7 +188,6 @@ class Themes extends Iterator /** @var UniformResourceLocator $locator */ $locator = $this->grav['locator']; - // TODO: move $registered = stream_get_wrappers(); $schemes = $config->get( "themes.{$name}.streams.schemes", diff --git a/system/src/Grav/Common/Twig/TwigExtension.php b/system/src/Grav/Common/Twig/TwigExtension.php index 6daca9624..c52096d9b 100644 --- a/system/src/Grav/Common/Twig/TwigExtension.php +++ b/system/src/Grav/Common/Twig/TwigExtension.php @@ -173,7 +173,6 @@ class TwigExtension extends \Twig_Extension */ public function inflectorFilter($action, $data, $count = null) { - // TODO: check this and fix the docblock if needed. $action = $action.'ize'; $inflector = $this->grav['inflector']; diff --git a/system/src/Grav/Common/User/User.php b/system/src/Grav/Common/User/User.php index 3942e6c70..2896ffb28 100644 --- a/system/src/Grav/Common/User/User.php +++ b/system/src/Grav/Common/User/User.php @@ -31,7 +31,6 @@ class User extends Data { $locator = self::getGrav()['locator']; - // TODO: validate directory name $blueprints = new Blueprints('blueprints://'); $blueprint = $blueprints->get('user/account'); $file_path = $locator->findResource('account://' . $username . YAML_EXT);