• R/O
  • HTTP
  • SSH
  • HTTPS

magic3: コミット

Cloud computing platform


コミットメタ情報

リビジョン4d0ba64080680591e16328f6b9b00d489437827d (tree)
日時2016-10-17 14:59:14
作者naoki hirata <naoki@magi...>
コミッターnaoki hirata

ログメッセージ

ブラウザ解析機能更新。

変更サマリ

差分

--- a/widgets/admin_main/include/container/admin_mainAccesslogWidgetContainer.php
+++ b/widgets/admin_main/include/container/admin_mainAccesslogWidgetContainer.php
@@ -31,6 +31,8 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
3131 private $server; // 指定サーバ
3232 private $startDt; // 検索範囲開始日付
3333 private $endDt; // 検索範囲終了日付
34+ private $browserTypeInfo; // ブラウザ情報(再利用)
35+ private $osInfo; // プラットフォーム情報(再利用)
3436 const DEFAULT_LIST_COUNT = 30; // 最大リスト表示数
3537 const MAX_PAGE_COUNT = 200; // 最大ページ数
3638 const INFO_ICON_FILE = '/images/system/info16.png'; // 情報アイコン
@@ -325,7 +327,7 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
325327 if (!empty($countryCode)){
326328 $iconTitle = $countryCode;
327329 $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 . '" />';
329331 }
330332
331333 $osImg = ''; // OS
@@ -390,6 +392,8 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
390392 */
391393 function logListLoop($index, $fetchedRow, $param)
392394 {
395+ static $savedAgent; // 前ブラウザ情報退避用
396+
393397 $serial = $fetchedRow['al_serial'];
394398 $agent = $fetchedRow['al_user_agent'];
395399
@@ -400,12 +404,12 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
400404 }
401405
402406 // ブラウザ、プラットフォームの情報を取得
403- $browserTypeInfo = $this->gInstance->getAnalyzeManager()->getBrowserType($agent);
407+ if ($agent != $savedAgent) $this->browserTypeInfo = $this->gInstance->getAnalyzeManager()->getBrowserType($agent);
404408 $browserImg = '';
405- if (!empty($browserTypeInfo)){
406- $iconFile = $browserTypeInfo['icon'];
409+ if (!empty($this->browserTypeInfo)){
410+ $iconFile = $this->browserTypeInfo['icon'];
407411 if (!empty($iconFile)){
408- $iconTitle = $browserTypeInfo['name'];
412+ $iconTitle = $this->browserTypeInfo['name'];
409413 $iconUrl = $this->gEnv->getRootUrl() . self::BROWSER_ICON_DIR . $iconFile;
410414 $browserImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />';
411415 }
@@ -419,11 +423,11 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
419423 if (!empty($countryCode)){
420424 $iconTitle = $countryCode;
421425 $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 . '" />';
423427 }
424428
425429 $osImg = ''; // OS
426- $osInfo = $this->gInstance->getAnalyzeManager()->getPlatformType($agent);
430+ if ($agent != $savedAgent) $this->osInfo = $this->gInstance->getAnalyzeManager()->getPlatformType($agent);
427431 /* if (!empty($osCode)){
428432 $iconFile = $this->osIconFile[$osCode]; // OSアイコンファイル名
429433 if (!empty($iconFile)){
@@ -432,10 +436,10 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
432436 $osImg = '<img src="' . $this->getUrl($iconUrl) . '" border="0" alt="' . $iconTitle . '" title="' . $iconTitle . '" />';
433437 }
434438 }*/
435- if (!empty($osInfo)){
436- $iconFile = $osInfo['icon']; // OSアイコンファイル名
439+ if (!empty($this->osInfo)){
440+ $iconFile = $this->osInfo['icon']; // OSアイコンファイル名
437441 if (!empty($iconFile)){
438- $iconTitle = $osInfo['name'] . ' ' . $osInfo['version_name'];
442+ $iconTitle = $this->osInfo['name'] . ' ' . $this->osInfo['version_name'];
439443 $iconUrl = $this->gEnv->getRootUrl() . self::OS_ICON_DIR . $iconFile;
440444 $osImg = '<img src="' . $this->getUrl($iconUrl) . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />';
441445 }
@@ -460,6 +464,9 @@ class admin_mainAccesslogWidgetContainer extends admin_mainConditionBaseWidgetCo
460464 $this->tmpl->addVars('loglist', $row);
461465 $this->tmpl->parseTemplate('loglist', 'a');
462466
467+ // ブラウザ情報退避
468+ $savedAgent = $agent; // 前ブラウザ情報退避用
469+
463470 // 表示中のコンテンツIDを保存
464471 $this->serialArray[] = $serial;
465472 return true;
旧リポジトリブラウザで表示