Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
strongarm
Commits
edba666f
Commit
edba666f
authored
Sep 24, 2009
by
Jeff Miccolis
Browse files
#586676
by alex_b, Show strongarmed status when printing variables.
parent
fc10987f
Changes
1
Hide whitespace changes
Inline
Side-by-side
strongarm.drush.inc
View file @
edba666f
...
...
@@ -31,10 +31,23 @@ function strongarm_drush_command() {
function
strongarm_drush_export
()
{
$vars
=
func_get_args
();
if
(
empty
(
$vars
))
{
// Pull all variables from DB.
$result
=
db_query
(
'SELECT name FROM variable'
);
$rows
=
array
(
array
(
'Variables'
));
while
(
$row
=
db_fetch_array
(
$result
))
{
$rows
[]
=
array_values
(
$row
);
$variables
=
array
();
while
(
$variable
=
db_fetch_object
(
$result
))
{
$variables
[
$variable
->
name
]
=
$variable
->
name
;
}
// Pull all variables defined in hook_strongarm(), merge them in.
$strongarmed
=
drupal_map_assoc
(
array_keys
(
strongarm_get_conf
(
TRUE
,
TRUE
)));
$variables
=
$variables
+
$strongarmed
;
ksort
(
$variables
);
// Output result, flag strongarmed variables.
$rows
=
array
(
array
(
'Strongarmed'
,
'Variable name'
));
foreach
(
$variables
as
$variable
)
{
$flag
=
$strongarmed
[
$variable
]
?
'*'
:
''
;
$rows
[]
=
array
(
$flag
,
$variable
);
}
drush_print_table
(
$rows
,
TRUE
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment