summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-06-22 16:17:23 +0000
committerTom Needham <needham.thomas@gmail.com>2012-06-22 16:17:23 +0000
commit41cfd55f5501dc90a96d0e1812fbb197e35955ac (patch)
tree99d209f49ca3e0a935ac27a6cac3f03cf552beb9
parent0aafc717ec676cbedb21443fc05cd5b0496b8b42 (diff)
parentebfc5b2762053960048b4f6a63ddc33482059edd (diff)
downloadnextcloud-server-41cfd55f5501dc90a96d0e1812fbb197e35955ac.tar.gz
nextcloud-server-41cfd55f5501dc90a96d0e1812fbb197e35955ac.zip
Merge branch 'master' of gitorious.org:owncloud/owncloud
-rw-r--r--apps/contacts/thumbnail.php1
-rw-r--r--apps/gallery/ajax/thumbnail.php1
-rw-r--r--apps/gallery/templates/index.php1
-rw-r--r--lib/cache/apc.php8
-rw-r--r--lib/connector/sabre/auth.php2
-rw-r--r--lib/json.php10
-rwxr-xr-xlib/util.php7
-rw-r--r--settings/js/log.js2
8 files changed, 27 insertions, 5 deletions
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index da4e930f3e5..8378507163e 100644
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
//OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('contacts');
+session_close_write();
function getStandardImage(){
//OCP\Response::setExpiresHeader('P10D');
diff --git a/apps/gallery/ajax/thumbnail.php b/apps/gallery/ajax/thumbnail.php
index 4fc9eba992d..5bf1d420dc4 100644
--- a/apps/gallery/ajax/thumbnail.php
+++ b/apps/gallery/ajax/thumbnail.php
@@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('gallery');
+session_write_close();
require_once('apps/gallery/lib/managers.php');
diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php
index 037e53059d1..c3b4a178545 100644
--- a/apps/gallery/templates/index.php
+++ b/apps/gallery/templates/index.php
@@ -26,6 +26,7 @@ $(document).ready(function() {
</div>
<div id="gallerycontent">
<?php
+session_write_close();
echo $_['tl']->get();
diff --git a/lib/cache/apc.php b/lib/cache/apc.php
index f814afbe494..b1ce87f5267 100644
--- a/lib/cache/apc.php
+++ b/lib/cache/apc.php
@@ -44,3 +44,11 @@ class OC_Cache_APC {
}
}
}
+if(!function_exists('apc_exists')) {
+ function apc_exists($keys)
+ {
+ $result;
+ apc_fetch($keys, $result);
+ return $result;
+ }
+}
diff --git a/lib/connector/sabre/auth.php b/lib/connector/sabre/auth.php
index 1c7a84f0f2a..ee680391626 100644
--- a/lib/connector/sabre/auth.php
+++ b/lib/connector/sabre/auth.php
@@ -33,7 +33,7 @@ class OC_Connector_Sabre_Auth extends Sabre_DAV_Auth_Backend_AbstractBasic {
protected function validateUserPass($username, $password){
OC_Util::setUpFS();//login hooks may need early access to the filesystem
if(OC_User::login($username,$password)){
- OC_Util::setUpFS();
+ OC_Util::setUpFS($username);
return true;
}
else{
diff --git a/lib/json.php b/lib/json.php
index dfc0a7b894e..4eab4fce9f6 100644
--- a/lib/json.php
+++ b/lib/json.php
@@ -82,6 +82,15 @@ class OC_JSON{
}
/**
+ * Convert OC_L10N_String to string, for use in json encodings
+ */
+ protected static function to_string(&$value){
+ if ($value instanceof OC_L10N_String) {
+ $value = (string)$value;
+ }
+ }
+
+ /**
* Encode and print $data in json format
*/
public static function encodedPrint($data,$setContentType=true){
@@ -89,6 +98,7 @@ class OC_JSON{
if($setContentType){
self::setContentTypeHeader();
}
+ array_walk_recursive($data, array('OC_JSON', 'to_string'));
echo json_encode($data);
}
}
diff --git a/lib/util.php b/lib/util.php
index 50955ebb87f..0d9f4129442 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -426,10 +426,11 @@ class OC_Util {
/**
* @brief Public function to sanitize HTML
*
- * This function is used to sanitize HTML and should be applied on any string or array of strings before displaying it on a web page.
+ * This function is used to sanitize HTML and should be applied on any
+ * string or array of strings before displaying it on a web page.
*
* @param string or array of strings
- * @return array with sanitized strings or a single sinitized string, depends on the input parameter.
+ * @return array with sanitized strings or a single sanitized string, depends on the input parameter.
*/
public static function sanitizeHTML( &$value ){
if (is_array($value) || is_object($value)) array_walk_recursive($value,'OC_Util::sanitizeHTML');
@@ -439,7 +440,7 @@ class OC_Util {
/**
- * Check if the htaccess file is working buy creating a test file in the data directory and trying to access via http
+ * Check if the htaccess file is working by creating a test file in the data directory and trying to access via http
*/
public static function ishtaccessworking() {
diff --git a/settings/js/log.js b/settings/js/log.js
index 6063c7d9a9f..fe2e92f7a86 100644
--- a/settings/js/log.js
+++ b/settings/js/log.js
@@ -39,7 +39,7 @@ OC.Log={
row.append(appTd);
var messageTd=$('<td/>');
- messageTd.text(entry.message);
+ messageTd.html(entry.message);
row.append(messageTd);
var timeTd=$('<td/>');