if ( !sqsession_is_registered('prefs_are_cached') ||
!isset( $prefs_cache) ||
- !is_array( $prefs_cache)
+ !is_array( $prefs_cache)
) {
$prefs_are_cached = false;
$prefs_cache = array();
* @return string the hashed location of datafile
*/
function getHashedFile($username, $dir, $datafile, $hash_search = true) {
- global $dir_hash_level;
/* Remove trailing slash from $dir if found */
if (substr($dir, -1) == '/') {
$dir = substr($dir, 0, strlen($dir) - 1);
}
-
+
/* Compute the hash for this user and extract the hash directories. */
$hash_dirs = computeHashDirs($username);
}
}
}
-
+
/* Return the full hashed datafile path. */
return ($result);
}
if (substr($dir, -1) == '/') {
$dir = substr($dir, 0, strlen($dir) - 1);
}
-
+
/* If necessary, populate the hash dir variable. */
if ($hash_dirs == '') {
$hash_dirs = computeHashDirs($username);