-# this file is used if you configure your scuttle for nice urls
+#####################################
+# the first part of this file is used if you configure your scuttle for nice urls
# (see $cleanurls in config.inc.php)
+#####################################
#Options +FollowSymlinks
#RewriteEngine On
#RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L] #option 2
</IfModule>
+
+
+#####################################
+# This second part is used to speed-up the application
+#####################################
+
+
+
require_once('header.inc.php');
+
+/* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
$userservice =& ServiceFactory::getServiceInstance('UserService');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+/* Managing possible inputs */
+isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
+isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
+isset($_GET['sort']) ? define('GET_SORT', $_GET['sort']): define('GET_SORT', '');
+//isset($_GET['popup']) ? define('GET_POPUP', $_GET['popup']): define('GET_SORT', '');
+
+
+// Logout action
$tplvars = array();
-if (isset($_GET['action'])){
- if ($_GET['action'] == "logout") {
- $userservice->logout();
- $tplvars['msg'] = T_('You have now logged out');
- }
+if (GET_ACTION == "logout") {
+ $userservice->logout();
+ $tplvars['msg'] = T_('You have now logged out');
}
+
// Header variables
$tplVars['loadjs'] = true;
$tplVars['rsschannels'] = array(
// Pagination
$perpage = getPerPageCount();
-if (isset($_GET['page']) && intval($_GET['page']) > 1) {
- $page = $_GET['page'];
+if (intval(GET_PAGE) > 1) {
+ $page = GET_PAGE;
$start = ($page - 1) * $perpage;
} else {
$page = 0;
<?php
+
+/* Service creation: only useful services are created */
$userservice =& ServiceFactory::getServiceInstance('UserService');
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
$tagservice =& ServiceFactory::getServiceInstance('TagService');
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
+
+
$logged_on_userid = $userservice->getCurrentUserId();
$currentUser = $userservice->getCurrentUser();
$currentUsername = $currentUser[$userservice->getFieldName('username')];