]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Move $pager and $page_offset out of App
[friendica.git] / boot.php
index 7fb87ca4eb4391d9c5086c7eefdcf0b2e105b7a1..6b66625c6c0a03b8d689bfdf414e26d8e939612d 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1069,45 +1069,3 @@ function validate_include(&$file)
        // Simply return flag
        return $valid;
 }
-
-/**
- * @brief Get the data which is needed for infinite scroll
- *
- * For invinite scroll we need the page number of the actual page
- * and the the URI where the content of the next page comes from.
- * This data is needed for the js part in main.js.
- * Note: infinite scroll does only work for the network page (module)
- *
- * @param string $module The name of the module (e.g. "network")
- * @return array Of infinite scroll data
- *     'pageno' => $pageno The number of the actual page
- *     'reload_uri' => $reload_uri The URI of the content we have to load
- */
-function infinite_scroll_data($module)
-{
-       if (PConfig::get(local_user(), 'system', 'infinite_scroll')
-               && $module == 'network'
-               && defaults($_GET, 'mode', '') != 'minimal'
-       ) {
-               // get the page number
-               $pageno = defaults($_GET, 'page', 1);
-
-               $reload_uri = "";
-
-               // try to get the uri from which we load the content
-               foreach ($_GET as $param => $value) {
-                       if (($param != "page") && ($param != "q")) {
-                               $reload_uri .= "&" . $param . "=" . urlencode($value);
-                       }
-               }
-
-               $a = get_app();
-               if ($a->page_offset != "" && !strstr($reload_uri, "&offset=")) {
-                       $reload_uri .= "&offset=" . urlencode($a->page_offset);
-               }
-
-               $arr = ["pageno" => $pageno, "reload_uri" => $reload_uri];
-
-               return $arr;
-       }
-}