From 311339a06ba650d5491b5fda98d1eca20827d4d2 Mon Sep 17 00:00:00 2001 From: fidian Date: Wed, 19 Dec 2001 13:50:49 +0000 Subject: [PATCH] Fixed warnings git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1866 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 2 +- functions/prefs.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 0f6ab3c0..46f5f6cf 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -691,7 +691,7 @@ function get_paginator_str $sep = '|'; /* This will be used as a seperator. */ /* Get some paginator preference values. */ - $pg_sel = getPref($data_dir, $username, 'page_selector', SM_OPT_ON); + $pg_sel = getPref($data_dir, $username, 'page_selector', SMPREF_ON); $pg_max = getPref($data_dir, $username, 'page_selector_max', PG_SEL_MAX); /* Make sure that our start message number is not too big. */ diff --git a/functions/prefs.php b/functions/prefs.php index 35e78607..3d3033b8 100644 --- a/functions/prefs.php +++ b/functions/prefs.php @@ -177,6 +177,11 @@ function getSig($data_dir, $username) { 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); @@ -197,7 +202,7 @@ function getHashedFile($username, $dir, $datafile, $hash_search = true) { $check_hash_dir = $dir; for ($h = 0; $h < 4; ++$h) { $check_hash_dir .= '/' . $hash_dirs[$h]; - if (is_readable("$check_hash_dir/$datafile")) { + if (@is_readable("$check_hash_dir/$datafile")) { rename("$check_hash_dir/$datafile", $result); break; } -- 2.25.1