Merge branch 'master' into privatekey

Conflicts:

	www/gsearch/index.php
This commit is contained in:
Mark Pemberton 2011-02-28 01:44:02 -05:00
commit 71a717b1b3
6 changed files with 41 additions and 52 deletions

View File

@ -208,7 +208,7 @@
<target name="release" depends="check,zip,package,deploy-sf,svntag"
<target name="release" depends="check,zip,package,deploy-sf"
description="Release the version on sourceforge"
>
<!-- meta-target -->
@ -307,17 +307,6 @@
</target>
<target name="svntag"
description="create the svn tag for the current version"
>
<exec
command="svn cp ${svnpath}trunk ${svnpath}/tags/${version} -m 'tag version ${version}'"
escape="false" checkreturn="true"
/>
</target>
<target name="check"
description="Check variables"
>
@ -327,4 +316,4 @@
<fail unless="sffilepath" message="Sourceforge project file path not defined!" />
</target>
</project>
</project>

View File

@ -4,9 +4,6 @@ ChangeLog for SemantiScuttle
0.9X.X - 2010-XX-XX
-------------------
- Fix bug in getTagsForBookmarks() that fetched all tags
- Fix bug #3073215: Updating bookmark time does not work
- Fix bug #3074816: French translation breaks edit javascript
- Fix bug #3111254: Search in my_watchlist results in error
- Show error message on mysqli connection errors
- Implement patch #3059829: update FR_CA translation
- Update php-gettext library to 1.0.10
@ -14,6 +11,15 @@ ChangeLog for SemantiScuttle
- Implement Feature Request #3164013 adding ability to log in vi private key
0.97.2 - 2011-02-17
-------------------
- Fix bug #3178597: Broken link to context in gsearch admin index page
- Fix bug #3074816: French translation breaks edit javascript
- Fix bug #3111254: Search in my_watchlist results in error
- Fix bug #3073215: Updating bookmark time does not work
- Fix bug #3065284: AjaxVote problem with Webkit browsers
0.97.1 - 2010-09-30
-------------------
This is a security release! We do highly recommend to update

4
doc/developers/doc-TODO Normal file
View File

@ -0,0 +1,4 @@
- Which fields are searched?
title, description, private note, username, tags
- What are [isbn] and so for?

View File

@ -253,18 +253,18 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
/**
* Counts bookmarks for a user.
*
* @param integer $uId User ID
* @param string $range Range of bookmarks:
* 'public', 'shared', 'private'
* or 'all'
* @param integer $uId User ID
* @param string $status Bookmark visibility/privacy settings:
* 'public', 'shared', 'private'
* or 'all'
*
* @return integer Number of bookmarks
*/
public function countBookmarks($uId, $range = 'public')
public function countBookmarks($uId, $status = 'public')
{
$sql = 'SELECT COUNT(*) as "0" FROM '. $this->getTableName();
$sql.= ' WHERE uId = ' . intval($uId);
switch ($range) {
switch ($status) {
case 'all':
//no constraints
break;
@ -436,7 +436,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
* @param string $title Bookmark title
* @param string $description Long bookmark description
* @param string $privateNote Private note for the user.
* @param string $status Bookmark visibility:
* @param string $status Bookmark visibility / privacy settings:
* 0 - public
* 1 - shared
* 2 - private
@ -551,7 +551,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
* @param string $title Bookmark title
* @param string $description Long bookmark description
* @param string $privateNote Private note for the user.
* @param string $status Bookmark visibility:
* @param string $status Bookmark visibility / privacy setting:
* 0 - public
* 1 - shared
* 2 - private

View File

@ -1,21 +1,6 @@
<?php
/**
* Google custom search
*
* PHP version 5.
*
* @category Bookmarking
* @package SemanticScuttle
* @author Benjamin Huynh-Kim-Bang <mensonge@users.sourceforge.net>
* @author Christian Weiske <cweiske@cweiske.de>
* @author Eric Dane <ericdane@users.sourceforge.net>
* @license GPL http://www.gnu.org/licenses/gpl.html
* @link http://sourceforge.net/projects/semanticscuttle
*/
<?php require_once '../www-header.php';
require_once '../www-header.php';
if ($GLOBALS['enableGoogleCustomSearch']==false) {
if($GLOBALS['enableGoogleCustomSearch']==false) {
echo "Google Custom Search disabled. You can enable it into the config.php file.";
die;
}
@ -35,22 +20,24 @@ if ($GLOBALS['enableGoogleCustomSearch']==false) {
<input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cref"></script>
<!-- Google CSE Search Box Ends -->
<small>Based on <a href="http://www.google.com/coop/cse/">Google Custom Search</a> over this <a href="<?php echo ROOT ?>api/export_gcs.php">list of websites</a> from <?php echo $GLOBALS['sitename'] ?>.</small>
<br />
<br />
<small><a href="<?php echo ROOT?>"><?php echo T_('Come back to ').$GLOBALS['sitename'] ?>...</a></small>
<?php
if ($userservice->isLoggedOn() && $currentUser->isAdmin()) {
echo '<p><small>';
echo T_('Admin tips: ');
echo T_('To refresh manually Google Custom Search Engine, goes to: ');
echo '<a href="http://www.google.com/coop/cse/cref?cref='.ROOT.'search/context.php">http://www.google.com/coop/cse/cref</a><br/>';
echo T_('If no result appears, check that all the urls are valid in the admin section.');
echo '</small></p>';
}
<?php if($userservice->isLoggedOn() && $currentUser->isAdmin()){
echo '<p><small>';
echo T_('Admin tips: ');
echo T_('To refresh manually Google Custom Search Engine, goes to: ');
echo '<a href="http://www.google.com/coop/cse/cref?cref='
. ROOT . 'gsearch/context.php">http://www.google.com/coop/cse/cref</a>'
. '<br/>';
echo T_('If no result appears, check that all the urls are valid in the admin section.');
echo '</small></p>';
}
?>
</center>

View File

@ -165,7 +165,10 @@ function processVotingResult() {
var bmnode = document.getElementById('bmv-'+bookmark);
bmnode.parentNode.replaceChild(
response.getElementsByTagName('html')[0].firstChild,
xmlhttp.responseXML.importNode(
response.getElementsByTagName('html')[0].firstChild,
true
),
bmnode
);
}