removed spaces at the end of lines
This commit is contained in:
parent
97ee005462
commit
afb8e58dbc
@ -5,20 +5,20 @@
|
|||||||
*
|
*
|
||||||
* @author Frank Karlitschek
|
* @author Frank Karlitschek
|
||||||
* @copyright 2013-2014 Frank Karlitschek frank@owncloud.org
|
* @copyright 2013-2014 Frank Karlitschek frank@owncloud.org
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
* version 3 of the License, or any later version.
|
* version 3 of the License, or any later version.
|
||||||
*
|
*
|
||||||
* This library is distributed in the hope that it will be useful,
|
* This library is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public
|
* You should have received a copy of the GNU Affero General Public
|
||||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -38,10 +38,10 @@ class Storage {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function resolvePath($fileId){
|
public static function resolvePath($fileId){
|
||||||
$list = array_filter(
|
$list = array_filter(
|
||||||
self::searchDocuments(),
|
self::searchDocuments(),
|
||||||
@ -55,7 +55,7 @@ class Storage {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Cleanup session data on removing the document
|
* @brief Cleanup session data on removing the document
|
||||||
* @param array
|
* @param array
|
||||||
@ -65,19 +65,19 @@ class Storage {
|
|||||||
*/
|
*/
|
||||||
public static function onDelete($params) {
|
public static function onDelete($params) {
|
||||||
$info = \OC\Files\Filesystem::getFileInfo($params['path']);
|
$info = \OC\Files\Filesystem::getFileInfo($params['path']);
|
||||||
|
|
||||||
$fileId = @$info['fileid'];
|
$fileId = @$info['fileid'];
|
||||||
if (!$fileId){
|
if (!$fileId){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$session = new Db\Session();
|
$session = new Db\Session();
|
||||||
$session->loadBy('file_id', $fileId);
|
$session->loadBy('file_id', $fileId);
|
||||||
|
|
||||||
if (!$session->getEsId()){
|
if (!$session->getEsId()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$member = new Db\Member();
|
$member = new Db\Member();
|
||||||
$sessionMembers = $member->getCollectionBy('es_id', $session->getEsId());
|
$sessionMembers = $member->getCollectionBy('es_id', $session->getEsId());
|
||||||
foreach ($sessionMembers as $memberData){
|
foreach ($sessionMembers as $memberData){
|
||||||
@ -85,10 +85,10 @@ class Storage {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Db\Session::cleanUp($session->getEsId());
|
Db\Session::cleanUp($session->getEsId());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function searchDocuments(){
|
protected static function searchDocuments(){
|
||||||
$documents = array();
|
$documents = array();
|
||||||
foreach (self::getSupportedMimetypes() as $mime){
|
foreach (self::getSupportedMimetypes() as $mime){
|
||||||
@ -96,7 +96,7 @@ class Storage {
|
|||||||
}
|
}
|
||||||
return $documents;
|
return $documents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getSupportedMimetypes(){
|
public static function getSupportedMimetypes(){
|
||||||
return array_merge(
|
return array_merge(
|
||||||
array(self::MIMETYPE_LIBREOFFICE_WORDPROCESSOR),
|
array(self::MIMETYPE_LIBREOFFICE_WORDPROCESSOR),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user