summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--data/templates/sscuttlizr/bookmarks.tpl.php1
-rw-r--r--data/templates/sscuttlizr/importStructure.tpl.php10
-rw-r--r--data/templates/sscuttlizr/sidebar.linkedtags.inc.php2
-rw-r--r--src/SemanticScuttle/Service/Bookmark.php6
-rw-r--r--src/SemanticScuttle/Service/User.php20
-rw-r--r--src/SemanticScuttle/header.php10
-rw-r--r--src/php-gettext/gettext.inc12
-rw-r--r--src/php-gettext/gettext.php2
-rw-r--r--src/php-gettext/streams.php6
9 files changed, 40 insertions, 29 deletions
diff --git a/data/templates/sscuttlizr/bookmarks.tpl.php b/data/templates/sscuttlizr/bookmarks.tpl.php
index 217043c..2df30db 100644
--- a/data/templates/sscuttlizr/bookmarks.tpl.php
+++ b/data/templates/sscuttlizr/bookmarks.tpl.php
@@ -511,6 +511,7 @@ if ($currenttag!= '') {
include 'bookmarks-vote-horizontal.inc.tpl.php';
//echo " </div>\n";
echo '<div class="qr-code"></div>';
+ echo " </div>\n";
echo " </li>\n";
}
?>
diff --git a/data/templates/sscuttlizr/importStructure.tpl.php b/data/templates/sscuttlizr/importStructure.tpl.php
index 9c54612..580330a 100644
--- a/data/templates/sscuttlizr/importStructure.tpl.php
+++ b/data/templates/sscuttlizr/importStructure.tpl.php
@@ -24,11 +24,11 @@ $this->includeTemplate($GLOBALS['top_include']);
<p><?php echo T_('Create your structure into a simple text file and following this model:');?></p>
<ul>
<li>firstTagOfLevel1</li>
- <li>&nbsp;&nbsp;&nbsp;&nbsp;firstTagOfLevel2 <i>(the line starts with two spaces)</i></li>
- <li>&nbsp;&nbsp;&nbsp;&nbsp;secondTagOfLevel2</li>
- <li>&nbsp;&nbsp;&nbsp;&nbsp;thirdTagOfLevel2</li>
+ <li>&#160;&#160;&#160;&#160;firstTagOfLevel2 <i>(the line starts with two spaces)</i></li>
+ <li>&#160;&#160;&#160;&#160;secondTagOfLevel2</li>
+ <li>&#160;&#160;&#160;&#160;thirdTagOfLevel2</li>
<li>secondTagOfLevel1</li>
- <li>&nbsp;&nbsp;&nbsp;&nbsp;fourthTagOfLevel2 <i>(included into secondTagOfLevel1)</i></li>
+ <li>&#160;&#160;&#160;&#160;fourthTagOfLevel2 <i>(included into secondTagOfLevel1)</i></li>
</ul>
</li>
<li>
@@ -39,4 +39,4 @@ $this->includeTemplate($GLOBALS['top_include']);
<?php
$this->includeTemplate($GLOBALS['bottom_include']);
-?> \ No newline at end of file
+?>
diff --git a/data/templates/sscuttlizr/sidebar.linkedtags.inc.php b/data/templates/sscuttlizr/sidebar.linkedtags.inc.php
index 020d0f0..aef00f0 100644
--- a/data/templates/sscuttlizr/sidebar.linkedtags.inc.php
+++ b/data/templates/sscuttlizr/sidebar.linkedtags.inc.php
@@ -28,7 +28,7 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
$output.= '<td></td>';
$output.= '<td>';
$output.= $level == 1?'<b>':'';
- $output.= str_repeat('&nbsp;', $level*2) .$link.'<a href="'. sprintf($cat_url, filter($user, 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>';
+ $output.= str_repeat('&#160;', $level*2) .$link.'<a href="'. sprintf($cat_url, filter($user, 'url'), filter($tag, 'url')) .'" rel="tag">'. filter($tag) .'</a>';
$output.= $level == 1?'</b>':'';
//$output.= ' - '. $tagstatservice->getMaxDepth($tag, $linkType, $uId);
diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php
index 39ec4f0..17f91b1 100644
--- a/src/SemanticScuttle/Service/Bookmark.php
+++ b/src/SemanticScuttle/Service/Bookmark.php
@@ -504,7 +504,9 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
'bPrivateNote' => $privateNote,
'bStatus' => intval($status),
'bHash' => $this->getHash($address),
- 'bShort' => $short
+ 'bShort' => $short,
+ 'bVotes' => 0,
+ 'bVoting' => 0,
);
$sql = 'INSERT INTO '. $this->getTableName()
@@ -1136,7 +1138,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
// Delete final /
if (substr($address, -1) == '/') {
- $address = substr($address, 0, strlen($address)-2);
+ $address = substr($address, 0, -1);
}
return $address;
diff --git a/src/SemanticScuttle/Service/User.php b/src/SemanticScuttle/Service/User.php
index 917c7c9..68e8c11 100644
--- a/src/SemanticScuttle/Service/User.php
+++ b/src/SemanticScuttle/Service/User.php
@@ -103,7 +103,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
GENERAL_ERROR, 'Could not get user',
'', __LINE__, __FILE__, $query, $this->db
);
- return false;
+ return [ 'uId' => 0,
+ 'username' => '',
+ 'name' => '',
+ 'email' => '',
+ 'homepage' => '',
+ 'content' => '',
+ 'datetime' => NULL,
+ 'isAdmin' => false,
+ 'privateKeey' => '' ];
}
$row = $this->db->sql_fetchrow($dbresult);
@@ -111,7 +119,15 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
if ($row) {
return $row;
} else {
- return false;
+ return [ 'uId' => 0,
+ 'username' => '',
+ 'name' => '',
+ 'email' => '',
+ 'homepage' => '',
+ 'content' => '',
+ 'datetime' => NULL,
+ 'isAdmin' => false,
+ 'privateKeey' => '' ];
}
}
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index 562ae43..bbe35bc 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -158,15 +158,7 @@ $tplVars['userservice'] = $userservice;
if (!defined('UNIT_TEST_MODE') || defined('HTTP_UNIT_TEST_MODE')) {
//API files define that, so we need a way to support both of them
if (!isset($httpContentType)) {
- if (DEBUG_MODE) {
- //using that mime type makes all javascript nice in Chromium
- // it also serves as test base if the pages really validate
- $httpContentType = 'application/xhtml+xml';
- } else {
- //until we are sure that all pages validate, we
- // keep the non-strict mode on for normal installations
- $httpContentType = 'text/html';
- }
+ $httpContentType = 'text/html';
}
if ($httpContentType !== false) {
header('Content-Type: ' . $httpContentType . '; charset=utf-8');
diff --git a/src/php-gettext/gettext.inc b/src/php-gettext/gettext.inc
index 399a0f2..b61cbce 100644
--- a/src/php-gettext/gettext.inc
+++ b/src/php-gettext/gettext.inc
@@ -89,18 +89,18 @@ function get_list_of_locales($locale) {
if ($modifier) {
if ($country) {
if ($charset)
- array_push($locale_names, "${lang}_$country.$charset@$modifier");
- array_push($locale_names, "${lang}_$country@$modifier");
+ array_push($locale_names, "{$lang}_$country.$charset@$modifier");
+ array_push($locale_names, "{$lang}_$country@$modifier");
} elseif ($charset)
- array_push($locale_names, "${lang}.$charset@$modifier");
+ array_push($locale_names, "{$lang}.$charset@$modifier");
array_push($locale_names, "$lang@$modifier");
}
if ($country) {
if ($charset)
- array_push($locale_names, "${lang}_$country.$charset");
- array_push($locale_names, "${lang}_$country");
+ array_push($locale_names, "{$lang}_$country.$charset");
+ array_push($locale_names, "{$lang}_$country");
} elseif ($charset)
- array_push($locale_names, "${lang}.$charset");
+ array_push($locale_names, "{$lang}.$charset");
array_push($locale_names, $lang);
}
diff --git a/src/php-gettext/gettext.php b/src/php-gettext/gettext.php
index a121f9c..5b3886e 100644
--- a/src/php-gettext/gettext.php
+++ b/src/php-gettext/gettext.php
@@ -98,7 +98,7 @@ class gettext_reader {
* @param object Reader the StreamReader object
* @param boolean enable_cache Enable or disable caching of strings (default on)
*/
- function gettext_reader($Reader, $enable_cache = true) {
+ function __construct($Reader, $enable_cache = true) {
// If there isn't a StreamReader, turn on short circuit mode.
if (! $Reader || isset($Reader->error) ) {
$this->short_circuit = true;
diff --git a/src/php-gettext/streams.php b/src/php-gettext/streams.php
index 3cdc158..ab94719 100644
--- a/src/php-gettext/streams.php
+++ b/src/php-gettext/streams.php
@@ -49,7 +49,7 @@ class StringReader {
var $_pos;
var $_str;
- function StringReader($str='') {
+ public function __construct($str='') {
$this->_str = $str;
$this->_pos = 0;
}
@@ -86,7 +86,7 @@ class FileReader {
var $_fd;
var $_length;
- function FileReader($filename) {
+ public function __construct($filename) {
if (file_exists($filename)) {
$this->_length=filesize($filename);
@@ -143,7 +143,7 @@ class FileReader {
// Preloads entire file in memory first, then creates a StringReader
// over it (it assumes knowledge of StringReader internals)
class CachedFileReader extends StringReader {
- function CachedFileReader($filename) {
+ public function __construct($filename) {
if (file_exists($filename)) {
$length=filesize($filename);