Merge pull request #1187 from owncloud/fixing-unused-and-undefined-in-master
Fixing unused and undefined in master
This commit is contained in:
commit
0da06187f6
18 changed files with 30 additions and 34 deletions
|
@ -6,13 +6,14 @@ $force=isset($_GET['force']) and $_GET['force']=='true';
|
|||
$dir=isset($_GET['dir'])?$_GET['dir']:'';
|
||||
$checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true';
|
||||
|
||||
$eventSource=false;
|
||||
if(!$checkOnly) {
|
||||
$eventSource=new OC_EventSource();
|
||||
}
|
||||
|
||||
session_write_close();
|
||||
|
||||
//create the file cache if necesary
|
||||
//create the file cache if necessary
|
||||
if($force or !OC_FileCache::inCache('')) {
|
||||
if(!$checkOnly) {
|
||||
OCP\DB::beginTransaction();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<fieldset class="personalblock">
|
||||
<legend><strong><?php echo $l->t('Encryption');?></strong></legend>
|
||||
<input type='checkbox'<?php if ($_['encryption_enabled']): ?> checked="checked"<?php endif; ?>
|
||||
id='enable_encryption' ></input>
|
||||
id='enable_encryption' />
|
||||
<label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label><br />
|
||||
<select id='encryption_blacklist' title="<?php echo $l->t('None')?>" multiple="multiple">
|
||||
<?php foreach ($_['blacklist'] as $type): ?>
|
||||
|
|
|
@ -234,12 +234,11 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
|||
$path1=$this->cleanPath($path1);
|
||||
$path2=$this->root.$this->cleanPath($path2);
|
||||
try {
|
||||
$response=$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
|
||||
$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
|
||||
return true;
|
||||
} catch(Exception $e) {
|
||||
echo $e;
|
||||
echo 'fail';
|
||||
var_dump($response);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -248,12 +247,11 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
|||
$path1=$this->cleanPath($path1);
|
||||
$path2=$this->root.$this->cleanPath($path2);
|
||||
try {
|
||||
$response=$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
|
||||
$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
|
||||
return true;
|
||||
} catch(Exception $e) {
|
||||
echo $e;
|
||||
echo 'fail';
|
||||
var_dump($response);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@ $tmpl = new OCP\Template( 'files_versions', 'history', 'user' );
|
|||
if ( isset( $_GET['path'] ) ) {
|
||||
|
||||
$path = $_GET['path'];
|
||||
$path = $path;
|
||||
$tmpl->assign( 'path', $path );
|
||||
$versions = new OCA_Versions\Storage();
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'></input>
|
||||
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'></input>
|
||||
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'></input>
|
||||
<input type='hidden' id='hasOracle' value='<?php echo $_['hasOracle'] ?>'></input>
|
||||
<input type='hidden' id='hasMySQL' value='<?php echo $_['hasMySQL'] ?>'>
|
||||
<input type='hidden' id='hasSQLite' value='<?php echo $_['hasSQLite'] ?>'>
|
||||
<input type='hidden' id='hasPostgreSQL' value='<?php echo $_['hasPostgreSQL'] ?>'>
|
||||
<input type='hidden' id='hasOracle' value='<?php echo $_['hasOracle'] ?>'>
|
||||
<form action="index.php" method="post">
|
||||
<input type="hidden" name="install" value="true" />
|
||||
<?php if(count($_['errors']) > 0): ?>
|
||||
|
|
2
lib/cache/apc.php
vendored
2
lib/cache/apc.php
vendored
|
@ -57,7 +57,7 @@ class OC_Cache_APC {
|
|||
if(!function_exists('apc_exists')) {
|
||||
function apc_exists($keys)
|
||||
{
|
||||
$result;
|
||||
$result=false;
|
||||
apc_fetch($keys, $result);
|
||||
return $result;
|
||||
}
|
||||
|
|
|
@ -655,7 +655,7 @@ class OC_Migrate{
|
|||
$query = OC_DB::prepare( "INSERT INTO `*PREFIX*users` ( `uid`, `password` ) VALUES( ?, ? )" );
|
||||
$result = $query->execute( array( $uid, $hash));
|
||||
if( !$result ) {
|
||||
OC_Log::write('migration', 'Failed to create the new user "'.$uid."");
|
||||
OC_Log::write('migration', 'Failed to create the new user "'.$uid."", OC_Log::ERROR);
|
||||
}
|
||||
return $result ? true : false;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ class OC_Migration_Content{
|
|||
|
||||
// Die if we have an error (error means: bad query, not 0 results!)
|
||||
if( PEAR::isError( $query ) ) {
|
||||
$entry = 'DB Error: "'.$result->getMessage().'"<br />';
|
||||
$entry = 'DB Error: "'.$query->getMessage().'"<br />';
|
||||
$entry .= 'Offending command was: '.$query.'<br />';
|
||||
OC_Log::write( 'migration', $entry, OC_Log::FATAL );
|
||||
return false;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
class OC_OCS_Cloud {
|
||||
|
||||
public static function getSystemWebApps($parameters) {
|
||||
public static function getSystemWebApps() {
|
||||
OC_Util::checkLoggedIn();
|
||||
$apps = OC_App::getEnabledApps();
|
||||
$values = array();
|
||||
|
@ -45,7 +45,7 @@ class OC_OCS_Cloud {
|
|||
if(OC_User::userExists($parameters['user'])) {
|
||||
// calculate the disc space
|
||||
$userDir = '/'.$parameters['user'].'/files';
|
||||
OC_Filesystem::init($useDir);
|
||||
OC_Filesystem::init($userDir);
|
||||
$rootInfo = OC_FileCache::get('');
|
||||
$sharedInfo = OC_FileCache::get('/Shared');
|
||||
$used = $rootInfo['size'] - $sharedInfo['size'];
|
||||
|
|
|
@ -89,7 +89,7 @@ class App {
|
|||
* @param $page string page to be included
|
||||
*/
|
||||
public static function registerPersonal( $app, $page ) {
|
||||
return \OC_App::registerPersonal( $app, $page );
|
||||
\OC_App::registerPersonal( $app, $page );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,7 +98,7 @@ class App {
|
|||
* @param $page string page to be included
|
||||
*/
|
||||
public static function registerAdmin( $app, $page ) {
|
||||
return \OC_App::registerAdmin( $app, $page );
|
||||
\OC_App::registerAdmin( $app, $page );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -125,10 +125,9 @@ class App {
|
|||
/**
|
||||
* @brief Check if the app is enabled, redirects to home if not
|
||||
* @param $app app
|
||||
* @returns true/false
|
||||
*/
|
||||
public static function checkAppEnabled( $app ) {
|
||||
return \OC_Util::checkAppEnabled( $app );
|
||||
\OC_Util::checkAppEnabled( $app );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,9 +38,10 @@ class Files {
|
|||
* @brief Recusive deletion of folders
|
||||
* @param string $dir path to the folder
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
static function rmdirr( $dir ) {
|
||||
\OC_Helper::rmdirr( $dir );
|
||||
return \OC_Helper::rmdirr( $dir );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ class Response {
|
|||
* null cache indefinitly
|
||||
*/
|
||||
static public function enableCaching( $cache_time = null ) {
|
||||
return(\OC_Response::enableCaching( $cache_time ));
|
||||
\OC_Response::enableCaching( $cache_time );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ class Response {
|
|||
* @param string $lastModified time when the reponse was last modified
|
||||
*/
|
||||
static public function setLastModifiedHeader( $lastModified ) {
|
||||
return(\OC_Response::setLastModifiedHeader( $lastModified ));
|
||||
\OC_Response::setLastModifiedHeader( $lastModified );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,7 +59,7 @@ class Response {
|
|||
* @see enableCaching with cache_time = 0
|
||||
*/
|
||||
static public function disableCaching() {
|
||||
return(\OC_Response::disableCaching());
|
||||
\OC_Response::disableCaching();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ class Response {
|
|||
* @param string $etag token to use for modification check
|
||||
*/
|
||||
static public function setETagHeader( $etag ) {
|
||||
return(\OC_Response::setETagHeader( $etag ));
|
||||
\OC_Response::setETagHeader( $etag );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -76,7 +76,7 @@ class Response {
|
|||
* @param string $filepath of file to send
|
||||
*/
|
||||
static public function sendFile( $filepath ) {
|
||||
return(\OC_Response::sendFile( $filepath ));
|
||||
\OC_Response::sendFile( $filepath );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ class Response {
|
|||
* DateTime object when to expire response
|
||||
*/
|
||||
static public function setExpiresHeader( $expires ) {
|
||||
return(\OC_Response::setExpiresHeader( $expires ));
|
||||
\OC_Response::setExpiresHeader( $expires );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -94,6 +94,6 @@ class Response {
|
|||
* @param string $location to redirect to
|
||||
*/
|
||||
static public function redirect( $location ) {
|
||||
return(\OC_Response::redirect( $location ));
|
||||
\OC_Response::redirect( $location );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -748,7 +748,7 @@ class Share {
|
|||
$itemTypes = $collectionTypes;
|
||||
}
|
||||
$placeholders = join(',', array_fill(0, count($itemTypes), '?'));
|
||||
$where .= ' WHERE `item_type` IN ('.$placeholders.'))';
|
||||
$where = ' WHERE `item_type` IN ('.$placeholders.'))';
|
||||
$queryArgs = $itemTypes;
|
||||
} else {
|
||||
$where = ' WHERE `item_type` = ?';
|
||||
|
|
|
@ -298,7 +298,7 @@ class Util {
|
|||
* Todo: Write howto
|
||||
*/
|
||||
public static function callCheck() {
|
||||
return(\OC_Util::callCheck());
|
||||
\OC_Util::callCheck();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,4 +17,4 @@ OC_API::register('get', '/privatedata/getattribute/{app}', array('OC_OCS_Private
|
|||
OC_API::register('get', '/privatedata/getattribute/{app}/{key}', array('OC_OCS_Privatedata', 'get'), 'ocs', OC_API::USER_AUTH);
|
||||
OC_API::register('post', '/privatedata/setattribute/{app}/{key}', array('OC_OCS_Privatedata', 'set'), 'ocs', OC_API::USER_AUTH);
|
||||
OC_API::register('post', '/privatedata/deleteattribute/{app}/{key}', array('OC_OCS_Privatedata', 'delete'), 'ocs', OC_API::USER_AUTH);
|
||||
?>
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ endfor;?>
|
|||
<?php endforeach;?>
|
||||
</table>
|
||||
<?php if ($_['entriesremain']): ?>
|
||||
<input id='moreLog' type='button' value='<?php echo $l->t('More');?>...'></input>
|
||||
<input id='moreLog' type='button' value='<?php echo $l->t('More');?>...'>
|
||||
<?php endif; ?>
|
||||
|
||||
</fieldset>
|
||||
|
|
|
@ -38,4 +38,3 @@ class Test_Filestorage_CommonTest extends Test_FileStorage {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -35,4 +35,3 @@ class Test_Filestorage_Local extends Test_FileStorage {
|
|||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue