Code Duplication    Length = 7-7 lines in 3 locations

mod/blog_tools/actions/blog/save.php 1 location

@@ 171-177 (lines=7) @@
168
}
169
170
// assign values to the entity, stopping on error.
171
if (!$error) {
172
	foreach ($values as $name => $value) {
173
		if (($name != 'title2') && ($name != 'description2') &&  ($name != 'excerpt2')){ // remove input 2 in metastring table
174
		$blog->$name = $value;
175
		}
176
	}
177
}
178
179
// only try to save base entity if no errors
180
if (!$error) {

mod/gc_tags/actions/blog/save.php 1 location

@@ 138-144 (lines=7) @@
135
}
136
137
// assign values to the entity, stopping on error.
138
if (!$error) {
139
	foreach ($values as $name => $value) {
140
		if (($name != 'title2') && ($name != 'description2') &&  ($name != 'excerpt2')){ // remove input 2 in metastring table
141
		$blog->$name = $value;
142
		}
143
	}
144
}
145
146
// only try to save base entity if no errors
147
if (!$error) {

mod/gc_mobile_api/models/blog.php 1 location

@@ 422-428 (lines=7) @@
419
	 $old_status = $blog->status;
420
421
	 // assign values to the entity, stopping on error.
422
	 if (!$error) {
423
		 foreach ($values as $name => $value) {
424
			 if (($name != 'title2') && ($name != 'description2') &&  ($name != 'excerpt2')){ // remove input 2 in metastring table
425
			 $blog->$name = $value;
426
			 }
427
		 }
428
	 }
429
430
	 if (!$error){
431
		 if ($blog->save()){