Index: trunk/lib/Cache.inc.php
===================================================================
--- trunk/lib/Cache.inc.php	(revision 816)
+++ trunk/lib/Cache.inc.php	(revision 817)
@@ -63,5 +63,5 @@
         // How long in seconds before items in the cache are considered expired.
         // When the cache expires, Cache->get() returns null.
-        'expires' => 3600,
+        'expires' => 900,
     );
 
Index: trunk/lib/ImageThumb.inc.php
===================================================================
--- trunk/lib/ImageThumb.inc.php	(revision 816)
+++ trunk/lib/ImageThumb.inc.php	(revision 817)
@@ -252,14 +252,18 @@
     *
     * @access   public
-    * @param    string  $key    Key to return. See _default_image_specs above for a list.
-    * @param    int     $index  The index in the spec array of the value to retrieve. The first if not specified.
-    * @return   mixed           Value of requested index.
+    * @param    string  $key        Key to return. See _default_image_specs above for a list.
+    * @param    int     $index      The index in the spec array of the value to retrieve. The first if not specified.
+    * @param    string  $dest_dir   Return the spec matching this dest_dir (if used, the provided $index is ignored).
+    * @return   mixed               Value of requested $key for the spec selected by $index or $dest_dir.
     * @author   Quinn Comendant <quinn@strangecode.com>
     * @version  1.0
     * @since    08 May 2007 15:26:39
     */
-    public function getSpec($key, $index=null)
+    public function getSpec($key, $index=null, $dest_dir=null)
     {
         $index = isset($index) ? $index : 0;
+        if (isset($dest_dir)) {
+            $index = array_search($dest_dir, array_column($this->_image_specs, 'dest_dir'));
+        }
         return $this->_image_specs[$index][$key];
     }
