comment fixes
[civicrm-core.git] / CRM / Contact / Page / View / Log.php
index 6833d450cf2857189569adbe23dbf85b2a97ca0a..38e7a0ca42d14e387803c8af3d1bdd4b729156c4 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
  */
 class CRM_Contact_Page_View_Log extends CRM_Core_Page {
 
   /**
-   * This function is called when action is browse
+   * Called when action is browse.
    *
-   * return null
+   * @return null
    */
   public function browse() {
     $loggingReport = CRM_Core_BAO_Log::useLoggingReport();
@@ -45,9 +43,9 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page {
 
     if ($loggingReport) {
       $this->assign('instanceUrl',
-                    CRM_Utils_System::url("civicrm/report/instance/{$loggingReport}",
-                                          "reset=1&force=1&snippet=4&section=2&altered_contact_id_op=eq&altered_contact_id_value={$this->_contactId}&cid={$this->_contactId}", FALSE, NULL, FALSE));
-      return;
+        CRM_Utils_System::url("civicrm/report/instance/{$loggingReport}",
+          "reset=1&force=1&snippet=4&section=2&altered_contact_id_op=eq&altered_contact_id_value={$this->_contactId}&cid={$this->_contactId}", FALSE, NULL, FALSE));
+      return NULL;
     }
 
     $log = new CRM_Core_DAO_Log();
@@ -69,6 +67,8 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page {
     }
 
     $this->assign('logCount', count($logEntries));
+    $this->ajaxResponse['tabCount'] = count($logEntries);
+    $this->ajaxResponse += CRM_Contact_Form_Inline::renderFooter($this->_contactId, FALSE);
     $this->assign_by_ref('log', $logEntries);
   }
 
@@ -87,9 +87,9 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page {
   }
 
   /**
-   * This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
+   * the main function that is called when the page loads, it decides the which action has to be taken for the page.
    *
-   * return null
+   * @return null
    */
   public function run() {
     $this->preProcess();
@@ -98,4 +98,5 @@ class CRM_Contact_Page_View_Log extends CRM_Core_Page {
 
     return parent::run();
   }
+
 }