dwpage: rename gmeta into getmeta

This commit is contained in:
Andreas Gohr 2021-02-16 21:10:16 +01:00
parent 2c23659d6e
commit 3fe0184449
1 changed files with 4 additions and 4 deletions

View File

@ -121,14 +121,14 @@ class PageCLI extends CLI {
/* gmeta command */ /* gmeta command */
$options->registerCommand( $options->registerCommand(
'gmeta', 'getmeta',
'Prints metadata value for a page to stdout.' 'Prints metadata value for a page to stdout.'
); );
$options->registerArgument( $options->registerArgument(
'wikipage', 'wikipage',
'The wiki page to get the metadata for', 'The wiki page to get the metadata for',
true, true,
'gmeta' 'getmeta'
); );
$options->registerArgument( $options->registerArgument(
'key', 'key',
@ -137,7 +137,7 @@ class PageCLI extends CLI {
'For retrieving items that are stored in sub-arrays, separate the ' . 'For retrieving items that are stored in sub-arrays, separate the ' .
'keys of the different levels by spaces, in quotes, eg "date modified".', 'keys of the different levels by spaces, in quotes, eg "date modified".',
false, false,
'gmeta' 'getmeta'
); );
} }
@ -182,7 +182,7 @@ class PageCLI extends CLI {
$this->clearLock($wiki_id); $this->clearLock($wiki_id);
$this->success("$wiki_id unlocked"); $this->success("$wiki_id unlocked");
break; break;
case 'gmeta': case 'getmeta':
$wiki_id = array_shift($args); $wiki_id = array_shift($args);
$key = trim(array_shift($args)); $key = trim(array_shift($args));
$meta=print_r(p_get_metadata($wiki_id, $key), true); $meta=print_r(p_get_metadata($wiki_id, $key), true);