Index: trunk/lib/PageNumbers.inc.php
===================================================================
--- trunk/lib/PageNumbers.inc.php	(revision 816)
+++ trunk/lib/PageNumbers.inc.php	(revision 817)
@@ -95,5 +95,5 @@
     private function _validNumber($num)
     {
-        if (!isset($num) || '' == $num) {
+        if (!isset($num) || '' === $num) {
             return false;
         }
Index: trunk/lib/Prefs.inc.php
===================================================================
--- trunk/lib/Prefs.inc.php	(revision 816)
+++ trunk/lib/Prefs.inc.php	(revision 817)
@@ -311,6 +311,6 @@
             return false;
         }
-        if ('' == trim($key)) {
-            $app->logMsg(sprintf('Key is empty (along with value: %s)', $val), LOG_NOTICE, __FILE__, __LINE__);
+        if ('' === trim($key)) {
+            $app->logMsg(sprintf('Key is empty (val=%s)', $val), LOG_NOTICE, __FILE__, __LINE__);
             return false;
         }
@@ -529,5 +529,5 @@
 
         // User_id must not be empty.
-        if ('' == $this->getParam('user_id')) {
+        if ('' === $this->getParam('user_id')) {
             $app->logMsg(sprintf('Cannot load prefs because user_id not set.', null), LOG_WARNING, __FILE__, __LINE__);
             return false;
@@ -603,5 +603,5 @@
 
         // User_id must not be empty.
-        if ('' == $this->getParam('user_id')) {
+        if ('' === $this->getParam('user_id')) {
             $app->logMsg(sprintf('Cannot save prefs because user_id not set.', null), LOG_DEBUG, __FILE__, __LINE__);
             return false;
Index: trunk/lib/Upload.inc.php
===================================================================
--- trunk/lib/Upload.inc.php	(revision 816)
+++ trunk/lib/Upload.inc.php	(revision 817)
@@ -182,5 +182,5 @@
             $file_path_name = '';
 
-            if ('' == trim($files['name'][$i])) {
+            if ('' === trim($files['name'][$i])) {
                 // User may not have attached a file.
                 $app->logMsg(sprintf('Skipping file %s with empty name', $i), LOG_DEBUG, __FILE__, __LINE__);
Index: trunk/lib/Utilities.inc.php
===================================================================
--- trunk/lib/Utilities.inc.php	(revision 816)
+++ trunk/lib/Utilities.inc.php	(revision 817)
@@ -253,5 +253,5 @@
     $app =& App::getInstance();
 
-    if ('' == $text) {
+    if ('' === $text) {
         return '';
     }
@@ -999,5 +999,5 @@
             // If the prefix is empty, use the $key as the name of the first dimension of the "array".
             // ...otherwise, append the key as a new dimension of the "array".
-            $new_prefix = ('' == $prefix) ? urlencode($key) : $prefix . '[' . urlencode($key) . ']';
+            $new_prefix = ('' === $prefix) ? urlencode($key) : $prefix . '[' . urlencode($key) . ']';
             // Enter recursion.
             urlEncodeArray($val, $new_prefix, false);
@@ -1390,5 +1390,5 @@
     $app =& App::getInstance();
 
-    if ('' == trim($val)) {
+    if ('' === trim($val)) {
         $app->logMsg(sprintf('Cannot add signature to an empty string.', null), LOG_INFO, __FILE__, __LINE__);
         return '';
@@ -1439,5 +1439,5 @@
     // Strip the value from the signed value.
     $val = removeSignature($signed_val);
-    if ('' == $val) {
+    if ('' === $val) {
         // Removing the signature failed because it was empty or did not contain a hyphen.
         $app->logMsg(sprintf('Invalid signature ("%s" is not a valid signed value).', $signed_val), LOG_DEBUG, __FILE__, __LINE__);
@@ -1593,5 +1593,5 @@
 function ipInRange($addr, $networks)
 {
-    if (null == $addr || '' == trim($addr)) {
+    if (null == $addr || '' === trim($addr)) {
         return false;
     }
Index: trunk/lib/Validator.inc.php
===================================================================
--- trunk/lib/Validator.inc.php	(revision 816)
+++ trunk/lib/Validator.inc.php	(revision 817)
@@ -107,5 +107,5 @@
     {
         $app =& App::getInstance();
-        if ('' == trim((string)$val) || is_string($val)) {
+        if ('' === trim((string)$val) || is_string($val)) {
             return true;
         } else {
@@ -127,5 +127,5 @@
     {
         $app =& App::getInstance();
-        if ('' == trim((string)$val) || is_numeric($val)) {
+        if ('' === trim((string)$val) || is_numeric($val)) {
             return true;
         } else {
@@ -149,5 +149,5 @@
         $app =& App::getInstance();
         $pattern = $negative_ok ? '/^-?[[:digit:]]+$/' : '/^[[:digit:]]+$/';
-        if ('' == trim((string)$val) || (is_numeric($val) && preg_match($pattern, $val))) {
+        if ('' === trim((string)$val) || (is_numeric($val) && preg_match($pattern, $val))) {
             return true;
         } else {
@@ -173,5 +173,5 @@
         $app =& App::getInstance();
         $pattern = $negative_ok ? '/^-?[[:digit:]]*(?:\.?[[:digit:]]+)$/' : '/^[[:digit:]]*(?:\.?[[:digit:]]+)$/';
-        if ('' == trim((string)$val) || (is_numeric($val) && preg_match($pattern, $val))) {
+        if ('' === trim((string)$val) || (is_numeric($val) && preg_match($pattern, $val))) {
             return true;
         } else {
@@ -198,5 +198,5 @@
     {
         $app =& App::getInstance();
-        if ('' == trim((string)$val)) {
+        if ('' === trim((string)$val)) {
             return true;
         }
@@ -229,5 +229,5 @@
     {
         $app =& App::getInstance();
-        if ((is_string($val) && '' == trim((string)$val)) || is_array($val)) {
+        if ((is_string($val) && '' === trim((string)$val)) || is_array($val)) {
             return true;
         } else {
@@ -296,5 +296,5 @@
     {
         $app =& App::getInstance();
-        if ('' == trim((string)$val) || (is_numeric($val) && $val >= $min && $val <= $max)) {
+        if ('' === trim((string)$val) || (is_numeric($val) && $val >= $min && $val <= $max)) {
             return true;
         } else {
@@ -535,5 +535,5 @@
         if (is_array($_FILES[$form_name]['name'])) {
             foreach($_FILES[$form_name]['name'] as $f) {
-                if ('' == $f) {
+                if ('' === $f) {
                     $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($_FILES)), $type, $file, $line);
                     return false;
@@ -541,5 +541,5 @@
             }
         } else {
-            if ('' == $_FILES[$form_name]['name']) {
+            if ('' === $_FILES[$form_name]['name']) {
                 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($_FILES)), $type, $file, $line);
                 return false;
