mirror of
https://github.com/getgrav/grav.git
synced 2026-02-10 16:47:49 +01:00
removed todo's
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user