diff --git "a/C:\\Documents and Settings\\kcraft\\Desktop\\Patches\\statistics-clean-up-documentation-1313510-38.patch" "b/C:\\Documents and Settings\\kcraft\\Desktop\\Patches\\statistics-clean-up-documentation-1313510-42.patch" index f6c1ea4..0920531 100644 --- "a/C:\\Documents and Settings\\kcraft\\Desktop\\Patches\\statistics-clean-up-documentation-1313510-38.patch" +++ "b/C:\\Documents and Settings\\kcraft\\Desktop\\Patches\\statistics-clean-up-documentation-1313510-42.patch" @@ -1,16 +1,19 @@ diff --git a/core/modules/statistics/statistics.admin.inc b/core/modules/statistics/statistics.admin.inc -index 6606b8b..cefe79b 100644 +index 6606b8b..2b23ba7 100644 --- a/core/modules/statistics/statistics.admin.inc +++ b/core/modules/statistics/statistics.admin.inc -@@ -6,7 +6,17 @@ +@@ -2,11 +2,19 @@ + + /** + * @file +- * Admin page callbacks for the statistics module. ++ * Admin page callbacks for the Statistics module. */ /** - * Menu callback; presents the "recent hits" page. + * Page callback: Displays recent page accesses. + * -+ * Callback path: admin/reports/hits -+ * + * This displays the pages with recent hits in a given time interval. The time + * interval used is the value of the persistent variable + * statistics_flush_accesslog_timer. That value is set on the statistics @@ -21,34 +24,40 @@ index 6606b8b..cefe79b 100644 */ function statistics_recent_hits() { $header = array( -@@ -45,7 +55,17 @@ function statistics_recent_hits() { +@@ -45,7 +53,15 @@ function statistics_recent_hits() { } /** - * Menu callback; presents the "top pages" page. + * Page callback: Displays statistics for the "top pages" (most accesses). + * -+ * Callback path: admin/reports/pages -+ * + * This displays the pages with the most hits (the "top pages") within a given -+ * time interval. The time interval used is the value of the persistent variable -+ * statistics_flush_accesslog_timer. That value is set on the statistics -+ * settings form. ++ * time interval. The time interval used is the value of the persistent ++ * variable statistics_flush_accesslog_timer. That value is set on the ++ * statistics settings form. + * + * @return array + * A render array containing information about the the top pages. */ function statistics_top_pages() { $header = array( -@@ -90,7 +110,17 @@ function statistics_top_pages() { +@@ -57,7 +73,8 @@ function statistics_top_pages() { + + $query = db_select('accesslog', 'a', array('target' => 'slave'))->extend('PagerDefault')->extend('TableSort'); + $query->addExpression('COUNT(path)', 'hits'); +- // MAX(title) avoids having empty node titles which otherwise causes duplicates in the top pages list ++ // MAX(title) avoids having empty node titles which otherwise causes ++ // duplicates in the top pages list. + $query->addExpression('MAX(title)', 'title'); + $query->addExpression('AVG(timer)', 'average_time'); + $query->addExpression('SUM(timer)', 'total_time'); +@@ -90,7 +107,15 @@ function statistics_top_pages() { } /** - * Menu callback; presents the "top visitors" page. + * Page callback: Displays the "top visitors" page. + * -+ * Callback path: admin/reports/visitors -+ * + * This displays the pages with the top number of visitors in a given time + * interval. The time interval used is the value of the persistent variable + * statistics_flush_accesslog_timer. That value is set on the statistics @@ -59,15 +68,13 @@ index 6606b8b..cefe79b 100644 */ function statistics_top_visitors() { -@@ -143,7 +173,17 @@ function statistics_top_visitors() { +@@ -143,7 +168,15 @@ function statistics_top_visitors() { } /** - * Menu callback; presents the "referrer" page. + * Page callback: Displays the top referrers in the access logs. + * -+ * Callback path: admin/reports/referrers -+ * + * This displays the "referrer" page: a page that shows the top referrers in a + * given time interval. The time interval used is the value of the persistent + * variable statistics_flush_accesslog_timer. That value is set on the @@ -78,22 +85,20 @@ index 6606b8b..cefe79b 100644 */ function statistics_top_referrers() { drupal_set_title(t('Top referrers in the past %interval', array('%interval' => format_interval(variable_get('statistics_flush_accesslog_timer', 259200)))), PASS_THROUGH); -@@ -189,7 +229,13 @@ function statistics_top_referrers() { +@@ -189,7 +222,11 @@ function statistics_top_referrers() { } /** - * Menu callback; Displays recent page accesses. + * Page callback: Gathers page access statistics suitable for rendering. + * -+ * Callback path: admin/reports/access/% -+ * + * @return array + * A render array containing page access statistics. If information for the + * page was not found, calls drupal_not_found(). */ function statistics_access_log($aid) { $access = db_query('SELECT a.*, u.name FROM {accesslog} a LEFT JOIN {users} u ON a.uid = u.uid WHERE aid = :aid', array(':aid' => $aid))->fetch(); -@@ -233,7 +279,7 @@ function statistics_access_log($aid) { +@@ -233,7 +270,7 @@ function statistics_access_log($aid) { } /** @@ -102,8 +107,21 @@ index 6606b8b..cefe79b 100644 * * @ingroup forms * @see system_settings_form() +diff --git a/core/modules/statistics/statistics.install b/core/modules/statistics/statistics.install +index a5dc7f8..003b8ee 100644 +--- a/core/modules/statistics/statistics.install ++++ b/core/modules/statistics/statistics.install +@@ -2,7 +2,7 @@ + + /** + * @file +- * Install, update and uninstall functions for the statistics module. ++ * Install, update and uninstall functions for the Statistics module. + */ + + /** diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module -index 969a4f4..4158721 100644 +index 969a4f4..c11d77b 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -2,7 +2,7 @@ @@ -140,38 +158,44 @@ index 969a4f4..4158721 100644 - * @param $dbrows + * @param string $dbfield + * One of: -+ * - 'totalcount': Show the top viewed content of all time. -+ * - 'daycount': Show the top viewed content for today. -+ * - 'timestamp': Show only the last viewed node. ++ * - totalcount: Integer that shows the top viewed content of all time. ++ * - daycount: Integer that show the top viewed content for today. ++ * - timestamp: Integer that show only the last viewed node. + * @param int $dbrows * number of rows to be returned. * - * @return - * A query result containing n.nid, n.title, u.uid, u.name of the selected node(s) - * or FALSE if the query could not be executed correctly. -+ * @return SelectQuery|false ++ * @return SelectQuery|FALSE + * A query result containing n.nid, n.title, u.uid, u.name of the selected + * node(s) or FALSE if the query could not be executed correctly. */ function statistics_title_list($dbfield, $dbrows) { if (in_array($dbfield, array('totalcount', 'daycount', 'timestamp'))) { -@@ -291,11 +290,11 @@ function statistics_title_list($dbfield, $dbrows) { - * node ID +@@ -288,14 +287,15 @@ function statistics_title_list($dbfield, $dbrows) { + * Retrieves a node's "view statistics". + * + * @param $nid +- * node ID ++ * The node ID. * * @return - * An array with three entries: [0]=totalcount, [1]=daycount, [2]=timestamp - * - totalcount: count of the total number of times that node has been viewed. - * - daycount: count of the total number of times that node has been viewed "today". -+ * An array with three entries: [0]=totalcount, [1]=daycount, [2]=timestamp: -+ * - totalcount: The total number of times that node has been viewed. -+ * - daycount: The total number of times that node has been viewed "today". - * For the daycount to be reset, cron must be enabled. +- * For the daycount to be reset, cron must be enabled. - * - timestamp: timestamp of when that node was last viewed. -+ * - timestamp: The timestamp of when that node was last viewed. ++ * An associative array containing: ++ * - totalcount: Integer for the total number of times the node has been ++ * viewed. ++ * - daycount: Integer for the total number of times the node has been viewed ++ * "today". For the daycount to be reset, cron must be enabled. ++ * - timestamp: Integer for the timestamp of when the node was last viewed. */ function statistics_get($nid) { -@@ -374,8 +373,15 @@ function statistics_block_view($delta = '') { +@@ -374,8 +374,15 @@ function statistics_block_view($delta = '') { } /** @@ -189,7 +213,7 @@ index 969a4f4..4158721 100644 */ function _statistics_link($path, $width = 35) { $title = drupal_get_path_alias($path); -@@ -383,6 +389,17 @@ function _statistics_link($path, $width = 35) { +@@ -383,6 +390,17 @@ function _statistics_link($path, $width = 35) { return l($title, $path); } @@ -208,50 +232,53 @@ index 969a4f4..4158721 100644 $path = ($path ? $path : '/'); $output = ($title ? "$title
" : ''); diff --git a/core/modules/statistics/statistics.pages.inc b/core/modules/statistics/statistics.pages.inc -index 1d91609..fe87d9c 100644 +index 1d91609..950c219 100644 --- a/core/modules/statistics/statistics.pages.inc +++ b/core/modules/statistics/statistics.pages.inc -@@ -2,9 +2,18 @@ +@@ -2,9 +2,17 @@ /** * @file - * User page callbacks for the statistics module. -+ * User page callbacks for statistics.module. ++ * User page callbacks for the Statistics module. */ +/** + * Page callback: Displays statistics for a node. + * -+ * Callback path: node/%node/track -+ * + * @return array + * A render array containing node statistics. If information for the node was -+ * not found, this will deliver a page not found error via drupal_not_found(). ++ * not found, this will deliver a page not found error via ++ * drupal_not_found(). + */ function statistics_node_tracker() { if ($node = node_load(arg(1))) { -@@ -52,6 +61,15 @@ function statistics_node_tracker() { +@@ -52,6 +60,14 @@ function statistics_node_tracker() { } } +/** + * Page callback: Displays statistics for a user. + * -+ * Callback path: user/%user/track/navigation -+ * + * @return array + * A render array containing user statistics. If information for the user was -+ * not found, this will deliver a page not found error via drupal_not_found(). ++ * not found, this will deliver a page not found error via ++ * drupal_not_found(). + */ function statistics_user_tracker() { if ($account = user_load(arg(1))) { diff --git a/core/modules/statistics/statistics.test b/core/modules/statistics/statistics.test -index bf3aeac..68016bc 100644 +index bf3aeac..fb792be 100644 --- a/core/modules/statistics/statistics.test +++ b/core/modules/statistics/statistics.test -@@ -6,7 +6,7 @@ +@@ -2,11 +2,11 @@ + + /** + * @file +- * Tests for statistics.module. ++ * Tests for the Statistics module. */ /** @@ -260,9 +287,12 @@ index bf3aeac..68016bc 100644 */ class StatisticsTestCase extends DrupalWebTestCase { -@@ -48,8 +48,8 @@ class StatisticsTestCase extends DrupalWebTestCase { +@@ -46,10 +46,10 @@ class StatisticsTestCase extends DrupalWebTestCase { + } + /** - * Tests that logging via statistics_exit() works for cached and uncached pages. +- * Tests that logging via statistics_exit() works for cached and uncached pages. ++ * Tests that logging via statistics_exit() works for all pages. * - * Subclass DrupalWebTestCase rather than StatisticsTestCase, because we want - * to test requests from an anonymous user. @@ -285,14 +315,14 @@ index bf3aeac..68016bc 100644 + * + * @var object|FALSE + * -+ * A fully-loaded $user object or FALSE if user creation failed ++ * A fully-loaded $user object, or FALSE if user creation failed. + */ protected $privileged_user; + + /** + * A page (node) to access and then verify the access statistics for it. + * -+ * @var node ++ * @var Object + */ protected $test_node;