Skip to content

Commit

Permalink
Update paths.php
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffhumphrey committed Jan 24, 2022
1 parent 545ead2 commit 86adccd
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions paths.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<?php

/**
* Module: paths.php
* Description: This module sets global file folder paths. Also houses
* specific, site-wide variables.
*
*/

/**
*
* The following are file path definitions for various
* script and document storage folders used/accessed by the
* application.
Expand Down Expand Up @@ -119,7 +117,7 @@
* Default is FALSE.
*/

define('ENABLE_MARKDOWN', FALSE);
define('ENABLE_MARKDOWN', TRUE);

/**
* Set the following to TRUE if you would like to use
Expand All @@ -131,7 +129,7 @@
* Default is FALSE.
*/

define('ENABLE_MAILER', FALSE);
define('ENABLE_MAILER', TRUE);

/**
* Error Reporting
Expand All @@ -156,6 +154,29 @@ function is_https() {
else return FALSE;
}

/**
* General sanitization function.
* Needs to be top-level due to use in
* url_variables.inc.php file.
*/

function sterilize($sterilize = NULL) {
if ($sterilize == NULL) {
return NULL;
}
$sterilize = trim($sterilize);
if (is_numeric($sterilize)) {
if (is_float($sterilize)) $sterilize = filter_var($sterilize,FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION);
if (is_int($sterilize)) $sterilize = filter_var($sterilize,FILTER_SANITIZE_NUMBER_INT);
}
else $sterilize = filter_var($sterilize,FILTER_SANITIZE_STRING);
$sterilize = strip_tags($sterilize);
$sterilize = stripcslashes($sterilize);
$sterilize = stripslashes($sterilize);
$sterilize = addslashes($sterilize);
return $sterilize;
}

if (HOSTED) {
$installation_id = md5(__FILE__);
$session_expire_after = 30;
Expand Down

0 comments on commit 86adccd

Please sign in to comment.