summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-07-20 18:56:18 +0200
committerRobin Appelman <icewind@owncloud.com>2012-07-20 18:56:18 +0200
commitc9be9ab251681d96cfb620ca26778ba0005023d3 (patch)
tree9546e40b893abf3970ba7554edcf7829d782314d /apps
parent7152b8b4ee2f0d4de640868b614992e8aaf00803 (diff)
downloadnextcloud-server-c9be9ab251681d96cfb620ca26778ba0005023d3.tar.gz
nextcloud-server-c9be9ab251681d96cfb620ca26778ba0005023d3.zip
remove unused variables
Diffstat (limited to 'apps')
-rw-r--r--apps/files_encryption/lib/cryptstream.php3
-rw-r--r--apps/files_external/lib/smb.php2
-rw-r--r--apps/files_external/tests/ftp.php1
-rw-r--r--apps/files_external/tests/google.php1
-rw-r--r--apps/files_external/tests/smb.php1
-rw-r--r--apps/files_external/tests/swift.php1
-rw-r--r--apps/files_external/tests/webdav.php1
-rw-r--r--apps/gallery/lib/album.php2
-rw-r--r--apps/gallery/lib/managers.php1
-rw-r--r--apps/gallery/lib/tiles.php2
-rw-r--r--apps/media/lib_ampache.php1
-rw-r--r--apps/media/lib_collection.php3
-rw-r--r--apps/media/lib_media.php6
-rw-r--r--apps/remoteStorage/lib_remoteStorage.php13
14 files changed, 12 insertions, 26 deletions
diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php
index e0020537563..46471911d94 100644
--- a/apps/files_encryption/lib/cryptstream.php
+++ b/apps/files_encryption/lib/cryptstream.php
@@ -31,9 +31,7 @@ class OC_CryptStream{
public static $sourceStreams=array();
private $source;
private $path;
- private $readBuffer;//for streams that dont support seeking
private $meta=array();//header/meta for source stream
- private $count;
private $writeCache;
private $size;
private static $rootView;
@@ -100,7 +98,6 @@ class OC_CryptStream{
public function stream_write($data){
$length=strlen($data);
- $written=0;
$currentPos=ftell($this->source);
if($this->writeCache){
$data=$this->writeCache.$data;
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 5e34deb2337..8a5e993b1d0 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -15,8 +15,6 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{
private $root;
private $share;
- private static $tempFiles=array();
-
public function __construct($params){
$this->host=$params['host'];
$this->user=$params['user'];
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index 68481b4e66b..97796bca128 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -13,7 +13,6 @@ if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']){
}else{
class Test_Filestorage_FTP extends Test_FileStorage {
private $config;
- private $id;
public function setUp(){
$id=uniqid();
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index 08116f0e748..806db5a6aaa 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -28,7 +28,6 @@ if(!is_array($config) or !isset($config['google']) or !$config['google']['run'])
class Test_Filestorage_Google extends Test_FileStorage {
private $config;
- private $id;
public function setUp(){
$id=uniqid();
diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index e1495b7480d..001ef842276 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -14,7 +14,6 @@ if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']){
}else{
class Test_Filestorage_SMB extends Test_FileStorage {
private $config;
- private $id;
public function setUp(){
$id=uniqid();
diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php
index f0bde6ed605..1520c9473d3 100644
--- a/apps/files_external/tests/swift.php
+++ b/apps/files_external/tests/swift.php
@@ -13,7 +13,6 @@ if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']){
}else{
class Test_Filestorage_SWIFT extends Test_FileStorage {
private $config;
- private $id;
public function setUp(){
$id=uniqid();
diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php
index 144659819b6..14abbef2cbf 100644
--- a/apps/files_external/tests/webdav.php
+++ b/apps/files_external/tests/webdav.php
@@ -13,7 +13,6 @@ if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run'])
}else{
class Test_Filestorage_DAV extends Test_FileStorage {
private $config;
- private $id;
public function setUp(){
$id=uniqid();
diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php
index 39d6d3aded1..701949d4d80 100644
--- a/apps/gallery/lib/album.php
+++ b/apps/gallery/lib/album.php
@@ -58,7 +58,7 @@ class OC_Gallery_Album {
return $stmt->execute($args);
}
- public static function removeByName($owner, $name) { self::remove($ownmer, $name); }
+ public static function removeByName($owner, $name) { self::remove($owner, $name); }
public static function removeByPath($owner, $path) { self::remove($owner, null, $path); }
public static function removeByParentPath($owner, $parent) { self::remove($owner, null, null, $parent); }
diff --git a/apps/gallery/lib/managers.php b/apps/gallery/lib/managers.php
index b6ade3d1b1e..575d962dbe3 100644
--- a/apps/gallery/lib/managers.php
+++ b/apps/gallery/lib/managers.php
@@ -29,7 +29,6 @@ class DatabaseManager {
$stmt = \OCP\DB::prepare('INSERT INTO *PREFIX*pictures_images_cache (uid_owner, path, width, height) VALUES (?, ?, ?, ?)');
$stmt->execute(array(\OCP\USER::getUser(), $path, $width, $height));
$ret = array('path' => $path, 'width' => $width, 'height' => $height);
- unset($image);
$dir = dirname($path);
$this->cache[$dir][$path] = $ret;
return $ret;
diff --git a/apps/gallery/lib/tiles.php b/apps/gallery/lib/tiles.php
index 754734e609e..e36d26d3191 100644
--- a/apps/gallery/lib/tiles.php
+++ b/apps/gallery/lib/tiles.php
@@ -33,7 +33,7 @@ class TilesLine {
}
public function setAvailableSpace($space) {
- $available_space = $space;
+ $this->available_space = $space;
}
public function getTilesCount() {
diff --git a/apps/media/lib_ampache.php b/apps/media/lib_ampache.php
index d35cca150b2..d5a093338cc 100644
--- a/apps/media/lib_ampache.php
+++ b/apps/media/lib_ampache.php
@@ -271,7 +271,6 @@ class OC_MEDIA_AMPACHE{
</root>");
return;
}
- global $SITEROOT;
$filter=$params['filter'];
$albums=OC_MEDIA_COLLECTION::getAlbums($filter);
$artist=OC_MEDIA_COLLECTION::getArtistName($filter);
diff --git a/apps/media/lib_collection.php b/apps/media/lib_collection.php
index e65930f551d..cacab8e959f 100644
--- a/apps/media/lib_collection.php
+++ b/apps/media/lib_collection.php
@@ -27,7 +27,6 @@ class OC_MEDIA_COLLECTION{
public static $uid;
private static $artistIdCache=array();
private static $albumIdCache=array();
- private static $songIdCache=array();
private static $queries=array();
/**
@@ -152,7 +151,7 @@ class OC_MEDIA_COLLECTION{
return $artistId;
}else{
$query=OCP\DB::prepare("INSERT INTO `*PREFIX*media_artists` (`artist_name`) VALUES (?)");
- $result=$query->execute(array($name));
+ $query->execute(array($name));
return self::getArtistId($name);;
}
}
diff --git a/apps/media/lib_media.php b/apps/media/lib_media.php
index 9e687a4af2c..54502f42575 100644
--- a/apps/media/lib_media.php
+++ b/apps/media/lib_media.php
@@ -27,12 +27,12 @@ class OC_MEDIA{
* @param array $params, parameters passed from OC_Hook
*/
public static function loginListener($params){
- if(isset($_POST['user']) and $_POST['password']){
- $name=$_POST['user'];
+ if(isset($params['uid']) and $params['password']){
+ $name=$params['uid'];
$query=OCP\DB::prepare("SELECT user_id from *PREFIX*media_users WHERE user_id LIKE ?");
$uid=$query->execute(array($name))->fetchAll();
if(count($uid)==0){
- $password=hash('sha256',$_POST['password']);
+ $password=hash('sha256',$params['password']);
$query=OCP\DB::prepare("INSERT INTO *PREFIX*media_users (user_id, user_password_sha256) VALUES (?, ?);");
$query->execute(array($name,$password));
}
diff --git a/apps/remoteStorage/lib_remoteStorage.php b/apps/remoteStorage/lib_remoteStorage.php
index 42cd9c90f64..c1765640c5d 100644
--- a/apps/remoteStorage/lib_remoteStorage.php
+++ b/apps/remoteStorage/lib_remoteStorage.php
@@ -17,12 +17,11 @@ class OC_remoteStorage {
$user=OCP\USER::getUser();
$query=OCP\DB::prepare("SELECT token FROM *PREFIX*authtoken WHERE user=? AND appUrl=? AND category=? LIMIT 1");
$result=$query->execute(array($user, $appUrl, $categories));
- $ret = array();
if($row=$result->fetchRow()) {
- return base64_encode('remoteStorage:'.$row['token']);
- } else {
- return false;
- }
+ return base64_encode('remoteStorage:'.$row['token']);
+ } else {
+ return false;
+ }
}
public static function getAllTokens() {
@@ -42,13 +41,13 @@ class OC_remoteStorage {
public static function deleteToken($token) {
$user=OCP\USER::getUser();
$query=OCP\DB::prepare("DELETE FROM *PREFIX*authtoken WHERE token=? AND user=?");
- $result=$query->execute(array($token,$user));
+ $query->execute(array($token,$user));
return 'unknown';//how can we see if any rows were affected?
}
private static function addToken($token, $appUrl, $categories){
$user=OCP\USER::getUser();
$query=OCP\DB::prepare("INSERT INTO *PREFIX*authtoken (`token`,`appUrl`,`user`,`category`) VALUES(?,?,?,?)");
- $result=$query->execute(array($token,$appUrl,$user,$categories));
+ $query->execute(array($token,$appUrl,$user,$categories));
}
public static function createCategories($appUrl, $categories) {
$token=uniqid();