summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@karoshi.org.uk>2015-04-19 12:38:29 +0100
committerRobin McCorkell <rmccorkell@karoshi.org.uk>2015-04-19 12:38:29 +0100
commit80b892e7ed7b2d6b5220840e1bb3b11115c72cb4 (patch)
treece9cfafbda8db5e727a707c73ec78fdd617d3510
parentfd3c1484ad19f3fa59fe7c1f53d365b9d61ca4e9 (diff)
parentccf47f40aac167f25b7537b3819b99d6c59bc92e (diff)
downloadnextcloud-server-80b892e7ed7b2d6b5220840e1bb3b11115c72cb4.tar.gz
nextcloud-server-80b892e7ed7b2d6b5220840e1bb3b11115c72cb4.zip
Merge pull request #15729 from owncloud/remove-unused-variables
Remove unused variables
-rw-r--r--lib/private/appframework/http/request.php3
-rw-r--r--lib/private/helper.php1
-rw-r--r--lib/private/l10n.php3
-rw-r--r--lib/private/ocs/cloud.php2
-rw-r--r--lib/private/ocs/config.php2
-rw-r--r--lib/private/ocs/person.php2
-rw-r--r--lib/private/setup/mssql.php4
-rw-r--r--lib/private/share/hooks.php2
-rw-r--r--lib/private/subadmin.php8
-rw-r--r--lib/private/tags.php4
-rw-r--r--lib/public/files.php2
-rw-r--r--lib/repair/repairlegacystorages.php2
12 files changed, 14 insertions, 21 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php
index 002c1151adc..eb2a118a0f6 100644
--- a/lib/private/appframework/http/request.php
+++ b/lib/private/appframework/http/request.php
@@ -238,7 +238,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
case 'params':
case 'urlParams':
if(in_array($name, array('put', 'patch'))) {
- return $this->getContent($name);
+ return $this->getContent();
} else {
return isset($this->items[$name])
? $this->items[$name]
@@ -252,7 +252,6 @@ class Request implements \ArrayAccess, \Countable, IRequest {
return isset($this[$name])
? $this[$name]
: null;
- break;
}
}
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 11311d7c55f..35c5147e2fa 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -978,7 +978,6 @@ class OC_Helper {
$quota = OC_Util::getUserQuota(\OCP\User::getUser());
if ($quota !== \OCP\Files\FileInfo::SPACE_UNLIMITED) {
// always get free space / total space from root + mount points
- $path = '';
return self::getGlobalStorageInfo();
}
}
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index 59f26423afa..b070a299a16 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -391,13 +391,10 @@ class OC_L10N implements \OCP\IL10N {
switch($type) {
case 'date':
return Punic\Calendar::formatDate($value, $width, $locale);
- break;
case 'datetime':
return Punic\Calendar::formatDatetime($value, $width, $locale);
- break;
case 'time':
return Punic\Calendar::formatTime($value, $width, $locale);
- break;
default:
return false;
}
diff --git a/lib/private/ocs/cloud.php b/lib/private/ocs/cloud.php
index 8d3ed1f1cb4..f662bde2858 100644
--- a/lib/private/ocs/cloud.php
+++ b/lib/private/ocs/cloud.php
@@ -25,7 +25,7 @@
class OC_OCS_Cloud {
- public static function getCapabilities($parameters) {
+ public static function getCapabilities() {
$result = array();
list($major, $minor, $micro) = OC_Util::getVersion();
$result['version'] = array(
diff --git a/lib/private/ocs/config.php b/lib/private/ocs/config.php
index 295da5b01d3..fc9640b6cc4 100644
--- a/lib/private/ocs/config.php
+++ b/lib/private/ocs/config.php
@@ -23,7 +23,7 @@
class OC_OCS_Config {
- public static function apiConfig($parameters) {
+ public static function apiConfig() {
$xml['version'] = '1.7';
$xml['website'] = 'ownCloud';
$xml['host'] = OCP\Util::getServerHost();
diff --git a/lib/private/ocs/person.php b/lib/private/ocs/person.php
index 0e0d75305d1..0059982c55e 100644
--- a/lib/private/ocs/person.php
+++ b/lib/private/ocs/person.php
@@ -23,7 +23,7 @@
class OC_OCS_Person {
- public static function check($parameters) {
+ public static function check() {
$login = isset($_POST['login']) ? $_POST['login'] : false;
$password = isset($_POST['password']) ? $_POST['password'] : false;
if($login && $password) {
diff --git a/lib/private/setup/mssql.php b/lib/private/setup/mssql.php
index 8a4904b9243..f8815259af4 100644
--- a/lib/private/setup/mssql.php
+++ b/lib/private/setup/mssql.php
@@ -32,11 +32,9 @@ class MSSQL extends AbstractDatabase {
$masterConnection = @sqlsrv_connect($this->dbhost, $masterConnectionInfo);
if(!$masterConnection) {
- $entry = null;
+ $entry = '';
if( ($errors = sqlsrv_errors() ) != null) {
$entry='DB Error: "'.print_r(sqlsrv_errors()).'"<br />';
- } else {
- $entry = '';
}
throw new \OC\DatabaseSetupException($this->trans->t('MS SQL username and/or password not valid: %s', array($entry)),
$this->trans->t('You need to enter either an existing account or the administrator.'));
diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php
index 968a2d5c19b..6eff4cc246f 100644
--- a/lib/private/share/hooks.php
+++ b/lib/private/share/hooks.php
@@ -32,7 +32,7 @@ class Hooks extends \OC\Share\Constants {
// Delete any items shared with the deleted user
$query = \OC_DB::prepare('DELETE FROM `*PREFIX*share`'
.' WHERE `share_with` = ? AND `share_type` = ? OR `share_type` = ?');
- $result = $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique));
+ $query->execute(array($arguments['uid'], self::SHARE_TYPE_USER, self::$shareTypeGroupUserUnique));
// Delete any items the deleted user shared
$query = \OC_DB::prepare('SELECT `id` FROM `*PREFIX*share` WHERE `uid_owner` = ?');
$result = $query->execute(array($arguments['uid']));
diff --git a/lib/private/subadmin.php b/lib/private/subadmin.php
index 10ef87bac18..ec4f9f3b899 100644
--- a/lib/private/subadmin.php
+++ b/lib/private/subadmin.php
@@ -43,7 +43,7 @@ class OC_SubAdmin{
*/
public static function createSubAdmin($uid, $gid) {
$stmt = OC_DB::prepare('INSERT INTO `*PREFIX*group_admin` (`gid`,`uid`) VALUES(?,?)');
- $result = $stmt->execute(array($gid, $uid));
+ $stmt->execute(array($gid, $uid));
OC_Hook::emit( "OC_SubAdmin", "post_createSubAdmin", array( "gid" => $gid ));
return true;
}
@@ -56,7 +56,7 @@ class OC_SubAdmin{
*/
public static function deleteSubAdmin($uid, $gid) {
$stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `gid` = ? AND `uid` = ?');
- $result = $stmt->execute(array($gid, $uid));
+ $stmt->execute(array($gid, $uid));
OC_Hook::emit( "OC_SubAdmin", "post_deleteSubAdmin", array( "gid" => $gid ));
return true;
}
@@ -177,7 +177,7 @@ class OC_SubAdmin{
*/
public static function post_deleteUser($parameters) {
$stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `uid` = ?');
- $result = $stmt->execute(array($parameters['uid']));
+ $stmt->execute(array($parameters['uid']));
return true;
}
@@ -188,7 +188,7 @@ class OC_SubAdmin{
*/
public static function post_deleteGroup($parameters) {
$stmt = OC_DB::prepare('DELETE FROM `*PREFIX*group_admin` WHERE `gid` = ?');
- $result = $stmt->execute(array($parameters['gid']));
+ $stmt->execute(array($parameters['gid']));
return true;
}
}
diff --git a/lib/private/tags.php b/lib/private/tags.php
index 84ee5c98dfd..6edd7b2f980 100644
--- a/lib/private/tags.php
+++ b/lib/private/tags.php
@@ -228,9 +228,9 @@ class Tags implements \OCP\ITags {
while ($row = $result->fetch()) {
$objId = (int)$row['objid'];
if (!isset($entries[$objId])) {
- $entry = $entries[$objId] = array();
+ $entries[$objId] = array();
}
- $entry = $entries[$objId][] = $row['category'];
+ $entries[$objId][] = $row['category'];
}
if (\OCP\DB::isError($result)) {
\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage(), \OCP\Util::ERROR);
diff --git a/lib/public/files.php b/lib/public/files.php
index 57747a4c354..5de7f242976 100644
--- a/lib/public/files.php
+++ b/lib/public/files.php
@@ -81,7 +81,7 @@ class Files {
* @since 5.0.0
*/
public static function streamCopy( $source, $target ) {
- list($count, $result) = \OC_Helper::streamCopy( $source, $target );
+ list($count, ) = \OC_Helper::streamCopy( $source, $target );
return $count;
}
diff --git a/lib/repair/repairlegacystorages.php b/lib/repair/repairlegacystorages.php
index 7086f2a8d2d..1bc49678f0d 100644
--- a/lib/repair/repairlegacystorages.php
+++ b/lib/repair/repairlegacystorages.php
@@ -102,7 +102,7 @@ class RepairLegacyStorages extends BasicEmitter {
$newNumericId = (int)$newNumericId;
// try and resolve the conflict
// check which one of "local::" or "home::" needs to be kept
- $result = $this->findStorageInCacheStatement->execute(array($oldNumericId, $newNumericId));
+ $this->findStorageInCacheStatement->execute(array($oldNumericId, $newNumericId));
$row1 = $this->findStorageInCacheStatement->fetch();
$row2 = $this->findStorageInCacheStatement->fetch();
$this->findStorageInCacheStatement->closeCursor();