@@ 138-149 (lines=12) @@ | ||
135 | } else { |
|
136 | $this->output->set_status_header('400', 'Unable to set tags?'); |
|
137 | } |
|
138 | } else { |
|
139 | $errorArr = $this->form_validation->error_array(); |
|
140 | if(in_array('max_length', $errorArr)) { |
|
141 | $this->output->set_status_header('400', 'Tag string is too long! Max length is 255 characters.'); |
|
142 | } else if(in_array('not_equals', $errorArr)) { |
|
143 | $this->output->set_status_header('400', '"none" is a restricted tag.'); |
|
144 | } else if(in_array('is_valid_tag_string', $errorArr)) { |
|
145 | $this->output->set_status_header('400', 'Tags can only contain: lowercase a-z, 0-9, -, :, & _. They can also only have one MAL metatag.'); |
|
146 | } else { |
|
147 | $this->output->set_status_header('400', 'Missing/invalid parameters.'); |
|
148 | } |
|
149 | } |
|
150 | } |
|
151 | ||
152 | /** |
|
@@ 179-190 (lines=12) @@ | ||
176 | } else { |
|
177 | $this->output->set_status_header('400', 'Unable to set tags?'); |
|
178 | } |
|
179 | } else { |
|
180 | $errorArr = $this->form_validation->error_array(); |
|
181 | if(in_array('max_length', $errorArr)) { |
|
182 | $this->output->set_status_header('400', 'Tag string is too long! Max length is 255 characters.'); |
|
183 | } else if(in_array('not_equals', $errorArr)) { |
|
184 | $this->output->set_status_header('400', '"none" is a restricted tag.'); |
|
185 | } else if(in_array('is_valid_tag_string', $errorArr)) { |
|
186 | $this->output->set_status_header('400', 'Tags can only contain: lowercase a-z, 0-9, -, :, & _. They can also only have one MAL metatag.'); |
|
187 | } else { |
|
188 | $this->output->set_status_header('400', 'Missing/invalid parameters.'); |
|
189 | } |
|
190 | } |
|
191 | } |
|
192 | ||
193 | /** |