Removed duplicated natsort function in inst_lang.php
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 28 Sep 2009 20:37:28 +0000 (20:37 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Mon, 28 Sep 2009 20:37:28 +0000 (20:37 +0000)
CHANGELOG.txt
admin/inst_lang.php

index a3107eb0ea7467c6bd4b6643e93e312cac90feb0..b64a88f64155caabf9ca329b6112048bae0d8e37 100644 (file)
@@ -25,6 +25,7 @@ $ /frontaccounting.php
   /installed_extensions.php
   /admin/create_coy.php
   /admin/inst_module.php
+  /admin/inst_lang.php
   /admin/db/maintenance_db.inc
   /applications/customers.php
   /applications/dimensions.php
index 1020d770fcc47c15b22d9019943dcabef04ccaa7..9c8ea4b555cbe1c565ae026864b1f2a3d0081968 100644 (file)
@@ -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;