diff --git a/src/gwtdata.php b/src/gwtdata.php index bbe9347..7e26ba8 100644 --- a/src/gwtdata.php +++ b/src/gwtdata.php @@ -75,9 +75,10 @@ public function SetLanguage($str) */ public function SetTables($arr) { - if(is_array($arr) && !empty($arr) && sizeof($arr) <= 2) { - $valid = array("TOP_PAGES","TOP_QUERIES","CRAWL_ERRORS","CONTENT_ERRORS", + $valid = array("TOP_PAGES","TOP_QUERIES","CRAWL_ERRORS","CONTENT_ERRORS", "CONTENT_KEYWORDS","INTERNAL_LINKS","EXTERNAL_LINKS","SOCIAL_ACTIVITY"); + + if(is_array($arr) && !empty($arr) && count($arr) <= count($valid)) { $this->_tables = array(); for($i=0; $i < sizeof($arr); $i++) { if(in_array($arr[$i], $valid)) { @@ -398,4 +399,4 @@ private function IsISO8601($str) date('d', $stamp), date('Y', $stamp))) ? true : false; } } -?> \ No newline at end of file +?>