diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index f3bb270bf..3beec51a9 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -1072,6 +1072,25 @@ function update_706_to_800($type='') } } + // Move Avatars to new location + $av1 = e107::getFile()->get_files(e_FILE.'public/avatars','.jpg|.gif|.png|.GIF|.jpeg|.JPG|.PNG'); + $av2 = e107::getFile()->get_files(e_IMAGE.'avatars','.jpg|.gif|.png|.GIF|.jpeg|.JPG|.PNG'); + + $avatar_images = array_merge($av1,$av2); + + if(count($avatar_images)) + { + if ($just_check) return update_needed('Avatar paths require updating.'); + foreach($avatar_images as $av) + { + @rename($av['path'].$av['fname'],e_MEDIA."avatars/".$av['fname']); + } + } + + // ------------------------------- + + + $med = e107::getMedia(); // Media Category Update diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php index ef6eabd34..ad9e117b8 100644 --- a/e107_handlers/shortcode_handler.php +++ b/e107_handlers/shortcode_handler.php @@ -896,6 +896,8 @@ class e_shortcode * @var e_vars */ protected $var = null; // value returned by each shortcode. + + protected $mode = 'view'; // or edit. Used within shortcodes for form elements vs values only. /** * Storage for shortcode values @@ -919,6 +921,12 @@ class e_shortcode $this->var = $eVars; return $this; } + + public function setMode($mode) + { + $this->mode = ($mode == 'edit') ? 'edit' : 'view'; + return $this; + } /** * Get external simple parser object