From ca44ab943ac16477593c16f7d6d53f41b7279886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Sun, 26 Jun 2016 00:46:41 +0200 Subject: [PATCH] simplify commits detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- bridges/GitlabCommitsBridge.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bridges/GitlabCommitsBridge.php b/bridges/GitlabCommitsBridge.php index a3c9299..972731d 100644 --- a/bridges/GitlabCommitsBridge.php +++ b/bridges/GitlabCommitsBridge.php @@ -48,10 +48,7 @@ class GitlabCommitsBridge extends BridgeAbstract{ or $this->returnError('No results for LWNprev', 404); - foreach($html->find('li') as $commit){ - if(!in_array('commit',explode(' ',$commit->getAttribute("class")))){ - continue; - } + foreach($html->find('li.commit') as $commit){ $item = new \Item(); $item->uri=$param['uri'];