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_mobile_api/models/blog.php 1 location

@@ 501-507 (lines=7) @@
498
	 $old_status = $blog->status;
499
500
	 // assign values to the entity, stopping on error.
501
	 if (!$error) {
502
		 foreach ($values as $name => $value) {
503
			 if (($name != 'title2') && ($name != 'description2') &&  ($name != 'excerpt2')){ // remove input 2 in metastring table
504
			 $blog->$name = $value;
505
			 }
506
		 }
507
	 }
508
509
	 if (!$error){
510
		 if ($blog->save()){

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

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