diff options
author | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-02-11 22:59:51 +0300 |
---|---|---|
committer | vipsoft <vipsoft@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2010-02-11 22:59:51 +0300 |
commit | 8c4fb06af0e7b3c0b669c84ba3bb0853fd6e7a53 (patch) | |
tree | 2f2dcc9e015182909fdf8f16beb1c14f55c3df00 /plugins/SitesManager/tests | |
parent | e32615138e891331e4abb64e128c608acfcd3ee9 (diff) |
fix unit tests
Diffstat (limited to 'plugins/SitesManager/tests')
-rw-r--r-- | plugins/SitesManager/tests/SitesManager.test.php | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/plugins/SitesManager/tests/SitesManager.test.php b/plugins/SitesManager/tests/SitesManager.test.php index db4c765812..67eecdec5e 100644 --- a/plugins/SitesManager/tests/SitesManager.test.php +++ b/plugins/SitesManager/tests/SitesManager.test.php @@ -27,7 +27,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_emptyName() { try { - Piwik_SitesManager_API::addSite("",array("http://piwik.net")); + Piwik_SitesManager_API::getInstance()->addSite("",array("http://piwik.net")); } catch (Exception $expected) { return; @@ -41,7 +41,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_noUrls() { try { - Piwik_SitesManager_API::addSite("name",array()); + Piwik_SitesManager_API::getInstance()->addSite("name",array()); } catch (Exception $expected) { return; @@ -55,7 +55,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_wrongUrls1() { try { - Piwik_SitesManager_API::addSite("name",array("")); + Piwik_SitesManager_API::getInstance()->addSite("name",array("")); } catch (Exception $expected) { return; @@ -68,7 +68,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_wrongUrls2() { try { - Piwik_SitesManager_API::addSite("name",""); + Piwik_SitesManager_API::getInstance()->addSite("name",""); } catch (Exception $expected) { return; @@ -82,7 +82,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_wrongUrls3() { try { - Piwik_SitesManager_API::addSite("name","httpww://piwik.net"); + Piwik_SitesManager_API::getInstance()->addSite("name","httpww://piwik.net"); } catch (Exception $expected) { return; @@ -96,7 +96,7 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_wrongUrls4() { try { - Piwik_SitesManager_API::addSite("name","httpww://piwik.net/gqg~#"); + Piwik_SitesManager_API::getInstance()->addSite("name","httpww://piwik.net/gqg~#"); } catch (Exception $expected) { return; @@ -111,13 +111,13 @@ class Test_Piwik_SitesManager extends Test_Database { $url = "http://piwik.net/"; $urlOK = "http://piwik.net"; - $idsite = Piwik_SitesManager_API::addSite("name",$url); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("name",$url); $this->assertIsA( $idsite,'int'); - $siteInfo = Piwik_SitesManager_API::getSiteFromId($idsite); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($siteInfo['main_url'], $urlOK); - $siteUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertTrue(count($siteUrls)===1); } @@ -128,13 +128,13 @@ class Test_Piwik_SitesManager extends Test_Database { $urls = array("http://piwik.net/","http://piwik.com","https://piwik.net/test/"); $urlsOK = array("http://piwik.net","http://piwik.com","https://piwik.net/test"); - $idsite = Piwik_SitesManager_API::addSite("super website",$urls); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("super website",$urls); $this->assertIsA( $idsite,'int'); - $siteInfo = Piwik_SitesManager_API::getSiteFromId($idsite); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($siteInfo['main_url'], $urlsOK[0]); - $siteUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertEqual($siteUrls, $urlsOK); } @@ -144,10 +144,10 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite_strangeName() { $name = "supertest(); ~@@()''!£\$'%%^'!£"; - $idsite = Piwik_SitesManager_API::addSite($name,"http://piwik.net"); + $idsite = Piwik_SitesManager_API::getInstance()->addSite($name,"http://piwik.net"); $this->assertIsA( $idsite,'int'); - $siteInfo = Piwik_SitesManager_API::getSiteFromId($idsite); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($siteInfo['name'], $name); } @@ -157,14 +157,14 @@ class Test_Piwik_SitesManager extends Test_Database public function test_addSite() { $name = "website "; - $idsite = Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")); $this->assertIsA( $idsite,'int'); - $siteInfo = Piwik_SitesManager_API::getSiteFromId($idsite); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($siteInfo['name'], $name); $this->assertEqual($siteInfo['main_url'], "http://piwik.net"); - $siteUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertEqual($siteUrls, array("http://piwik.net","http://piwik.com/test")); return $idsite; @@ -177,7 +177,7 @@ class Test_Piwik_SitesManager extends Test_Database { $idsite = $this->test_addSite(); - $siteUrlsBefore = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsBefore = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $toAdd = array( "http://piwik1.net", "http://piwik2.net", @@ -195,10 +195,10 @@ class Test_Piwik_SitesManager extends Test_Database "http://l42578gqege.f4", "http://super.com/test/test/atqata675675/te"); - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls($idsite, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls($idsite, $toAdd); $this->assertEqual($insertedUrls, count($toAdd)); - $siteUrlsAfter = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsAfter = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $shouldHave = array_merge($siteUrlsBefore, $toAddValid); sort($shouldHave); @@ -215,14 +215,14 @@ class Test_Piwik_SitesManager extends Test_Database { $idsite = $this->test_addSite(); - $siteUrlsBefore = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsBefore = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $toAdd = array_merge($siteUrlsBefore, array("http://piwik1.net","http://piwik2.net")); - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls($idsite, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls($idsite, $toAdd); $this->assertEqual($insertedUrls, count($toAdd) - count($siteUrlsBefore)); - $siteUrlsAfter = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsAfter = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $shouldHave = $toAdd; sort($shouldHave); @@ -239,14 +239,14 @@ class Test_Piwik_SitesManager extends Test_Database { $idsite = $this->test_addSite(); - $siteUrlsBefore = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsBefore = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $toAdd = array(); - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls($idsite, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls($idsite, $toAdd); $this->assertEqual($insertedUrls, count($toAdd)); - $siteUrlsAfter = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsAfter = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $shouldHave = $siteUrlsBefore; sort($shouldHave); @@ -263,14 +263,14 @@ class Test_Piwik_SitesManager extends Test_Database { $idsite = $this->test_addSite(); - $siteUrlsBefore = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsBefore = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $toAdd = $siteUrlsBefore; - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls($idsite, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls($idsite, $toAdd); $this->assertEqual($insertedUrls, 0); - $siteUrlsAfter = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $siteUrlsAfter = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $shouldHave = $siteUrlsBefore; sort($shouldHave); @@ -287,7 +287,7 @@ class Test_Piwik_SitesManager extends Test_Database $idsite = $this->test_addSite(); $toAdd = array("htt{}p://pigeq.com/test"); try { - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls($idsite, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls($idsite, $toAdd); } catch (Exception $expected) { return; @@ -302,7 +302,7 @@ class Test_Piwik_SitesManager extends Test_Database { $toAdd = array("http://pigeq.com/test"); try { - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls(-1, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls(-1, $toAdd); } catch (Exception $expected) { return; @@ -318,7 +318,7 @@ class Test_Piwik_SitesManager extends Test_Database $toAdd = array("http://pigeq.com/test"); try { - $insertedUrls = Piwik_SitesManager_API::addSiteAliasUrls(155, $toAdd); + $insertedUrls = Piwik_SitesManager_API::getInstance()->addSiteAliasUrls(155, $toAdd); } catch (Exception $expected) { return; @@ -331,7 +331,7 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getAllSitesId_noId() { - $ids = Piwik_SitesManager_API::getAllSitesId(); + $ids = Piwik_SitesManager_API::getInstance()->getAllSitesId(); $this->assertEqual(array(),$ids); } @@ -342,14 +342,14 @@ class Test_Piwik_SitesManager extends Test_Database { $name="tetq"; $idsites = array( - Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")), - Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")), - Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")), - Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")), - Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")), + Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")), + Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")), + Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")), + Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")), + Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")), ); - $ids = Piwik_SitesManager_API::getAllSitesId(); + $ids = Piwik_SitesManager_API::getInstance()->getAllSitesId(); $this->assertEqual($idsites,$ids); } @@ -360,7 +360,7 @@ class Test_Piwik_SitesManager extends Test_Database { try { - $siteInfo = Piwik_SitesManager_API::getSiteFromId(0); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId(0); } catch (Exception $expected) { return; @@ -375,7 +375,7 @@ class Test_Piwik_SitesManager extends Test_Database { try { - $siteInfo = Piwik_SitesManager_API::getSiteFromId("x1"); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId("x1"); } catch (Exception $expected) { return; @@ -388,7 +388,7 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getSiteFromId_wrongId3() { - $idsite = Piwik_SitesManager_API::addSite("site",array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site",array("http://piwik.net","http://piwik.com/test/")); $this->assertEqual($idsite,1); // set noaccess to site 1 @@ -396,7 +396,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesAdmin (array()); try { - $siteInfo = Piwik_SitesManager_API::getSiteFromId(1); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId(1); } catch (Exception $expected) { return; @@ -410,10 +410,10 @@ class Test_Piwik_SitesManager extends Test_Database function test_getSiteFromId_normalId() { $name = "website ''"; - $idsite = Piwik_SitesManager_API::addSite($name,array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite($name,array("http://piwik.net","http://piwik.com/test/")); $this->assertIsA( $idsite,'int'); - $siteInfo = Piwik_SitesManager_API::getSiteFromId($idsite); + $siteInfo = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($siteInfo['name'], $name); $this->assertEqual($siteInfo['main_url'], "http://piwik.net"); } @@ -426,7 +426,7 @@ class Test_Piwik_SitesManager extends Test_Database { FakeAccess::setIdSitesAdmin (array()); - $sites = Piwik_SitesManager_API::getSitesWithAdminAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithAdminAccess(); $this->assertEqual($sites, array()); } @@ -435,9 +435,9 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getSitesWithAdminAccess() { - $idsite = Piwik_SitesManager_API::addSite("site1",array("http://piwik.net","http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site2",array("http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site3",array("http://piwik.org")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site2",array("http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site3",array("http://piwik.org")); $resultWanted = array( 0 => array("idsite" => 1, "name" => "site1", "main_url" =>"http://piwik.net"), @@ -446,7 +446,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesAdmin (array(1,3)); - $sites = Piwik_SitesManager_API::getSitesWithAdminAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithAdminAccess(); // we dont test the ts_created unset($sites[0]['ts_created']); @@ -462,7 +462,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesView (array()); FakeAccess::setIdSitesAdmin (array()); - $sites = Piwik_SitesManager_API::getSitesWithViewAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithViewAccess(); $this->assertEqual($sites, array()); } @@ -471,9 +471,9 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getSitesWithViewAccess() { - $idsite = Piwik_SitesManager_API::addSite("site1",array("http://piwik.net","http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site2",array("http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site3",array("http://piwik.org")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site2",array("http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site3",array("http://piwik.org")); $resultWanted = array( 0 => array("idsite" => 1, "name" => "site1", "main_url" =>"http://piwik.net"), @@ -483,7 +483,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesView (array(1,3)); FakeAccess::setIdSitesAdmin (array()); - $sites = Piwik_SitesManager_API::getSitesWithViewAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithViewAccess(); // we dont test the ts_created unset($sites[0]['ts_created']); unset($sites[1]['ts_created']); @@ -498,7 +498,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesView (array()); FakeAccess::setIdSitesAdmin (array()); - $sites = Piwik_SitesManager_API::getSitesWithAtLeastViewAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess(); $this->assertEqual($sites, array()); } @@ -507,9 +507,9 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getSitesWithAtLeastViewAccess() { - $idsite = Piwik_SitesManager_API::addSite("site1",array("http://piwik.net","http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site2",array("http://piwik.com/test/")); - $idsite = Piwik_SitesManager_API::addSite("site3",array("http://piwik.org")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",array("http://piwik.net","http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site2",array("http://piwik.com/test/")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site3",array("http://piwik.org")); $resultWanted = array( 0 => array("idsite" => 1, "name" => "site1", "main_url" =>"http://piwik.net"), @@ -519,7 +519,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesView (array(1,3)); FakeAccess::setIdSitesAdmin (array()); - $sites = Piwik_SitesManager_API::getSitesWithAtLeastViewAccess(); + $sites = Piwik_SitesManager_API::getInstance()->getSitesWithAtLeastViewAccess(); // we dont test the ts_created unset($sites[0]['ts_created']); unset($sites[1]['ts_created']); @@ -532,9 +532,9 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_getSiteUrlsFromId_noUrls() { - $idsite = Piwik_SitesManager_API::addSite("site1",array("http://piwik.net")); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",array("http://piwik.net")); - $urls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $urls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertEqual(array("http://piwik.net"),$urls); } @@ -549,14 +549,14 @@ class Test_Piwik_SitesManager extends Test_Database "http://piwik.com"); sort($site); - $idsite = Piwik_SitesManager_API::addSite("site1",$site); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",$site); $siteWanted = array("http://piwik.net", "http://piwik.org", "http://piwik.com"); sort($siteWanted); - $urls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $urls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertEqual($siteWanted, $urls); @@ -571,7 +571,7 @@ class Test_Piwik_SitesManager extends Test_Database FakeAccess::setIdSitesAdmin (array()); try { - Piwik_SitesManager_API::getSiteUrlsFromId(1); + Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId(1); } catch (Exception $expected) { return; @@ -588,12 +588,12 @@ class Test_Piwik_SitesManager extends Test_Database "http://piwiknew.net", "http://piwiknew.org", "http://piwiknew.fr"); - $idsite = Piwik_SitesManager_API::addSite("site1",$urls); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",$urls); $newMainUrl = "http://main.url"; - Piwik_SitesManager_API::updateSite($idsite, "test toto@{}", $newMainUrl ); + Piwik_SitesManager_API::getInstance()->updateSite($idsite, "test toto@{}", $newMainUrl ); - $allUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $allUrls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); $this->assertEqual($allUrls[0], $newMainUrl); $aliasUrls = array_slice($allUrls,1); @@ -605,12 +605,12 @@ class Test_Piwik_SitesManager extends Test_Database */ function test_updateSite_strangeNameNoUrl() { - $idsite = Piwik_SitesManager_API::addSite("site1","http://main.url"); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1","http://main.url"); $newName ="test toto@{'786'}"; - Piwik_SitesManager_API::updateSite($idsite, $newName ); + Piwik_SitesManager_API::getInstance()->updateSite($idsite, $newName ); - $site = Piwik_SitesManager_API::getSiteFromId($idsite); + $site = Piwik_SitesManager_API::getInstance()->getSiteFromId($idsite); $this->assertEqual($site['name'],$newName); // url didn't change because parameter url NULL in updateSite @@ -629,15 +629,15 @@ class Test_Piwik_SitesManager extends Test_Database "http://piwiknew.net", "http://piwiknew.org", "http://piwiknew.fr"); - $idsite = Piwik_SitesManager_API::addSite("site1",$urls); + $idsite = Piwik_SitesManager_API::getInstance()->addSite("site1",$urls); $newurls = array("http://piwiknew2.com", "http://piwiknew2.net", "http://piwiknew2.org", "http://piwiknew2.fr"); - Piwik_SitesManager_API::updateSite($idsite, "test toto@{}",$newurls ); + Piwik_SitesManager_API::getInstance()->updateSite($idsite, "test toto@{}",$newurls ); - $allUrls = Piwik_SitesManager_API::getSiteUrlsFromId($idsite); + $allUrls = Piwik_SitesManager_API::getInstance()->getSiteUrlsFromId($idsite); sort($allUrls); sort($newurls); |