Merge branch 'master' of gitorious.org:owncloud/owncloud

This commit is contained in:
Tom Needham 2012-06-22 16:17:23 +00:00
commit 41cfd55f55
8 changed files with 27 additions and 5 deletions

View File

@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
//OCP\User::checkLoggedIn();
OCP\App::checkAppEnabled('contacts');
session_close_write();
function getStandardImage(){
//OCP\Response::setExpiresHeader('P10D');

View File

@ -23,6 +23,7 @@
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('gallery');
session_write_close();
require_once('apps/gallery/lib/managers.php');

View File

@ -26,6 +26,7 @@ $(document).ready(function() {
</div>
<div id="gallerycontent">
<?php
session_write_close();
echo $_['tl']->get();

8
lib/cache/apc.php vendored
View File

@ -44,3 +44,11 @@ class OC_Cache_APC {
}
}
}
if(!function_exists('apc_exists')) {
function apc_exists($keys)
{
$result;
apc_fetch($keys, $result);
return $result;
}
}

View File

@ -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{

View File

@ -81,6 +81,15 @@ class OC_JSON{
self::encodedPrint($data);
}
/**
* 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
*/
@ -89,6 +98,7 @@ class OC_JSON{
if($setContentType){
self::setContentTypeHeader();
}
array_walk_recursive($data, array('OC_JSON', 'to_string'));
echo json_encode($data);
}
}

View File

@ -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() {

View File

@ -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/>');