Fixed error log warning (missing installed_extensions.inc) during upgrade to 2.2.
[fa-stable.git] / sales / manage / credit_status.php
index bab7f269e36552980c4b23dbeda0ced9f4513764..8bc3683ca6c8215570f67f7ddf32d5ba490b3676 100644 (file)
@@ -9,8 +9,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_CRSTATUS';
+$path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
 page(_("Credit Status")); 
@@ -59,7 +59,7 @@ if ($Mode=='UPDATE_ITEM' && can_process())
 function can_delete($selected_id)
 {
        $sql= "SELECT COUNT(*) FROM ".TB_PREF."debtors_master 
-               WHERE credit_status=$selected_id";
+               WHERE credit_status=".db_escape($selected_id);
        $result = db_query($sql, "could not query customers");
        $myrow = db_fetch_row($result);
        if ($myrow[0] > 0)