includes/functions.php
changeset 741 a216e412c439
parent 720 e2762777b170
child 756 e8cf18383425
--- a/includes/functions.php	Sat Nov 15 18:22:13 2008 -0500
+++ b/includes/functions.php	Sat Nov 15 18:23:25 2008 -0500
@@ -260,6 +260,27 @@
 }
 
 /**
+ * Returns the full page ID string of the main page.
+ * @return string
+ */
+
+function get_main_page($force_logged_in = false)
+{
+  global $db, $session, $paths, $template, $plugins; // Common objects
+  
+  $logged_in = false;
+  if ( is_object($session) && !$force_logged_in )
+  {
+    $logged_in = $session->user_logged_in;
+  }
+  else if ( $force_logged_in )
+  {
+    $logged_in = true;
+  }
+  return $logged_in ? getConfig('main_page_alt', getConfig('main_page')) : getConfig('main_page');
+}
+
+/**
  * Enano replacement for date(). Accounts for individual users' timezone preferences.
  * @param string Date-formatted string
  * @param int Optional - UNIX timestamp value to use. If omitted, the current time is used.