private function normalizeFolders($path = null)
    {
        $page = Page::html();
        $dir = $this->folder.'content/';
        // normalize
        if ($path && preg_match('/[^'.$page->url['chars'].'\/]/', $path)) {
            $seo = $this->url($path, 'slashes');
            if (is_dir($dir.$path)) {
                rename($dir.$path, $dir.$seo);
            }
            $path = $seo;
        }
        // folders
        foreach (glob($page->dir($dir, $path).'*', GLOB_ONLYDIR) as $folder) {
            $this->normalizeFolders(substr($folder, strlen($dir)));
        }
    }
private function normalizeFolders($path = null)
    {
        $page = Page::html();
        $dir = $this->folder.'content/';
        // normalize
        if ($path && preg_match('/[^'.$page->url['chars'].'\/]/', $path)) {
            $seo = $this->url($path, 'slashes');
            if (is_dir($dir.$path)) {
                rename($dir.$path, $dir.$seo);
            }
            $path = $seo;
        }
        // folders
        foreach (glob($page->dir($dir, $path).'*', GLOB_ONLYDIR) as $folder) {
            $this->normalizeFolders(substr($folder, strlen($dir)));
        }
    }
private function normalizeFolders ( $ path = null ) { $ page = Page :: html ( ) ; $ dir = $ this -> folder . 'content/' ; // normalize if ( $ path && preg_match ( '/[^' . $ page -> url [ 'chars' ] . '\/]/' , $ path ) ) { $ seo = $ this -> url ( $ path , 'slashes' ) ; if ( is_dir ( $ dir . $ path ) ) { rename ( $ dir . $ path , $ dir . $ seo ) ; } $ path = $ seo ; } // folders foreach ( glob ( $ page -> dir ( $ dir , $ path ) . '*' , GLOB_ONLYDIR ) as $ folder ) { $ this -> normalizeFolders ( substr ( $ folder , strlen ( $ dir ) ) ) ; } }
Recursively goes through the blog's 'content' folder, and fixes any malnamed directories.

@param string $path There is nothing to see here.  This value gets passed within the method itself.
Recursively goes through the blog s content folder and fixes any malnamed directories .