diff --git a/api/httpauth.inc.php b/api/httpauth.inc.php index f693d35..d0198fd 100644 --- a/api/httpauth.inc.php +++ b/api/httpauth.inc.php @@ -13,7 +13,6 @@ function authenticate() { } if(!$userservice->isLoggedOn()) { - /* Maybe we have caught authentication data in $_SERVER['REMOTE_USER'] ( Inspired by http://www.yetanothercommunitysystem.com/article-321-regle-comment-utiliser-l-authentification-http-en-php-chez-ovh ) */ if((!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) diff --git a/bookmarks.php b/bookmarks.php index a97fb05..eca291d 100644 --- a/bookmarks.php +++ b/bookmarks.php @@ -209,12 +209,12 @@ if ($templatename == 'editbookmark.tpl') { $tplVars['start'] = $start; $tplVars['bookmarkCount'] = $start + 1; - $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, $userid, $cat, $terms, getSortOrder()); + $bookmarks =& $bookmarkservice->getBookmarks($start, $perpage, $userid, $cat, null, getSortOrder()); $tplVars['total'] = $bookmarks['total']; $tplVars['bookmarks'] =& $bookmarks['bookmarks']; $tplVars['cat_url'] = createURL('bookmarks', '%s/%s'); $tplVars['nav_url'] = createURL('bookmarks', '%s/%s%s'); - if ($user == $currentUsername) { + if ($userservice->isLoggedOn() && $user == $currentUsername) { $title = T_('My Bookmarks') . filter($catTitle); } else { $title = filter($pagetitle); diff --git a/header.inc.php b/header.inc.php index 9d147b0..820b5f9 100644 --- a/header.inc.php +++ b/header.inc.php @@ -3,6 +3,7 @@ ini_set('display_errors', '1'); ini_set('mysql.trace_mode', '0'); error_reporting(E_ALL ^ E_NOTICE); +//error_reporting(E_ALL); define('DEBUG', true); session_start(); @@ -30,4 +31,5 @@ if (!isset($root)) { } $root = 'http://'. $_SERVER['HTTP_HOST'] . $root; } + ?> diff --git a/includes/php-gettext/streams.php b/includes/php-gettext/streams.php index d57aac6..4237de1 100644 --- a/includes/php-gettext/streams.php +++ b/includes/php-gettext/streams.php @@ -108,6 +108,7 @@ class FileReader { // PHP 5.1.1 does not read more than 8192 bytes in one fread() // the discussions at PHP Bugs suggest it's the intended behaviour + $data = ''; while ($bytes > 0) { $chunk = fread($this->_fd, $bytes); $data .= $chunk; @@ -163,4 +164,4 @@ class CachedFileReader extends StringReader { } -?> \ No newline at end of file +?> diff --git a/login.php b/login.php index 4d212a9..f09996e 100644 --- a/login.php +++ b/login.php @@ -25,10 +25,12 @@ $templateservice =& ServiceFactory::getServiceInstance('TemplateService'); $tplVars = array(); +$keeppass = isset($_POST['keeppass'])&&($_POST['keeppass']=='yes')?true:false; + $login = false; if (isset($_POST['submitted']) && isset($_POST['username']) && isset($_POST['password'])) { $posteduser = trim(utf8_strtolower($_POST['username'])); - $login = $userservice->login($posteduser, $_POST['password'], ($_POST['keeppass'] == "yes")); + $login = $userservice->login($posteduser, $_POST['password'], $keeppass); if ($login) { if ($_POST['query']) header('Location: '. createURL('bookmarks', $posteduser .'?'. $_POST['query'])); diff --git a/password.php b/password.php index b7daa70..1763fd2 100644 --- a/password.php +++ b/password.php @@ -24,7 +24,7 @@ $templateservice =& ServiceFactory::getServiceInstance('TemplateService'); $tplVars = array(); // IF SUBMITTED -if ($_POST['submitted']) { +if (isset($_POST['submitted'])) { // NO USERNAME if (!$_POST['username']) { diff --git a/populartags.php b/populartags.php index a51ff68..1b99ca2 100644 --- a/populartags.php +++ b/populartags.php @@ -66,7 +66,7 @@ if (isset($user) && $user != '') { $userid = NULL; } -$tags = $b2tservice->getPopularTags($userid, 150, $logged_on_userid); +$tags = $b2tservice->getPopularTags($userid, 150); $tplVars['tags'] =& $b2tservice->tagCloud($tags, 5, 90, 225, getSortOrder('alphabet_asc')); $tplVars['user'] = $user; diff --git a/register.php b/register.php index 9cd6f39..e60a686 100644 --- a/register.php +++ b/register.php @@ -25,7 +25,7 @@ $templateservice =& ServiceFactory::getServiceInstance('TemplateService'); $tplVars = array(); -if ($_POST['submitted']) { +if (isset($_POST['submitted'])) { $posteduser = trim(utf8_strtolower($_POST['username'])); // Check if form is incomplete diff --git a/search.inc.php b/search.inc.php index 3900535..832a70c 100644 --- a/search.inc.php +++ b/search.inc.php @@ -1,3 +1,10 @@ + + +