リビジョン | 4d0ba64080680591e16328f6b9b00d489437827d (tree) |
---|---|
日時 | 2016-10-17 14:59:14 |
作者 | naoki hirata <naoki@magi...> |
コミッター | naoki hirata |
ブラウザ解析機能更新。
@@ -31,6 +31,8 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
31 | 31 | private $server; // 指定サーバ |
32 | 32 | private $startDt; // 検索範囲開始日付 |
33 | 33 | private $endDt; // 検索範囲終了日付 |
34 | + private $browserTypeInfo; // ブラウザ情報(再利用) | |
35 | + private $osInfo; // プラットフォーム情報(再利用) | |
34 | 36 | const DEFAULT_LIST_COUNT = 30; // 最大リスト表示数 |
35 | 37 | const MAX_PAGE_COUNT = 200; // 最大ページ数 |
36 | 38 | const INFO_ICON_FILE = '/images/system/info16.png'; // 情報アイコン |
@@ -325,7 +327,7 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
325 | 327 | if (!empty($countryCode)){ |
326 | 328 | $iconTitle = $countryCode; |
327 | 329 | $iconUrl = $this->gEnv->getRootUrl() . self::FLAG_ICON_DIR . $countryCode . '.png'; |
328 | - $countryImg = '<img src="' . $this->getUrl($iconUrl) . '" border="0" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; | |
330 | + $countryImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; | |
329 | 331 | } |
330 | 332 | |
331 | 333 | $osImg = ''; // OS |
@@ -390,6 +392,8 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
390 | 392 | */ |
391 | 393 | function logListLoop($index, $fetchedRow, $param) |
392 | 394 | { |
395 | + static $savedAgent; // 前ブラウザ情報退避用 | |
396 | + | |
393 | 397 | $serial = $fetchedRow['al_serial']; |
394 | 398 | $agent = $fetchedRow['al_user_agent']; |
395 | 399 |
@@ -400,12 +404,12 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
400 | 404 | } |
401 | 405 | |
402 | 406 | // ブラウザ、プラットフォームの情報を取得 |
403 | - $browserTypeInfo = $this->gInstance->getAnalyzeManager()->getBrowserType($agent); | |
407 | + if ($agent != $savedAgent) $this->browserTypeInfo = $this->gInstance->getAnalyzeManager()->getBrowserType($agent); | |
404 | 408 | $browserImg = ''; |
405 | - if (!empty($browserTypeInfo)){ | |
406 | - $iconFile = $browserTypeInfo['icon']; | |
409 | + if (!empty($this->browserTypeInfo)){ | |
410 | + $iconFile = $this->browserTypeInfo['icon']; | |
407 | 411 | if (!empty($iconFile)){ |
408 | - $iconTitle = $browserTypeInfo['name']; | |
412 | + $iconTitle = $this->browserTypeInfo['name']; | |
409 | 413 | $iconUrl = $this->gEnv->getRootUrl() . self::BROWSER_ICON_DIR . $iconFile; |
410 | 414 | $browserImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; |
411 | 415 | } |
@@ -419,11 +423,11 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
419 | 423 | if (!empty($countryCode)){ |
420 | 424 | $iconTitle = $countryCode; |
421 | 425 | $iconUrl = $this->gEnv->getRootUrl() . self::FLAG_ICON_DIR . $countryCode . '.png'; |
422 | - $countryImg = '<img src="' . $this->getUrl($iconUrl) . '" border="0" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; | |
426 | + $countryImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; | |
423 | 427 | } |
424 | 428 | |
425 | 429 | $osImg = ''; // OS |
426 | - $osInfo = $this->gInstance->getAnalyzeManager()->getPlatformType($agent); | |
430 | + if ($agent != $savedAgent) $this->osInfo = $this->gInstance->getAnalyzeManager()->getPlatformType($agent); | |
427 | 431 | /* if (!empty($osCode)){ |
428 | 432 | $iconFile = $this->osIconFile[$osCode]; // OSアイコンファイル名 |
429 | 433 | if (!empty($iconFile)){ |
@@ -432,10 +436,10 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
432 | 436 | $osImg = '<img src="' . $this->getUrl($iconUrl) . '" border="0" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; |
433 | 437 | } |
434 | 438 | }*/ |
435 | - if (!empty($osInfo)){ | |
436 | - $iconFile = $osInfo['icon']; // OSアイコンファイル名 | |
439 | + if (!empty($this->osInfo)){ | |
440 | + $iconFile = $this->osInfo['icon']; // OSアイコンファイル名 | |
437 | 441 | if (!empty($iconFile)){ |
438 | - $iconTitle = $osInfo['name'] . ' ' . $osInfo['version_name']; | |
442 | + $iconTitle = $this->osInfo['name'] . ' ' . $this->osInfo['version_name']; | |
439 | 443 | $iconUrl = $this->gEnv->getRootUrl() . self::OS_ICON_DIR . $iconFile; |
440 | 444 | $osImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />'; |
441 | 445 | } |
@@ -460,6 +464,9 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo | ||
460 | 464 | $this->tmpl->addVars('loglist', $row); |
461 | 465 | $this->tmpl->parseTemplate('loglist', 'a'); |
462 | 466 | |
467 | + // ブラウザ情報退避 | |
468 | + $savedAgent = $agent; // 前ブラウザ情報退避用 | |
469 | + | |
463 | 470 | // 表示中のコンテンツIDを保存 |
464 | 471 | $this->serialArray[] = $serial; |
465 | 472 | return true; |