summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/css/styles.css9
-rw-r--r--lib/private/group/database.php4
-rw-r--r--lib/private/ocsclient.php29
-rw-r--r--lib/private/setup/oci.php14
-rw-r--r--lib/private/user/database.php4
-rw-r--r--settings/templates/personal.php3
6 files changed, 45 insertions, 18 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 7e41e904127..08ffaa72e10 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -736,9 +736,16 @@ code { font-family:"Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono
font-weight: normal;
white-space: nowrap;
border-bottom-left-radius: 3px;
- border-top-left-radius: 3px; }
+ border-top-left-radius: 3px;
+ min-width: 1%;
+ max-width: 100%;
+}
#quotatext {padding:.6em 1em;}
+#quota div.quota-warning {
+ background-color: #fc4;
+}
+
.pager { list-style:none; float:right; display:inline; margin:.7em 13em 0 0; }
.pager li { display:inline-block; }
diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index 8d6ea1f50a5..e6a5565b20e 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -168,7 +168,7 @@ class OC_Group_Database extends OC_Group_Backend {
* Returns a list with all groups
*/
public function getGroups($search = '', $limit = null, $offset = null) {
- $stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` LIKE ?', $limit, $offset);
+ $stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` LIKE ? ORDER BY `gid` ASC', $limit, $offset);
$result = $stmt->execute(array('%' . $search . '%'));
$groups = array();
while ($row = $result->fetchRow()) {
@@ -200,7 +200,7 @@ class OC_Group_Database extends OC_Group_Backend {
* @return array an array of user ids
*/
public function usersInGroup($gid, $search = '', $limit = null, $offset = null) {
- $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?',
+ $stmt = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ? ORDER BY `uid` ASC',
$limit,
$offset);
$result = $stmt->execute(array($gid, '%'.$search.'%'));
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index e4cce6b2260..dc147dea0c9 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -29,6 +29,18 @@
class OC_OCSClient{
/**
+ * Returns whether the AppStore is enabled (i.e. because the AppStore is disabled for EE)
+ * @return bool
+ */
+ protected static function isAppstoreEnabled() {
+ if(OC::$server->getConfig()->getSystemValue('appstoreenabled', true) === false OR OC_Util::getEditionString() !== '') {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
* Get the url of the OCS AppStore server.
* @return string of the AppStore server
*
@@ -36,16 +48,9 @@ class OC_OCSClient{
* to set it in the config file or it will fallback to the default
*/
private static function getAppStoreURL() {
- if(OC_Util::getEditionString()===''){
- $default='https://api.owncloud.com/v1';
- }else{
- $default='';
- }
- $url = OC_Config::getValue('appstoreurl', $default);
- return($url);
+ return OC::$server->getConfig()->getSystemValue('appstoreurl', 'https://api.owncloud.com/v1');
}
-
/**
* Get the content of an OCS url call.
* @return string of the response
@@ -64,7 +69,7 @@ class OC_OCSClient{
* This function returns a list of all the application categories on the OCS server
*/
public static function getCategories() {
- if(OC_Config::getValue('appstoreenabled', true)==false) {
+ if(!self::isAppstoreEnabled()) {
return null;
}
$url=OC_OCSClient::getAppStoreURL().'/content/categories';
@@ -100,7 +105,7 @@ class OC_OCSClient{
* @param string $filter
*/
public static function getApplications($categories, $page, $filter) {
- if(OC_Config::getValue('appstoreenabled', true)==false) {
+ if(!self::isAppstoreEnabled()) {
return(array());
}
@@ -155,7 +160,7 @@ class OC_OCSClient{
* This function returns an applications from the OCS server
*/
public static function getApplication($id) {
- if(OC_Config::getValue('appstoreenabled', true)==false) {
+ if(!self::isAppstoreEnabled()) {
return null;
}
$url=OC_OCSClient::getAppStoreURL().'/content/data/'.urlencode($id);
@@ -203,7 +208,7 @@ class OC_OCSClient{
* @param integer $item
*/
public static function getApplicationDownload($id, $item) {
- if(OC_Config::getValue('appstoreenabled', true)==false) {
+ if(!self::isAppstoreEnabled()) {
return null;
}
$url=OC_OCSClient::getAppStoreURL().'/content/download/'.urlencode($id).'/'.urlencode($item);
diff --git a/lib/private/setup/oci.php b/lib/private/setup/oci.php
index 24863b9e38a..23b5232438a 100644
--- a/lib/private/setup/oci.php
+++ b/lib/private/setup/oci.php
@@ -14,9 +14,23 @@ class OCI extends AbstractDatabase {
} else {
$this->dbtablespace = 'USERS';
}
+ // allow empty hostname for oracle
+ $this->dbhost = $config['dbhost'];
+ \OC_Config::setValue('dbhost', $this->dbhost);
\OC_Config::setValue('dbtablespace', $this->dbtablespace);
}
+ public function validate($config) {
+ $errors = array();
+ if(empty($config['dbuser'])) {
+ $errors[] = $this->trans->t("%s enter the database username.", array($this->dbprettyname));
+ }
+ if(empty($config['dbname'])) {
+ $errors[] = $this->trans->t("%s enter the database name.", array($this->dbprettyname));
+ }
+ return $errors;
+ }
+
public function setupDatabase($username) {
$e_host = addslashes($this->dbhost);
$e_dbname = addslashes($this->dbname);
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index e9844f0f79c..3a76adbe763 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -157,7 +157,7 @@ class OC_User_Database extends OC_User_Backend {
$displayNames = array();
$query = OC_DB::prepare('SELECT `uid`, `displayname` FROM `*PREFIX*users`'
. ' WHERE LOWER(`displayname`) LIKE LOWER(?) OR '
- . 'LOWER(`uid`) LIKE LOWER(?)', $limit, $offset);
+ . 'LOWER(`uid`) LIKE LOWER(?) ORDER BY `uid` ASC', $limit, $offset);
$result = $query->execute(array('%' . $search . '%', '%' . $search . '%'));
$users = array();
while ($row = $result->fetchRow()) {
@@ -231,7 +231,7 @@ class OC_User_Database extends OC_User_Backend {
* Get a list of all users.
*/
public function getUsers($search = '', $limit = null, $offset = null) {
- $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?)', $limit, $offset);
+ $query = OC_DB::prepare('SELECT `uid` FROM `*PREFIX*users` WHERE LOWER(`uid`) LIKE LOWER(?) ORDER BY `uid` ASC', $limit, $offset);
$result = $query->execute(array('%' . $search . '%'));
$users = array();
while ($row = $result->fetchRow()) {
diff --git a/settings/templates/personal.php b/settings/templates/personal.php
index 661c242ea6b..c1fb20dce05 100644
--- a/settings/templates/personal.php
+++ b/settings/templates/personal.php
@@ -34,7 +34,8 @@
<div id="quota" class="section">
- <div style="width:<?php p($_['usage_relative']);?>%;">
+ <div style="width:<?php p($_['usage_relative']);?>%"
+ <?php if($_['usage_relative'] > 80): ?> class="quota-warning" <?php endif; ?>>
<p id="quotatext">
<?php print_unescaped($l->t('You have used <strong>%s</strong> of the available <strong>%s</strong>',
array($_['usage'], $_['total_space'])));?>