Index: trunk/extensions/MoodBar/sql/moodbar_feedback_response.sql |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | |
7 | 7 | -- User who provided the response |
8 | 8 | mbfr_user_id int unsigned NOT NULL, -- User ID, or zero |
9 | | - mbfr_user_ip varchar(255) binary NULL, -- If anonymous, user's IP address |
| 9 | + mbfr_user_ip varbinary(40) NULL, -- If anonymous, user's IP address |
10 | 10 | |
11 | 11 | mbfr_commenter_editcount int unsigned NOT NULL, -- number of edit for the user who writes the feedback |
12 | 12 | mbfr_user_editcount int unsigned NOT NULL, -- number of edit for the responder |
Index: trunk/extensions/MoodBar/FeedbackResponseItem.php |
— | — | @@ -123,16 +123,17 @@ |
124 | 124 | /** |
125 | 125 | * Set a group of properties. Throws an exception on invalid property. |
126 | 126 | * @param $values An associative array of properties to set. |
| 127 | + * @throws MWFeedbackResponseItemPropertyException |
127 | 128 | */ |
128 | 129 | public function setProperties( $values ) { |
129 | 130 | |
130 | 131 | foreach( $values as $key => $value ) { |
131 | 132 | if ( ! $this->isValidKey($key) ) { |
132 | | - throw new MWException( "Attempt to set invalid property $key" ); |
| 133 | + throw new MWFeedbackResponseItemPropertyException( "Attempt to set invalid property $key" ); |
133 | 134 | } |
134 | 135 | |
135 | 136 | if ( ! $this->validatePropertyValue($key, $value) ) { |
136 | | - throw new MWException( "Attempt to set invalid value for $key" ); |
| 137 | + throw new MWFeedbackResponseItemPropertyException( "Attempt to set invalid value for $key" ); |
137 | 138 | } |
138 | 139 | |
139 | 140 | $this->data[$key] = $value; |
— | — | @@ -152,10 +153,11 @@ |
153 | 154 | * Get a property. |
154 | 155 | * @param $key The property to get |
155 | 156 | * @return The property value. |
| 157 | + * @throws MWFeedbackResponseItemPropertyException |
156 | 158 | */ |
157 | 159 | public function getProperty( $key ) { |
158 | 160 | if ( ! $this->isValidKey($key) ) { |
159 | | - throw new MWException( "Attempt to get invalid property $key" ); |
| 161 | + throw new MWFeedbackResponseItemPropertyException( "Attempt to get invalid property $key" ); |
160 | 162 | } |
161 | 163 | |
162 | 164 | return $this->data[$key]; |
— | — | @@ -280,3 +282,5 @@ |
281 | 283 | } |
282 | 284 | |
283 | 285 | } |
| 286 | + |
| 287 | +class MWFeedbackResponseItemPropertyException extends MWException {}; |