diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Connector/Sabre/locks.php | 2 | ||||
-rw-r--r-- | lib/app.php | 16 | ||||
-rw-r--r-- | lib/base.php | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/lib/Connector/Sabre/locks.php b/lib/Connector/Sabre/locks.php index 8414891b778..4f3eb7bbf52 100644 --- a/lib/Connector/Sabre/locks.php +++ b/lib/Connector/Sabre/locks.php @@ -51,7 +51,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract { // NOTE: the following 10 lines or so could be easily replaced by // pure sql. MySQL's non-standard string concatination prevents us // from doing this though. - $query = 'SELECT * FROM *PREFIX*locks WHERE userid = ? AND ((created + timeout) > CAST(? AS UNSIGNED INTEGER)) AND ((uri = ?)'; + $query = 'SELECT * FROM *PREFIX*locks WHERE userid = ? AND (created + timeout) > ? AND ((uri = ?)'; $params = array(OC_USER::getUser(),time(),$uri); // We need to check locks for every part in the uri. diff --git a/lib/app.php b/lib/app.php index 64704f09bbd..475015f6779 100644 --- a/lib/app.php +++ b/lib/app.php @@ -383,5 +383,21 @@ class OC_APP{ } return $data; } + + /** + * get the id of loaded app + * @return string + */ + public static function getCurrentApp(){ + global $WEBROOT; + $script=substr($_SERVER["SCRIPT_NAME"],strlen($WEBROOT)+1); + $topFolder=substr($script,0,strpos($script,'/')); + if($topFolder=='apps'){ + $length=strlen($topFolder); + return substr($script,$length+1,strpos($script,'/',$length+1)-$length-1); + }else{ + return $topFolder; + } + } } ?>
\ No newline at end of file diff --git a/lib/base.php b/lib/base.php index de0df40fc3f..56706b8f884 100644 --- a/lib/base.php +++ b/lib/base.php @@ -107,10 +107,10 @@ if(!$error and !$RUNTIME_NOSETUPFS ){ } // Add the stuff we need always -OC_UTIL::addScript( "jquery-1.5.min" ); -OC_UTIL::addScript( "jquery-ui-1.8.10.custom.min" ); +OC_UTIL::addScript( "jquery-1.6.2.min" ); +OC_UTIL::addScript( "jquery-ui-1.8.14.custom.min" ); OC_UTIL::addScript( "js" ); -OC_UTIL::addStyle( "jquery-ui-1.8.10.custom" ); +OC_UTIL::addStyle( "jquery-ui-1.8.14.custom" ); OC_UTIL::addStyle( "styles" ); // Load Apps |