Changeset 2385265
- Timestamp:
- 09/20/2020 06:15:13 PM (5 years ago)
- Location:
- upstream/trunk
- Files:
-
- 11 edited
-
includes.php (modified) (1 diff)
-
includes/admin/assets/js/edit-project.js (modified) (1 diff)
-
includes/frontend/class-up-login.php (modified) (3 diffs)
-
includes/model/UpStream_Model_Bug.php (modified) (1 diff)
-
includes/model/UpStream_Model_File.php (modified) (1 diff)
-
includes/model/UpStream_Model_Manager.php (modified) (1 diff)
-
includes/model/UpStream_Model_Meta_Object.php (modified) (2 diffs)
-
includes/model/UpStream_Model_Object.php (modified) (5 diffs)
-
includes/model/UpStream_Model_Post_Object.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
upstream.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
upstream/trunk/includes.php
r2379862 r2385265 1 1 <?php 2 define('UPSTREAM_VERSION', '1.37. 4');2 define('UPSTREAM_VERSION', '1.37.5'); 3 3 4 4 global $upstream_addon_requirements; -
upstream/trunk/includes/admin/assets/js/edit-project.js
r2354305 r2385265 433 433 $row.find('[data-avatar_assigned]').attr('data-avatar_assigned', ''); 434 434 $row.find('[data-avatar_created_by]').attr('data-avatar_created_by', ''); 435 $row.find('.up-autoincrement').html('---'); 435 436 $row.find('.up-o-tab').removeClass('nav-tab-active'); 436 437 $row.find('.dashicons-flag').removeAttr('style'); -
upstream/trunk/includes/frontend/class-up-login.php
r2077924 r2385265 90 90 91 91 if (empty($postData['username'])) { 92 $this->feedbackMessage = __("Email address field cannot be empty.", 'upstream');93 } elseif (strlen($postData['username']) < 3 || ! is_email($postData['username'])) {94 $this->feedbackMessage = __("Invalid email address and/or password.", 'upstream');92 $this->feedbackMessage = __("Email address/username field cannot be empty.", 'upstream'); 93 } elseif (strlen($postData['username']) < 3) { 94 $this->feedbackMessage = __("Invalid email address/username.", 'upstream'); 95 95 } else { 96 96 if (empty($postData['password'])) { 97 97 $this->feedbackMessage = __("Password field cannot be empty.", 'upstream'); 98 } elseif (strlen($postData['password']) < 5) {98 } elseif (strlen($postData['password']) < 2) { 99 99 $this->feedbackMessage = __("Invalid email address and/or password.", 'upstream'); 100 100 } else { … … 106 106 } 107 107 108 private function upstream_get_project_roles() 109 { 110 $options = (array)get_option('upstream_general'); 111 112 if ( ! isset($options['project_user_roles']) || empty($options['project_user_roles'])) { 113 $roles = [ 114 'upstream_manager', 115 'upstream_user', 116 'administrator', 117 ]; 118 } else { 119 $roles = (array)$options['project_user_roles']; 120 } 121 122 $roles = apply_filters('upstream_user_roles_for_projects', $roles); 123 124 return $roles; 125 } 126 127 108 128 /** 109 129 * Attempt to authenticate a user against the open project given current email address and password. … … 123 143 } 124 144 125 // Check if there's a user using that email. 145 126 146 $user = get_user_by('email', $data['username']); 127 147 if (empty($user)) { 128 throw new \Exception(__("Invalid email address and/or password.", 'upstream')); 148 $user = get_user_by('login', $data['username']); 149 if (empty($user)) { 150 throw new \Exception(__("Invalid user/email address and/or password.", 'upstream')); 151 } 129 152 } 130 153 131 154 $userRoles = (array)$user->roles; 132 $projectRoles = array_merge(['administrator',], upstream_get_project_roles()); 133 134 // Check if this user has a valid UpStream Role to log in. 155 $projectRoles = array_merge(['administrator','upstream_client_user','upstream_user','upstream_manager'], $this->upstream_get_project_roles()); 156 135 157 if (count(array_intersect( 136 158 $userRoles, -
upstream/trunk/includes/model/UpStream_Model_Bug.php
r2354305 r2385265 104 104 $r = []; 105 105 $reminder->storeToArray($r); 106 $item_metadata['reminders'][] = $r;106 $item_metadata['reminders'][] = json_encode($r); 107 107 } 108 108 -
upstream/trunk/includes/model/UpStream_Model_File.php
r2354305 r2385265 87 87 $r = []; 88 88 $reminder->storeToArray($r); 89 $item_metadata['reminders'][] = $r;89 $item_metadata['reminders'][] = json_encode($r); 90 90 } 91 91 92 } 92 93 -
upstream/trunk/includes/model/UpStream_Model_Manager.php
r2315471 r2385265 12 12 13 13 protected $objects = []; 14 15 public function reset() 16 { 17 $this->objects = []; 18 } 14 19 15 20 public function getByID($object_type, $object_id, $parent_type = null, $parent_id = 0) -
upstream/trunk/includes/model/UpStream_Model_Meta_Object.php
r2216956 r2385265 33 33 $this->description = !empty($item_metadata['description']) ? $item_metadata['description'] : null; 34 34 35 $this->additiona Fields = apply_filters('upstream_model_load_fields', $this->additionaFields, $item_metadata,35 $this->additionalFields = apply_filters('upstream_model_load_fields', $this->additionalFields, $item_metadata, 36 36 $this->type, $this->id); 37 37 } … … 55 55 56 56 $dataToStore = []; 57 $dataToStore = apply_filters('upstream_model_store_fields', $dataToStore, $this->additiona Fields,57 $dataToStore = apply_filters('upstream_model_store_fields', $dataToStore, $this->additionalFields, 58 58 $this->type, $this->id); 59 59 -
upstream/trunk/includes/model/UpStream_Model_Object.php
r2315471 r2385265 33 33 protected $description = null; 34 34 35 protected $additiona Fields = [];35 protected $additionalFields = []; 36 36 37 37 /** … … 92 92 default: 93 93 94 if (array_key_exists($property, $this->additiona Fields)) {95 96 $value = apply_filters('upstream_model_get_property_value', $this->additiona Fields[$property], $this->type, $this->id, $property);94 if (array_key_exists($property, $this->additionalFields)) { 95 96 $value = apply_filters('upstream_model_get_property_value', $this->additionalFields[$property], $this->type, $this->id, $property); 97 97 98 98 } else { … … 103 103 } 104 104 105 $this->additiona Fields[$property] = null;105 $this->additionalFields[$property] = null; 106 106 107 107 return null; … … 167 167 168 168 default: 169 $orig_value = (array_key_exists($property, $this->additiona Fields)) ? $this->additionaFields[$property] : null;169 $orig_value = (array_key_exists($property, $this->additionalFields)) ? $this->additionalFields[$property] : null; 170 170 171 171 $propertyExists = apply_filters('upstream_model_property_exists', false, $this->type, $this->id, $property); … … 175 175 176 176 $new_value = apply_filters('upstream_model_set_property_value', $orig_value, $this->type, $this->id, $property, $value); 177 $this->additiona Fields[$property] = $new_value;177 $this->additionalFields[$property] = $new_value; 178 178 } 179 179 } -
upstream/trunk/includes/model/UpStream_Model_Post_Object.php
r2216956 r2385265 78 78 } 79 79 80 $this->additiona Fields = apply_filters('upstream_model_load_fields', $this->additionaFields, $dataToLoad,80 $this->additionalFields = apply_filters('upstream_model_load_fields', $this->additionalFields, $dataToLoad, 81 81 $this->type, $this->id); 82 82 } … … 117 117 118 118 $dataToStore = []; 119 $dataToStore = apply_filters('upstream_model_store_fields', $dataToStore, $this->additiona Fields,119 $dataToStore = apply_filters('upstream_model_store_fields', $dataToStore, $this->additionalFields, 120 120 $this->type, $this->id); 121 121 -
upstream/trunk/readme.txt
r2379862 r2385265 5 5 Tested up to: 5.5 6 6 Requires PHP: 5.6.20 7 Stable tag: 1.37. 47 Stable tag: 1.37.5 8 8 License: GPL-3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 136 136 The format is based on [Keep a Changelog](http://keepachangelog.com) 137 137 and this project adheres to [Semantic Versioning](http://semver.org). 138 139 = [1.37.5] - 2020-09-20 = 140 * Fixed bug in login 141 * Fixed bug for files and bugs saving via model 138 142 139 143 = [1.37.4] - 2020-09-11 = -
upstream/trunk/upstream.php
r2379862 r2385265 5 5 * Author: UpStream 6 6 * Author URI: https://upstreamplugin.com 7 * Version: 1.37. 47 * Version: 1.37.5 8 8 * Text Domain: upstream 9 9 * Domain Path: /languages
Note: See TracChangeset
for help on using the changeset viewer.