diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-05-16 09:11:15 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-05-16 09:11:15 +0200 |
commit | 1c36b3d86f90185519cadaad85251922dc771fe1 (patch) | |
tree | 30701dd933a5c86f99bd3eb0ca9292a8fa65a3c8 /bin/indexer.php | |
parent | e82b082ef3300c5b2d8f03f74873ef31f0b57933 (diff) | |
download | rpg-1c36b3d86f90185519cadaad85251922dc771fe1.tar.gz rpg-1c36b3d86f90185519cadaad85251922dc771fe1.tar.bz2 |
code reformat
Diffstat (limited to 'bin/indexer.php')
-rwxr-xr-x | bin/indexer.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/bin/indexer.php b/bin/indexer.php index 76269f95a..13895c36a 100755 --- a/bin/indexer.php +++ b/bin/indexer.php @@ -1,9 +1,12 @@ #!/usr/bin/php <?php -if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__) . '/../') . '/'); +if(!defined('DOKU_INC')) define('DOKU_INC', realpath(dirname(__FILE__).'/../').'/'); define('NOSESSION', 1); -require_once(DOKU_INC . 'inc/init.php'); +require_once(DOKU_INC.'inc/init.php'); +/** + * Update the Search Index from command line + */ class IndexerCLI extends DokuCLI { private $quiet = false; @@ -17,19 +20,19 @@ class IndexerCLI extends DokuCLI { */ protected function setup(DokuCLI_Options $options) { $options->setHelp( - 'Updates the searchindex by indexing all new or changed pages. When the -c option is ' . - 'given the index is cleared first.' + 'Updates the searchindex by indexing all new or changed pages. When the -c option is '. + 'given the index is cleared first.' ); $options->registerOption( - 'clear', - 'clear the index before updating', - 'c' + 'clear', + 'clear the index before updating', + 'c' ); $options->registerOption( - 'quiet', - 'don\'t produce any output', - 'q' + 'quiet', + 'don\'t produce any output', + 'q' ); } @@ -58,7 +61,7 @@ class IndexerCLI extends DokuCLI { $data = array(); $this->quietecho("Searching pages... "); search($data, $conf['datadir'], 'search_allpages', array('skipacl' => true)); - $this->quietecho(count($data) . " pages found.\n"); + $this->quietecho(count($data)." pages found.\n"); foreach($data as $val) { $this->index($val['id']); |