diff options
author | jim-p <jimp@pfsense.org> | 2015-11-25 11:11:08 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-11-25 11:12:16 -0500 |
commit | 6b07dac929a18a72ddb43c4e6e20aab9d7564f21 (patch) | |
tree | b77c93696b5677ce8e6b9165235309e37c381dd0 /tools/scripts | |
parent | 2251aa188beaa38b64bc41dd736cb7e14a00f8a0 (diff) | |
download | pfsense-6b07dac929a18a72ddb43c4e6e20aab9d7564f21.zip pfsense-6b07dac929a18a72ddb43c4e6e20aab9d7564f21.tar.gz |
Update privilege generation script.
Diffstat (limited to 'tools/scripts')
-rwxr-xr-x | tools/scripts/generate-privdefs.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/scripts/generate-privdefs.php b/tools/scripts/generate-privdefs.php index 917a94d..8b50f5c 100755 --- a/tools/scripts/generate-privdefs.php +++ b/tools/scripts/generate-privdefs.php @@ -65,7 +65,7 @@ if (count($argv) < 2) { echo "\n"; echo "Examples:\n"; echo "#generate-privdefs /\n"; - echo "#generate-privdefs /home/pfsense/RELENG_1/pfSense/\n"; + echo "#generate-privdefs /home/pfsense/src/\n"; echo "\n"; exit -1; } @@ -93,6 +93,7 @@ list_phpfiles($path, $found); echo "--Gathering privilege metadata--\n"; $data; +sort($found); foreach ($found as $fname) read_file_metadata($path."/".$fname, $data, "PRIV"); @@ -115,8 +116,8 @@ $pdata .= "\n"; $pdata .= "\$priv_list = array();\n"; $pdata .= "\n"; $pdata .= "\$priv_list['page-all'] = array();\n"; -$pdata .= "\$priv_list['page-all']['name'] = \"WebCfg - All pages\";\n"; -$pdata .= "\$priv_list['page-all']['descr'] = \"Allow access to all pages\";\n"; +$pdata .= "\$priv_list['page-all']['name'] = gettext(\"WebCfg - All pages\");\n"; +$pdata .= "\$priv_list['page-all']['descr'] = gettext(\"Allow access to all pages\");\n"; $pdata .= "\$priv_list['page-all']['match'] = array();\n"; $pdata .= "\$priv_list['page-all']['match'][] = \"*\";\n"; $pdata .= "\n"; @@ -159,8 +160,8 @@ foreach ($data as $fname => $tags) { } $pdata .= "\$priv_list['{$ident}'] = array();\n"; - $pdata .= "\$priv_list['{$ident}']['name'] = \"WebCfg - {$name}\";\n"; - $pdata .= "\$priv_list['{$ident}']['descr'] = \"{$descr}\";\n"; + $pdata .= "\$priv_list['{$ident}']['name'] = gettext(\"WebCfg - {$name}\");\n"; + $pdata .= "\$priv_list['{$ident}']['descr'] = gettext(\"{$descr}\");\n"; $pdata .= "\$priv_list['{$ident}']['match'] = array();\n"; foreach ($match as $url) |