Don't use fetch_node_string() as it's evil
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 22:31:43 +0000 (22:31 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 22 Jan 2006 22:31:43 +0000 (22:31 +0000)
includes/cachev.php

index 9727cbcc9705ccae003e5b6e8f2ceb416e12a0ce..ebb716e1cf29bbe17c52bc7938b8f5f5777a7c87 100644 (file)
@@ -101,6 +101,7 @@ class cacheV
        */
        function fetch_node_string($node)
        {
+               trigger_error('You shouldn\'t be calling fetch_node_string. It\'s evil.', E_USER_WARNING);
                return preg_replace('#(^/|/$)#', '', $node);
        }
        
@@ -189,7 +190,7 @@ class cacheV
        */
        function fetch_node()
        {
-               $node = $this->fetch_node_string(($node === false ? $this->controller->path : $node));
+               $node = $this->controller->path;
                if (!isset($this->memcache['nodes']["$node"]))
                {
                        $result = $this->controller->registry->db->query_first("SELECT * FROM {$this->hash}_nodes WHERE name = '" . $this->controller->registry->escape($node) . "'");