Code Duplication    Length = 13-15 lines in 2 locations

lib/stores/modules/mysql_compiler.php 1 location

@@ 284-296 (lines=13) @@
281
				}
282
			break;
283
284
			case 'limit':
285
				$this->where_s=$this->compile_tree($node["left"]);
286
				if ($node["limit"]) {
287
					$this->limit_s=" limit ".(int)$node["offset"].", ".$node["limit"]." ";
288
				} else if ($node["offset"]) {
289
					$this->limit_s=" limit ".(int)$node["offset"]." ";
290
				} else {
291
					if ($this->limit) {
292
						$offset = (int)$this->offset;
293
						$this->limit_s=" limit $offset, ".(int)$this->limit." ";
294
					}
295
				}
296
			break;
297
		}
298
		return $result;
299
	}

lib/stores/modules/postgresql_compiler.php 1 location

@@ 269-283 (lines=15) @@
266
				}
267
			break;
268
269
			case 'limit':
270
				$this->where_s=$this->compile_tree($node["left"]);
271
				$this->limit_s="";
272
				if ($node["limit"]) {
273
					$this->limit_s=" offset ".(int)$node["offset"]." limit ".$node["limit"]." ";
274
				} else
275
				if ($node["offset"]) {
276
					$this->limit_s=" limit ".(int)$node["offset"]." ";
277
				} else {
278
					if ($this->limit) {
279
						$offset = (int)$this->offset;
280
						$this->limit_s=" offset $offset limit ".(int)$this->limit." ";
281
					}
282
				}
283
			break;
284
		}
285
		return $result;
286
	}