Fixed extension module update and deletion.
[fa-stable.git] / reporting / rep705.php
index a9ca35ea20d92f124668b15a7280ddb376ac8741..faf815f44c9c1aef9cab03e72606cc4911926447 100644 (file)
@@ -9,7 +9,7 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
-$page_security = 2;
+$page_security = 'SA_GLANALYTIC';
 // ----------------------------------------------------------------
 // $ Revision: 2.0 $
 // Creator:    Joe Hunt
@@ -62,9 +62,9 @@ function getPeriods($year, $account, $dimension, $dimension2)
                        FROM ".TB_PREF."gl_trans
                                WHERE account='$account'";
        if ($dimension > 0)
-               $sql .= " AND dimension_id = $dimension";
+               $sql .= " AND dimension_id = ".db_escape($dimension);
        if ($dimension2 > 0)
-               $sql .= " AND dimension2_id = $dimension2";
+               $sql .= " AND dimension2_id = ".db_escape($dimension2);
 
        $result = db_query($sql, "Transactions for account $account could not be calculated");