X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_lang.php;h=9c8ea4b555cbe1c565ae026864b1f2a3d0081968;hb=6db1cc793fa3d760f1ebff244af2ef8e8cb5d845;hp=ccdd3d8e31245d3e56c739c87ff01ff41ce75446;hpb=6cd42b4b7e4e5a199949a33fcf7fbd1f5d0ad3cb;p=fa-stable.git diff --git a/admin/inst_lang.php b/admin/inst_lang.php index ccdd3d8e..9c8ea4b5 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -9,7 +9,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License here . ***********************************************************************/ -$page_security = 20; +$page_security = 'SA_CREATELANGUAGE'; $path_to_root=".."; include_once($path_to_root . "/includes/session.inc"); @@ -44,49 +44,6 @@ function check_data() return true; } -/** - * @return Returns the array sorted as required - * @param $aryData Array containing data to sort - * @param $strIndex name of column to use as an index - * @param $strSortBy Column to sort the array by - * @param $strSortType String containing either asc or desc [default to asc] - * @desc Naturally sorts an array using by the column $strSortBy - */ -function array_natsort($aryData, $strIndex, $strSortBy, $strSortType=false) -{ - // if the parameters are invalid - if (!is_array($aryData) || !$strIndex || !$strSortBy) - // return the array - return $aryData; - - // create our temporary arrays - $arySort = $aryResult = array(); - - // loop through the array - foreach ($aryData as $aryRow) - // set up the value in the array - $arySort[$aryRow[$strIndex]] = $aryRow[$strSortBy]; - - // apply the natural sort - natsort($arySort); - - // if the sort type is descending - if ($strSortType=="desc") - // reverse the array - arsort($arySort); - - // loop through the sorted and original data - foreach ($arySort as $arySortKey => $arySorted) - foreach ($aryData as $aryOriginal) - // if the key matches - if ($aryOriginal[$strIndex]==$arySortKey) - // add it to the output array - array_push($aryResult, $aryOriginal); - - // return the return - return $aryResult; -} - function write_lang() { global $path_to_root, $installed_languages, $dflt_lang; @@ -297,7 +254,7 @@ function display_language_edit($selected_id) else $n = count($installed_languages); - start_form(true, true); + start_form(true); echo "