Deprecate OC_L10N::get()

This commit is contained in:
Joas Schilling 2015-08-28 12:04:52 +02:00
parent c3c7689b67
commit a12d354762
2 changed files with 4 additions and 7 deletions

View File

@ -81,14 +81,11 @@ class OC_L10N implements \OCP\IL10N {
* get an L10N instance
* @param string $app
* @param string|null $lang
* @return \OC_L10N
* @return \OCP\IL10N
* @deprecated Use \OC::$server->getL10NFactory()->get() instead
*/
public static function get($app, $lang=null) {
if (is_null($lang)) {
return OC::$server->getL10N($app);
} else {
return new \OC_L10N($app, $lang);
}
return \OC::$server->getL10NFactory()->get($app, $lang);
}
/**

View File

@ -100,7 +100,7 @@ interface IL10N {
/**
* The code (en, de, ...) of the language that is used for this OC_L10N object
* The code (en, de, ...) of the language that is used for this IL10N object
*
* @return string language
* @since 7.0.0