From fbbf2f8f6195d80186bca11ce72e44faf8672173 Mon Sep 17 00:00:00 2001
From: CaMer0n <cameron@e107coders.org>
Date: Sat, 7 Nov 2009 02:17:02 +0000
Subject: [PATCH] e_FILE.'public/' replaced with e_UPLOAD

---
 e107_admin/admin.php                         | 11 +++++------
 e107_handlers/phpmailer/mailout_process.php  |  8 ++++----
 e107_handlers/user_handler.php               |  8 ++++----
 e107_handlers/validator_class.php            |  8 ++++----
 e107_plugins/forum/forum_post_shortcodes.php |  2 +-
 usersettings.php                             |  6 +++---
 6 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/e107_admin/admin.php b/e107_admin/admin.php
index 4315891de..d999f6f67 100644
--- a/e107_admin/admin.php
+++ b/e107_admin/admin.php
@@ -11,9 +11,9 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvs_backup/e107_0.8/e107_admin/admin.php,v $
-|     $Revision: 1.21 $
-|     $Date: 2009-10-29 12:39:21 $
-|     $Author: marj_nl_fr $
+|     $Revision: 1.22 $
+|     $Date: 2009-11-07 02:16:52 $
+|     $Author: e107coders $
 +----------------------------------------------------------------------------+
 */
 require_once('../class2.php');
@@ -80,7 +80,7 @@ if (count($allowed_types) == 0)
 
 //echo "Allowed filetypes = ".implode(', ',array_keys($allowed_types)).'<br />';
 // avatar check.
-$public = array(e_FILE.'public', e_FILE.'public/avatars');
+$public = array(e_UPLOAD, e_UPLOAD.'avatars');
 $exceptions = array(".","..","/","CVS","avatars","Thumbs.db",".htaccess","php.ini",".cvsignore");
 
 //TODO use $file-class to grab list and perform this check. 
@@ -383,8 +383,7 @@ function getPluginLinks($iconSize = E_16_PLUGMANAGER, $linkStyle = 'adminb')
 
 /*	echo "hello there";
 
-	require_once(e_HANDLER.'xml_class.php');
-	$xml = new xmlClass;				// We're going to have some plugins with plugin.xml files, surely? So create XML object now
+ 	$xml = e107::getXml();
 	$xml->filter = array('@attributes' => FALSE,'description'=>FALSE,'administration' => FALSE);	// .. and they're all going to need the same filter
 
 	if ($sql->db_Select("plugin", "*", "plugin_installflag=1"))
diff --git a/e107_handlers/phpmailer/mailout_process.php b/e107_handlers/phpmailer/mailout_process.php
index d0a15fb65..a6132bcf8 100644
--- a/e107_handlers/phpmailer/mailout_process.php
+++ b/e107_handlers/phpmailer/mailout_process.php
@@ -11,9 +11,9 @@
 |     GNU General Public License (http://gnu.org).
 |
 |     $Source: /cvs_backup/e107_0.8/e107_handlers/phpmailer/mailout_process.php,v $
-|     $Revision: 1.8 $
-|     $Date: 2008-05-17 19:05:08 $
-|     $Author: e107steved $
+|     $Revision: 1.9 $
+|     $Date: 2009-11-07 02:16:56 $
+|     $Author: e107coders $
 |
 | Modifications in hand to work with most recent mailout.php
 
@@ -182,7 +182,7 @@ $email_info = unserialize($row['gen_chardata']);		// Gives us sender_name, sende
 	}
 	else
 	{
-		$attach_link = e_FILE.'public/'.$attach;
+		$attach_link = e_UPLOAD.$attach;
 	}
 
 	if (($temp = strrchr($attach,'/')) !== FALSE)
diff --git a/e107_handlers/user_handler.php b/e107_handlers/user_handler.php
index 6df90eb9b..740b4b090 100644
--- a/e107_handlers/user_handler.php
+++ b/e107_handlers/user_handler.php
@@ -9,9 +9,9 @@
  * Handler - user-related functions
  *
  * $Source: /cvs_backup/e107_0.8/e107_handlers/user_handler.php,v $
- * $Revision: 1.13 $
- * $Date: 2009-10-06 18:58:08 $
- * $Author: e107steved $
+ * $Revision: 1.14 $
+ * $Date: 2009-11-07 02:16:52 $
+ * $Author: e107coders $
  *
 */
 
@@ -91,7 +91,7 @@ class UserHandler
 		'user_login' => array('niceName'=> LAN_USER_03, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'realname', 'dbClean' => 'toDB'),				// Real name (no real vetting)
 		'user_customtitle' => array('niceName'=> LAN_USER_04, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'customtitle', 'dbClean' => 'toDB', 'enablePref' => 'signup_option_customtitle'),		// No real vetting
 		'user_password' => array('niceName'=> LAN_USER_05, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'password1', 'dataType' => 2, 'minLength' => varset($pref['signup_pass_len'],1)),
