Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple git checkout horde-db-migrate from PEAR #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/Horde/Core/Db/Migration.php
Expand Up @@ -68,17 +68,17 @@ public function __construct($basedir = null, $pearconf = null)
// Loop through local framework checkouts.
if ($basedir) {
$path = $basedir . '/*/migration';
$packageFile = new PEAR_PackageFile($pear);
foreach (glob($path) as $dir) {
$package = $packageFile->fromPackageFile(
dirname($dir) . '/package.xml', PEAR_VALIDATE_NORMAL
);
if ($package instanceof PEAR_Error) {
Horde::log(sprintf('%s: %s', $package->getMessage(), print_r($package->getUserInfo(), true)), Horde_Log::ERR);
try {
$package = Horde_Yaml::loadFile($dir . '/../.horde.yml');
} catch (Horde_Yaml_Exception $e) {
Horde::log(sprintf('Horde DB Migration failed loading: %s', $e->getMessage()), Horde_Log::ERR);
continue;
}
$this->apps[] = $package->getName();
$this->_lower[] = Horde_String::lower($package->getName());
// Compat with pear style names. YAML library names do not include Horde_
$name = $package['type'] == 'library' ? 'Horde_' . $package['name'] : $package['name'];
$this->apps[] = $name;
$this->_lower[] = Horde_String::lower($name);
$this->dirs[] = realpath($dir);
}
}
Expand Down