diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-07-26 21:29:44 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-07-26 21:29:44 -0400 |
commit | ff3140052aa49fd0c58ef9c855c8bf93e8d4654a (patch) | |
tree | df6aeb8ccd4b2b656dabfddc0521d5391d8375f8 /lib | |
parent | 1ec0b6ecc151f9701a0a8c4873c6b06ff3586136 (diff) | |
parent | 344b7f548b2dd0510612478b7e5402a39a368026 (diff) | |
download | nextcloud-server-ff3140052aa49fd0c58ef9c855c8bf93e8d4654a.tar.gz nextcloud-server-ff3140052aa49fd0c58ef9c855c8bf93e8d4654a.zip |
Merge branch 'master' into sharing
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 |