From f456afcac8abbd24742ad86ca2f775d706c92874 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 30 Jun 2020 01:33:28 +0530 Subject: [PATCH] 4.5.0 - changes google pagespeed changes --- controllers/pagespeed.ctrl.php | 6 +- controllers/report.ctrl.php | 11 ++- .../views/pagespeed/findpagespeedinfo.ctp.php | 47 ++++--------- .../views/pagespeed/pagespeedreport.ctp.php | 70 +++++-------------- themes/classic/views/report/archive.ctp.php | 5 +- 5 files changed, 39 insertions(+), 100 deletions(-) diff --git a/controllers/pagespeed.ctrl.php b/controllers/pagespeed.ctrl.php index ce60e275..6000d05d 100644 --- a/controllers/pagespeed.ctrl.php +++ b/controllers/pagespeed.ctrl.php @@ -26,7 +26,6 @@ class PageSpeedController extends Controller{ var $colList = array( 'desktop_speed_score' => 'desktop_speed_score', 'mobile_speed_score' => 'mobile_speed_score', - 'mobile_usability_score' => 'mobile_usability_score', ); // function to get moz rank @@ -319,8 +318,7 @@ function __getWebsitePageSpeedReport($websiteId, $fromTime, $toTime) { } # func to show graphical reports - function showGraphicalReports($searchInfo = '') { - + function showGraphicalReports($searchInfo = '') { $userId = isLoggedIn(); $fromTime = !empty($searchInfo['from_time']) ? $searchInfo['from_time'] : date('Y-m-d', strtotime('-30 days')); $toTime = !empty ($searchInfo['to_time']) ? $searchInfo['to_time'] : date("Y-m-d"); @@ -342,7 +340,7 @@ function showGraphicalReports($searchInfo = '') { $colList = $this->colList; if (!empty($reportList)) { - $colLableList = array($this->spTextPS['Desktop Speed'], $this->spTextPS['Mobile Speed'], $this->spTextPS['Mobile Usability']); + $colLableList = array($this->spTextPS['Desktop Speed'], $this->spTextPS['Mobile Speed']); $dataArr = "['Date', '" . implode("', '", $colLableList) . "']"; // loop through data list diff --git a/controllers/report.ctrl.php b/controllers/report.ctrl.php index ae154713..bad8e6ae 100644 --- a/controllers/report.ctrl.php +++ b/controllers/report.ctrl.php @@ -608,8 +608,8 @@ function generateReports( $searchInfo='' ) { if(empty($this->seFound)){ echo "

".$_SESSION['text']['common']['Keyword']." {$keywordInfo['name']} ".$this->spTextKeyword['not assigned to required search engines']."........

"; } - sleep(SP_CRAWL_DELAY); - } + sleep(SP_CRAWL_DELAY); + } } # function to format pagecontent @@ -816,7 +816,7 @@ function crawlKeyword( $keywordInfo, $seId='', $cron=false, $removeDuplicate=tru } - return $crawlResult; + return $crawlResult; } # func to save the report @@ -1193,7 +1193,6 @@ function showOverallReportSummary($searchInfo='', $cronUserId=false) { $report = $report[0]; $listInfo['desktop_speed_score'] = empty($report['desktop_speed_score']) ? "-" : $report['desktop_speed_score']." ".$report['rank_diff_desktop_speed_score']; $listInfo['mobile_speed_score'] = empty($report['mobile_speed_score']) ? "-" : $report['mobile_speed_score']." ".$report['rank_diff_mobile_speed_score']; - $listInfo['mobile_usability_score'] = empty($report['mobile_usability_score']) ? "-" : $report['mobile_usability_score']." ".$report['rank_diff_mobile_usability_score']; $listInfo['dirsub']['total'] = $dirCtrler->__getTotalSubmitInfo($listInfo['id']); $listInfo['dirsub']['active'] = $dirCtrler->__getTotalSubmitInfo($listInfo['id'], true); @@ -1227,7 +1226,6 @@ function showOverallReportSummary($searchInfo='', $cronUserId=false) { 'Bing '.$spTextHome['Indexed'], $spTextPS['Desktop Speed'], $spTextPS['Mobile Speed'], - $spTextPS['Mobile Usability'], $_SESSION['text']['common']['Total'].' Submission', $_SESSION['text']['common']['Active'].' Submission', ); @@ -1247,7 +1245,6 @@ function showOverallReportSummary($searchInfo='', $cronUserId=false) { strip_tags($websiteInfo['msn']['indexed']), strip_tags($websiteInfo['desktop_speed_score']), strip_tags($websiteInfo['mobile_speed_score']), - strip_tags($websiteInfo['mobile_usability_score']), $websiteInfo['dirsub']['total'], $websiteInfo['dirsub']['active'], ); @@ -1399,7 +1396,7 @@ function updateUserReportSetting($userId, $col, $val) { function updateUserReportGenerationLogs($userId, $generateDate) { $dataList = array( 'user_id|int' => $userId, - 'report_date' => $generateDate, + 'report_date' => $generateDate, ); $this->dbHelper->insertRow("user_report_logs", $dataList); diff --git a/themes/classic/views/pagespeed/findpagespeedinfo.ctp.php b/themes/classic/views/pagespeed/findpagespeedinfo.ctp.php index 4015bb0e..4aecc642 100644 --- a/themes/classic/views/pagespeed/findpagespeedinfo.ctp.php +++ b/themes/classic/views/pagespeed/findpagespeedinfo.ctp.php @@ -1,52 +1,31 @@ - +
- + - - + 0){ - $catCount = count($list); - $i = 0; - foreach($list as $url){ - - $class = ($i % 2) ? "blue_row" : "white_row"; - if($catCount == ($i + 1)){ - $leftBotClass = "tab_left_bot"; - $rightBotClass = "tab_right_bot"; - }else{ - $leftBotClass = "td_left_border td_br_right"; - $rightBotClass = "td_br_right"; - } - $tdWidth = "25%"; + foreach($list as $url) { $debugVar = !empty($_POST['debug']) ? "&debug=1" : ""; $debugVar .= !empty($_POST['debug_format']) ? "&debug_format=" . $_POST['debug_format'] : "" ; ?> - - - - - -
/ 100 / 100 / 100 - >> -