diff --git a/admin/panels/maintain/admin.maintain.php b/admin/panels/maintain/admin.maintain.php index 317e81e..b86dbc4 100755 --- a/admin/panels/maintain/admin.maintain.php +++ b/admin/panels/maintain/admin.maintain.php @@ -34,7 +34,37 @@ return 0; } + } + + class s_entry_crawler extends fs_filelister { + + var $_directory = CONTENT_DIR; + + function __construct() { + $this->index =& entry_init(); + parent::__construct(); + } + + function _checkFile($directory, $file) { + $f = "$directory/$file"; + if ( is_dir($f) && ctype_digit($file)) { + return 1; + } + + if (fnmatch('entry*'.EXT, $file)) { + $id=basename($file,EXT); + $arr=entry_parse($id, true); + + echo "[POST] $id => {$arr['SUBJECT']}\n"; + $this->index->add($id, $arr); + + return 0; + } + } + } + + /*********************/ @@ -96,16 +126,20 @@ function dodo($do) { switch ($do) { - case 'purgecache': { - $this->smarty->assign('phpinfo', 'This function has been removed.'); - return PANEL_NOREDIRECT; - $obj =& entry_init(); - $obj->purge(); - if (!file_exists(CACHE_DIR)) - fs_mkdir(CACHE_DIR); + case 'rebuild': { + + fs_delete_recursive(INDEX_DIR); + if (!file_exists(INDEX_DIR)) + fs_mkdir(INDEX_DIR); + + header('Content-Type: text/plain'); + echo "ENTERING LOWRES MODE\n\n"; + + new s_entry_crawler; + exit("\nDONE \nPlease, select the back arrow in your browser"); - $this->smarty->assign('success', 1); - return PANEL_REDIRECT_CURRENT; + + return PANEL_NOREDIRECT; } case 'restorechmods': { $this->smarty->assign('files',fs_chmod_recursive()); diff --git a/admin/panels/maintain/admin.maintain.tpl b/admin/panels/maintain/admin.maintain.tpl index 69caa6f..e3c971d 100644 --- a/admin/panels/maintain/admin.maintain.tpl +++ b/admin/panels/maintain/admin.maintain.tpl @@ -16,10 +16,10 @@ {else}

{$panelstrings.descr}

-{/if} \ No newline at end of file +{/if} diff --git a/fp-includes/core/core.bplustree.class.php b/fp-includes/core/core.bplustree.class.php index f510031..3b4e154 100755 --- a/fp-includes/core/core.bplustree.class.php +++ b/fp-includes/core/core.bplustree.class.php @@ -107,6 +107,7 @@ function d($s) { + return; // disable debug output if (is_array($s)) { $s = '{ '.implode(", ", $s) . ' }'; } $x = debug_backtrace(); diff --git a/fp-includes/core/core.system.php b/fp-includes/core/core.system.php index b2ed87a..15df7b0 100755 --- a/fp-includes/core/core.system.php +++ b/fp-includes/core/core.system.php @@ -73,7 +73,7 @@ - define('SYSTEM_VER', '0.805'); + define('SYSTEM_VER', '0.812'); function system_ver() { return 'fp-' . SYSTEM_VER; } diff --git a/fp-interface/lang/en-us/lang.admin.maintain.php b/fp-interface/lang/en-us/lang.admin.maintain.php index 6ce1cb1..ab1f477 100755 --- a/fp-interface/lang/en-us/lang.admin.maintain.php +++ b/fp-interface/lang/en-us/lang.admin.maintain.php @@ -8,7 +8,7 @@ 'and maybe here you\'ll find a solution. However this might not work.', 'opt0' => '« Back to main menu', - 'opt1' => 'Purge entry cache', + 'opt1' => 'Rebuild index', 'opt2' => 'Purge theme and templates cache', 'opt3' => 'Restore file permissions', 'opt4' => 'Show info about PHP',