-		'user_sess' => array('niceName'=> LAN_USER_06, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'stripChars' => "#\"|'|(|)#", 'dbClean' => 'image', 'imagePath' => e_FILE.'public/avatars/', 'maxHeight' => varset($pref['im_height'], 100), 'maxWidth' => varset($pref['im_width'], 120)),				// Photo
+		'user_sess' => array('niceName'=> LAN_USER_06, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'stripChars' => "#\"|'|(|)#", 'dbClean' => 'image', 'imagePath' => e_UPLOAD.'avatars/', 'maxHeight' => varset($pref['im_height'], 100), 'maxWidth' => varset($pref['im_width'], 120)),				// Photo
 		'user_image' => array('niceName'=> LAN_USER_07, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'image', 'stripChars' => "#\"|'|(|)#", 'dbClean' => 'avatar', 'maxHeight' => varset($pref['im_height'], 100), 'maxWidth' => varset($pref['im_width'], 120)),				// Avatar
 		'user_email' => array('niceName'=> LAN_USER_08, 'fieldType' => 'string', 'vetMethod' => '1,3', 'vetParam' => '', 'fieldOptional' => varset($pref['disable_emailcheck'],0), 'srcName' => 'email', 'dbClean' => 'toDB'),
 		'user_signature' => array('niceName'=> LAN_USER_09, 'fieldType' => 'string', 'vetMethod' => '0', 'vetParam' => '', 'srcName' => 'signature', 'dbClean' => 'toDB'),
diff --git a/e107_handlers/validator_class.php b/e107_handlers/validator_class.php
index 10e1e3d4d..a6a7ca307 100644
--- a/e107_handlers/validator_class.php
+++ b/e107_handlers/validator_class.php
@@ -9,9 +9,9 @@
  * Handler - general purpose validation functions
  *
  * $Source: /cvs_backup/e107_0.8/e107_handlers/validator_class.php,v $
- * $Revision: 1.13 $
- * $Date: 2009-10-30 17:59:31 $
- * $Author: secretr $
+ * $Revision: 1.14 $
+ * $Date: 2009-11-07 02:16:52 $
+ * $Author: e107coders $
  *
 */
 
@@ -939,7 +939,7 @@ class validatorClass
 								{
 									if (strpos('-upload-', $value) === 0)
 									{
-										$img = e_FILE.'public/avatars/'.$value;		// Its a server-stored image
+										$img = e_UPLOAD.'avatars/'.$value;		// Its a server-stored image
 									}
 									else
 									{
diff --git a/e107_plugins/forum/forum_post_shortcodes.php b/e107_plugins/forum/forum_post_shortcodes.php
index 2d7342a66..ac7cdbae4 100644
--- a/e107_plugins/forum/forum_post_shortcodes.php
+++ b/e107_plugins/forum/forum_post_shortcodes.php
@@ -107,7 +107,7 @@ class forum_post_shortcodes
 
 		if ($pref['forum_attach'] && strpos(e_QUERY, 'edit') === FALSE && (check_class($pref['upload_class']) || getperms('0')))
 		{
-			if (is_writable(e_FILE.'public'))
+			if (is_writable(e_UPLOAD))
 			{
 				return $fileattach;
 			}
diff --git a/usersettings.php b/usersettings.php
index efd391dde..0543386fd 100644
--- a/usersettings.php
+++ b/usersettings.php
@@ -9,8 +9,8 @@
  * User settings modify
  *
  * $Source: /cvs_backup/e107_0.8/usersettings.php,v $
- * $Revision: 1.41 $
- * $Date: 2009-11-07 02:10:34 $
+ * $Revision: 1.42 $
+ * $Date: 2009-11-07 02:16:52 $
  * $Author: e107coders $
  *
 */
@@ -144,7 +144,7 @@ if (isset($_POST['updatesettings']))
 		require_once (e_HANDLER.'upload_handler.php');
 		require_once (e_HANDLER.'resize_handler.php');
 
-		if ($uploaded = process_uploaded_files(e_FILE.'public/avatars/', 'prefix+ap_'.$udata['user_id'].'_', array('overwrite' => TRUE, 'file_mask'=>'jpg,png,gif', 'max_file_count' => 2)))
+		if ($uploaded = process_uploaded_files(e_UPLOAD.'avatars/', 'prefix+ap_'.$udata['user_id'].'_', array('overwrite' => TRUE, 'file_mask'=>'jpg,png,gif', 'max_file_count' => 2)))
 		{
 			foreach ($uploaded as $upload)
 			{