if ($a->module == "stream")
$a->module = "network";
+ // Compatibility with the Firefox App
+ if (($a->module == "users") AND ($a->cmd == "users/sign_in"))
+ $a->module = "login";
+
$privateapps = get_config('config','private_addons');
if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) {
$a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']);
//$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet));
-if (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal")) {
+if (isset($_GET["mode"]) AND (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal"))) {
$doc = new DOMDocument();
$target = new DOMDocument();
}
}
-if ($_GET["mode"] == "raw") {
+if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) {
header("Content-type: text/html; charset=utf-8");
exit;
} elseif (get_pconfig(local_user(),'system','infinite_scroll')
- AND ($_GET["q"] == "network") AND ($_GET["mode"] != "minimal")) {
+ AND ($a->module == "network") AND ($_GET["mode"] != "minimal")) {
if (is_string($_GET["page"]))
$pageno = $_GET["page"];
else
foreach ($_GET AS $param => $value)
if (($param != "page") AND ($param != "q"))
- $reload_uri .= "&".$param."=".$value;
+ $reload_uri .= "&".$param."=".urlencode($value);
+
+ if (($a->page_offset != "") AND !strstr($reload_uri, "&offset="))
+ $reload_uri .= "&offset=".urlencode($a->page_offset);
+
$a->page['htmlhead'] .= <<< EOT
<script type="text/javascript">
header("Content-type: text/html; charset=utf-8");
-if ($_GET["mode"] == "minimal") {
+if (isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) {
//$page['content'] = substr($target->saveHTML(), 6, -8)."\n\n".
// '<div id="conversation-end"></div>'."\n\n";