* Repository class for interaction with repositories provided by
* the Distirbution extension and the MediaWiki API.
*
- * @since 0.1
+ * @since 1.17
*
* @ingroup Deployment
*
*
* @param $location String: path to the api of the MediaWiki install providing the repository.
*
- * @since 0.1
+ * @since 1.17
*/
public function __construct( $location ) {
parent::__construct( $location );
/**
* @see PackageRepository::findExtenions
*
- * @since 0.1
+ * @since 1.17
*
* @param $filterType String
* @param $filterValue String
/**
* @see PackageRepository::extensionHasUpdate
*
- * @since 0.1
+ * @since 1.17
*/
public function extensionHasUpdate( $extensionName, $currentVersion ) {
global $wgRepositoryPackageStates;
/**
* @see PackageRepository::coreHasUpdate
*
- * @since 0.1
+ * @since 1.17
*/
public function coreHasUpdate( $currentVersion ) {
global $wgRepositoryPackageStates;
/**
* @see PackageRepository::installationHasUpdates
*
- * @since 0.1
+ * @since 1.17
*/
public function installationHasUpdates( $coreVersion, array $extensions ) {
global $wgRepositoryPackageStates;
}
return $ret;
}
+
+/**
+ * Returns the PackageRepository object for interaction with the package repository.
+ *
+ * TODO: Make the repository type also configurable.
+ *
+ * @since 1.17
+ *
+ * @return PackageRepository
+ */
+function wfGetRepository() {
+ global $wgRepository, $wgRepositoryApiLocation;
+
+ if ( !isset( $wgRepository ) ) {
+ $wgRepository = new DistributionRepository( $wgRepositoryApiLocation );
+ }
+
+ return $wgRepository;
+}
\ No newline at end of file
* Base repository class. Deriving classes handle interaction with
* package repositories of the type they support.
*
- * @since 0.1
+ * @since 1.17
*
* @ingroup Deployment
*
/**
* Base location of the repository.
*
- * @since 0.1
+ * @since 1.17
*
* @var string
*/
/**
* Returns a list of extensions matching the search criteria.
*
- * @since 0.1
+ * @since 1.17
*
* @param $filterType String
* @param $filterValue String
/**
* Checks if newer versions of an extension are available.
*
- * @since 0.1
+ * @since 1.17
*
* @param $extensionName String
* @param $currentVersion String
/**
* Checks if newer versions of MediaWiki is available.
*
- * @since 0.1
+ * @since 1.17
*
* @param $currentVersion String
*
/**
* Checks if there are any updates for this MediaWiki installation and extensions.
*
- * @since 0.1
+ * @since 1.17
*
* @param $coreVersion String
* @param $extensions Array
*
* @param $location String
*
- * @since 0.1
+ * @since 1.17
*/
public function __construct( $location ) {
$this->location = $location;