Merge pull request #23848 from stweil/master

lib: Fix typos (found by codespell)
This commit is contained in:
Thomas Müller 2016-04-08 14:51:23 +02:00
commit 6fb1008e1b
29 changed files with 36 additions and 36 deletions

View File

@ -417,7 +417,7 @@ class OC {
$session = $cryptoWrapper->wrapSession($session); $session = $cryptoWrapper->wrapSession($session);
self::$server->setSession($session); self::$server->setSession($session);
// if session cant be started break with http 500 error // if session can't be started break with http 500 error
} catch (Exception $e) { } catch (Exception $e) {
\OCP\Util::logException('base', $e); \OCP\Util::logException('base', $e);
//show the user a detailed error page //show the user a detailed error page
@ -788,7 +788,7 @@ class OC {
protected static function registerAutoloaderCache() { protected static function registerAutoloaderCache() {
// The class loader takes an optional low-latency cache, which MUST be // The class loader takes an optional low-latency cache, which MUST be
// namespaced. The instanceid is used for namespacing, but might be // namespaced. The instanceid is used for namespacing, but might be
// unavailable at this point. Futhermore, it might not be possible to // unavailable at this point. Furthermore, it might not be possible to
// generate an instanceid via \OC_Util::getInstanceId() because the // generate an instanceid via \OC_Util::getInstanceId() because the
// config file may not be writable. As such, we only register a class // config file may not be writable. As such, we only register a class
// loader cache if instanceid is available without trying to create one. // loader cache if instanceid is available without trying to create one.

View File

@ -97,7 +97,7 @@ class DependencyAnalyzer {
* @return bool result similar to version_compare * @return bool result similar to version_compare
*/ */
private function compare($first, $second, $operator) { private function compare($first, $second, $operator) {
// we cant normalize versions if one of the given parameters is not a // we can't normalize versions if one of the given parameters is not a
// version string but null. In case one parameter is null normalization // version string but null. In case one parameter is null normalization
// will therefore be skipped // will therefore be skipped
if ($first !== null && $second !== null) { if ($first !== null && $second !== null) {

View File

@ -48,7 +48,7 @@ class Output implements IOutput {
/** /**
* @param string $path * @param string $path
* *
* @return bool false if an error occured * @return bool false if an error occurred
*/ */
public function setReadfile($path) { public function setReadfile($path) {
return @readfile($path); return @readfile($path);

View File

@ -107,7 +107,7 @@ class MiddlewareDispatcher {
* @param \Exception $exception the thrown exception * @param \Exception $exception the thrown exception
* @return Response a Response object if the middleware can handle the * @return Response a Response object if the middleware can handle the
* exception * exception
* @throws \Exception the passed in exception if it cant handle it * @throws \Exception the passed in exception if it can't handle it
*/ */
public function afterException(Controller $controller, $methodName, \Exception $exception){ public function afterException(Controller $controller, $methodName, \Exception $exception){
for($i=$this->middlewareCounter-1; $i>=0; $i--){ for($i=$this->middlewareCounter-1; $i>=0; $i--){

View File

@ -36,7 +36,7 @@ use OCP\AppFramework\Middleware;
/** /**
* This middleware sets the correct CORS headers on a response if the * This middleware sets the correct CORS headers on a response if the
* controller has the @CORS annotation. This is needed for webapps that want * controller has the @CORS annotation. This is needed for webapps that want
* to access an API and dont run on the same domain, see * to access an API and don't run on the same domain, see
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS * https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
*/ */
class CORSMiddleware extends Middleware { class CORSMiddleware extends Middleware {
@ -135,7 +135,7 @@ class CORSMiddleware extends Middleware {
* @param string $methodName the name of the method that will be called on * @param string $methodName the name of the method that will be called on
* the controller * the controller
* @param \Exception $exception the thrown exception * @param \Exception $exception the thrown exception
* @throws \Exception the passed in exception if it cant handle it * @throws \Exception the passed in exception if it can't handle it
* @return Response a Response object or null in case that the exception could not be handled * @return Response a Response object or null in case that the exception could not be handled
*/ */
public function afterException($controller, $methodName, \Exception $exception){ public function afterException($controller, $methodName, \Exception $exception){

View File

@ -179,7 +179,7 @@ class SecurityMiddleware extends Middleware {
* @param string $methodName the name of the method that will be called on * @param string $methodName the name of the method that will be called on
* the controller * the controller
* @param \Exception $exception the thrown exception * @param \Exception $exception the thrown exception
* @throws \Exception the passed in exception if it cant handle it * @throws \Exception the passed in exception if it can't handle it
* @return Response a Response object or null in case that the exception could not be handled * @return Response a Response object or null in case that the exception could not be handled
*/ */
public function afterException($controller, $methodName, \Exception $exception) { public function afterException($controller, $methodName, \Exception $exception) {

View File

@ -185,7 +185,7 @@ class OC_Archive_ZIP extends OC_Archive{
if($mode=='r' or $mode=='rb') { if($mode=='r' or $mode=='rb') {
return $this->zip->getStream($path); return $this->zip->getStream($path);
} else { } else {
//since we cant directly get a writable stream, //since we can't directly get a writable stream,
//make a temp copy of the file and put it back //make a temp copy of the file and put it back
//in the archive when the stream is closed //in the archive when the stream is closed
if(strrpos($path, '.')!==false) { if(strrpos($path, '.')!==false) {

View File

@ -72,7 +72,7 @@ class CacheWrapper extends Cache {
* @return ICacheEntry[] * @return ICacheEntry[]
*/ */
public function getFolderContents($folder) { public function getFolderContents($folder) {
// cant do a simple $this->cache->.... call here since getFolderContentsById needs to be called on this // can't do a simple $this->cache->.... call here since getFolderContentsById needs to be called on this
// and not the wrapped cache // and not the wrapped cache
$fileId = $this->getId($folder); $fileId = $this->getId($folder);
return $this->getFolderContentsById($fileId); return $this->getFolderContentsById($fileId);

View File

@ -187,7 +187,7 @@ class Root extends Folder implements IRootFolder {
} }
} }
//most operations cant be done on the root //most operations can't be done on the root
/** /**
* @param string $targetPath * @param string $targetPath

View File

@ -634,7 +634,7 @@ abstract class Common implements Storage, ILockingStorage {
public function getMetaData($path) { public function getMetaData($path) {
$permissions = $this->getPermissions($path); $permissions = $this->getPermissions($path);
if (!$permissions & \OCP\Constants::PERMISSION_READ) { if (!$permissions & \OCP\Constants::PERMISSION_READ) {
//cant read, nothing we can do //can't read, nothing we can do
return null; return null;
} }

View File

@ -225,7 +225,7 @@ class Local extends \OC\Files\Storage\Common {
} }
if ($this->is_dir($path1)) { if ($this->is_dir($path1)) {
// we cant move folders across devices, use copy instead // we can't move folders across devices, use copy instead
$stat1 = stat(dirname($this->getSourcePath($path1))); $stat1 = stat(dirname($this->getSourcePath($path1)));
$stat2 = stat(dirname($this->getSourcePath($path2))); $stat2 = stat(dirname($this->getSourcePath($path2)));
if ($stat1['dev'] !== $stat2['dev']) { if ($stat1['dev'] !== $stat2['dev']) {

View File

@ -76,7 +76,7 @@ trait CopyDirectory {
} }
/** /**
* For adapters that dont support copying folders natively * For adapters that don't support copying folders natively
* *
* @param $source * @param $source
* @param $target * @param $target

View File

@ -32,7 +32,7 @@ use OCP\Constants;
* *
* This can be used to restrict update, create, delete and/or share permissions of a storage * This can be used to restrict update, create, delete and/or share permissions of a storage
* *
* Note that the read permissions cant be masked * Note that the read permissions can't be masked
*/ */
class PermissionsMask extends Wrapper { class PermissionsMask extends Wrapper {
/** /**

View File

@ -742,7 +742,7 @@ class View {
$this->writeUpdate($storage2, $internalPath2); $this->writeUpdate($storage2, $internalPath2);
} else if ($result) { } else if ($result) {
if ($internalPath1 !== '') { // dont do a cache update for moved mounts if ($internalPath1 !== '') { // don't do a cache update for moved mounts
$this->renameUpdate($storage1, $storage2, $internalPath1, $internalPath2); $this->renameUpdate($storage1, $storage2, $internalPath1, $internalPath2);
} }
} }

View File

@ -66,7 +66,7 @@ class OC_Group {
/** /**
* set the group backend * set the group backend
* @param \OC_Group_Backend $backend The backend to use for user managment * @param \OC_Group_Backend $backend The backend to use for user management
* @return bool * @return bool
*/ */
public static function useBackend($backend) { public static function useBackend($backend) {

View File

@ -112,7 +112,7 @@ class Factory implements ICacheFactory {
} }
} }
if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) { if (!($lockingCacheClass && $lockingCacheClass::isAvailable())) {
// dont fallback since the fallback might not be suitable for storing lock // don't fallback since the fallback might not be suitable for storing lock
$lockingCacheClass = self::NULL_CACHE; $lockingCacheClass = self::NULL_CACHE;
} }

View File

@ -122,7 +122,7 @@ class Redis extends Cache implements IMemcacheTTL {
* @return bool * @return bool
*/ */
public function add($key, $value, $ttl = 0) { public function add($key, $value, $ttl = 0) {
// dont encode ints for inc/dec // don't encode ints for inc/dec
if (!is_int($value)) { if (!is_int($value)) {
$value = json_encode($value); $value = json_encode($value);
} }

View File

@ -40,7 +40,7 @@ class OC_Response {
* @param integer $cache_time time to cache the response * @param integer $cache_time time to cache the response
* >0 cache time in seconds * >0 cache time in seconds
* 0 and <0 enable default browser caching * 0 and <0 enable default browser caching
* null cache indefinitly * null cache indefinitely
*/ */
static public function enableCaching($cache_time = null) { static public function enableCaching($cache_time = null) {
if (is_numeric($cache_time)) { if (is_numeric($cache_time)) {
@ -113,7 +113,7 @@ class OC_Response {
} }
/** /**
* Set reponse expire time * Set response expire time
* @param string|DateTime $expires date-time when the response expires * @param string|DateTime $expires date-time when the response expires
* string for DateInterval from now * string for DateInterval from now
* DateTime object when to expire response * DateTime object when to expire response
@ -152,7 +152,7 @@ class OC_Response {
/** /**
* Checks and set Last-Modified header, when the request matches sends a * Checks and set Last-Modified header, when the request matches sends a
* 'not modified' response * 'not modified' response
* @param int|DateTime|string $lastModified time when the reponse was last modified * @param int|DateTime|string $lastModified time when the response was last modified
*/ */
static public function setLastModifiedHeader($lastModified) { static public function setLastModifiedHeader($lastModified) {
if (empty($lastModified)) { if (empty($lastModified)) {

View File

@ -55,7 +55,7 @@ class MySQL extends AbstractDatabase {
try{ try{
$name = $this->dbName; $name = $this->dbName;
$user = $this->dbUser; $user = $this->dbUser;
//we cant use OC_BD functions here because we need to connect as the administrative user. //we can't use OC_BD functions here because we need to connect as the administrative user.
$query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET utf8 COLLATE utf8_bin;"; $query = "CREATE DATABASE IF NOT EXISTS `$name` CHARACTER SET utf8 COLLATE utf8_bin;";
$connection->executeUpdate($query); $connection->executeUpdate($query);

View File

@ -113,7 +113,7 @@ class PostgreSQL extends AbstractDatabase {
} }
private function createDatabase($connection) { private function createDatabase($connection) {
//we cant use OC_BD functions here because we need to connect as the administrative user. //we can't use OC_BD functions here because we need to connect as the administrative user.
$e_name = pg_escape_string($this->dbName); $e_name = pg_escape_string($this->dbName);
$e_user = pg_escape_string($this->dbUser); $e_user = pg_escape_string($this->dbUser);
$query = "select datname from pg_database where datname = '$e_name'"; $query = "select datname from pg_database where datname = '$e_name'";

View File

@ -251,8 +251,8 @@ class TempManager implements ITempManager {
* @return bool * @return bool
*/ */
private function checkTemporaryDirectory($directory) { private function checkTemporaryDirectory($directory) {
// surpress any possible errors caused by is_writable // suppress any possible errors caused by is_writable
// checks missing or invalid path or characters, wrong permissions ect // checks missing or invalid path or characters, wrong permissions etc
try { try {
if (is_writeable($directory)) { if (is_writeable($directory)) {
return true; return true;

View File

@ -440,7 +440,7 @@ class OC_Util {
* generates a path for JS/CSS files. If no application is provided it will create the path for core. * generates a path for JS/CSS files. If no application is provided it will create the path for core.
* *
* @param string $application application to get the files from * @param string $application application to get the files from
* @param string $directory directory withing this application (css, js, vendor, etc) * @param string $directory directory within this application (css, js, vendor, etc)
* @param string $file the file inside of the above folder * @param string $file the file inside of the above folder
* @return string the path * @return string the path
*/ */

View File

@ -45,10 +45,10 @@ abstract class ApiController extends Controller {
* constructor of the controller * constructor of the controller
* @param string $appName the name of the app * @param string $appName the name of the app
* @param IRequest $request an instance of the request * @param IRequest $request an instance of the request
* @param string $corsMethods comma seperated string of HTTP verbs which * @param string $corsMethods comma separated string of HTTP verbs which
* should be allowed for websites or webapps when calling your API, defaults to * should be allowed for websites or webapps when calling your API, defaults to
* 'PUT, POST, GET, DELETE, PATCH' * 'PUT, POST, GET, DELETE, PATCH'
* @param string $corsAllowedHeaders comma seperated string of HTTP headers * @param string $corsAllowedHeaders comma separated string of HTTP headers
* which should be allowed for websites or webapps when calling your API, * which should be allowed for websites or webapps when calling your API,
* defaults to 'Authorization, Content-Type, Accept' * defaults to 'Authorization, Content-Type, Accept'
* @param int $corsMaxAge number in seconds how long a preflighted OPTIONS * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS

View File

@ -39,7 +39,7 @@ interface IOutput {
/** /**
* @param string $path * @param string $path
* *
* @return bool false if an error occured * @return bool false if an error occurred
* @since 8.1.0 * @since 8.1.0
*/ */
public function setReadfile($path); public function setReadfile($path);

View File

@ -67,7 +67,7 @@ abstract class Middleware {
* @param string $methodName the name of the method that will be called on * @param string $methodName the name of the method that will be called on
* the controller * the controller
* @param \Exception $exception the thrown exception * @param \Exception $exception the thrown exception
* @throws \Exception the passed in exception if it cant handle it * @throws \Exception the passed in exception if it can't handle it
* @return Response a Response object in case that the exception was handled * @return Response a Response object in case that the exception was handled
* @since 6.0.0 * @since 6.0.0
*/ */

View File

@ -46,7 +46,7 @@ abstract class OCSController extends ApiController {
* @param string $corsMethods comma separated string of HTTP verbs which * @param string $corsMethods comma separated string of HTTP verbs which
* should be allowed for websites or webapps when calling your API, defaults to * should be allowed for websites or webapps when calling your API, defaults to
* 'PUT, POST, GET, DELETE, PATCH' * 'PUT, POST, GET, DELETE, PATCH'
* @param string $corsAllowedHeaders comma seperated string of HTTP headers * @param string $corsAllowedHeaders comma separated string of HTTP headers
* which should be allowed for websites or webapps when calling your API, * which should be allowed for websites or webapps when calling your API,
* defaults to 'Authorization, Content-Type, Accept' * defaults to 'Authorization, Content-Type, Accept'
* @param int $corsMaxAge number in seconds how long a preflighted OPTIONS * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS

View File

@ -123,7 +123,7 @@ class Files {
/** /**
* Gets the Storage for an app - creates the needed folder if they are not * Gets the Storage for an app - creates the needed folder if they are not
* existant * existent
* @param string $app * @param string $app
* @return \OC\Files\View * @return \OC\Files\View
* @since 5.0.0 * @since 5.0.0

View File

@ -47,7 +47,7 @@ class Response {
* @param int $cache_time time to cache the response * @param int $cache_time time to cache the response
* >0 cache time in seconds * >0 cache time in seconds
* 0 and <0 enable default browser caching * 0 and <0 enable default browser caching
* null cache indefinitly * null cache indefinitely
* @since 4.0.0 * @since 4.0.0
*/ */
static public function enableCaching( $cache_time = null ) { static public function enableCaching( $cache_time = null ) {
@ -57,7 +57,7 @@ class Response {
/** /**
* Checks and set Last-Modified header, when the request matches sends a * Checks and set Last-Modified header, when the request matches sends a
* 'not modified' response * 'not modified' response
* @param string $lastModified time when the reponse was last modified * @param string $lastModified time when the response was last modified
* @since 4.0.0 * @since 4.0.0
*/ */
static public function setLastModifiedHeader( $lastModified ) { static public function setLastModifiedHeader( $lastModified ) {

View File

@ -260,7 +260,7 @@ class Share extends \OC\Share\Constants {
* @return bool|string Returns true on success or false on failure, Returns token on success for links * @return bool|string Returns true on success or false on failure, Returns token on success for links
* @throws \OC\HintException when the share type is remote and the shareWith is invalid * @throws \OC\HintException when the share type is remote and the shareWith is invalid
* @throws \Exception * @throws \Exception
* @since 5.0.0 - parameter $itemSourceName was added in 6.0.0, parameter $expirationDate was added in 7.0.0, paramter $passwordChanged added in 9.0.0 * @since 5.0.0 - parameter $itemSourceName was added in 6.0.0, parameter $expirationDate was added in 7.0.0, parameter $passwordChanged added in 9.0.0
*/ */
public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) { public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null, $passwordChanged = null) {
return \OC\Share\Share::shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName, $expirationDate, $passwordChanged); return \OC\Share\Share::shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName, $expirationDate, $passwordChanged);