View | Details | Raw Unified | Return to bug 6076 | Differences between
and this patch

Collapse All | Expand All

(-)a/classes/install/Install.inc.php (-23 lines)
 Lines 128-156   class Install extends PKPInstall { Link Here 
128
				$emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename($locale));
128
				$emailTemplateDao->installEmailTemplateData($emailTemplateDao->getMainEmailTemplateDataFilename($locale));
129
			}
129
			}
130
130
131
			// Add initial plugin data to versions table
132
			$versionDao =& DAORegistry::getDAO('VersionDAO');
133
			import('lib.pkp.classes.site.VersionCheck');
134
			$categories = PluginRegistry::getCategories();
135
			foreach ($categories as $category) {
136
				PluginRegistry::loadCategory($category);
137
				$plugins = PluginRegistry::getPlugins($category);
138
				foreach ($plugins as $plugin) {
139
					$versionFile = $plugin->getPluginPath() . '/version.xml';
140
141
					if (FileManager::fileExists($versionFile)) {
142
						$versionInfo =& VersionCheck::parseVersionXML($versionFile);
143
						$pluginVersion = $versionInfo['version'];
144
					}  else {
145
						$pluginVersion = new Version(
146
							1, 0, 0, 0, Core::getCurrentDate(), 1,
147
							'plugins.'.$category, basename($plugin->getPluginPath()), '', 0, $plugin->isSitePlugin()
148
						);
149
					}
150
					$versionDao->insertVersion($pluginVersion, true);
151
				}
152
			}
153
154
			// Install filters and filter templates.
131
			// Install filters and filter templates.
155
			$this->installFilterTemplates();
132
			$this->installFilterTemplates();
156
		}
133
		}
(-)a/classes/install/Upgrade.inc.php (-30 lines)
 Lines 715-750   class Upgrade extends Installer { Link Here 
715
	}
715
	}
716
716
717
	/**
717
	/**
718
	 * For 2.3 upgrade:  Add initial plugin data to versions table
719
	 * @return boolean
720
	 */
721
	function addPluginVersions() {
722
		$versionDao =& DAORegistry::getDAO('VersionDAO');
723
		import('lib.pkp.classes.site.VersionCheck');
724
		$categories = PluginRegistry::getCategories();
725
		foreach ($categories as $category) {
726
			PluginRegistry::loadCategory($category);
727
			$plugins = PluginRegistry::getPlugins($category);
728
			if (is_array($plugins)) foreach ($plugins as $plugin) {
729
				$versionFile = $plugin->getPluginPath() . '/version.xml';
730
731
				if (FileManager::fileExists($versionFile)) {
732
					$versionInfo =& VersionCheck::parseVersionXML($versionFile);
733
					$pluginVersion = $versionInfo['version'];
734
				} else {
735
					$pluginVersion = new Version(
736
						1, 0, 0, 0, Core::getCurrentDate(), 1,
737
						'plugins.'.$category, basename($plugin->getPluginPath()), '', 0
738
					);
739
				}
740
				$versionDao->insertVersion($pluginVersion, true);
741
			}
742
		}
743
744
		return true;
745
	}
746
747
	/**
748
	 * For 2.3.3 upgrade:  Migrate reviewing interests from free text to controlled vocab structure
718
	 * For 2.3.3 upgrade:  Migrate reviewing interests from free text to controlled vocab structure
749
	 * @return boolean
719
	 * @return boolean
750
	 */
720
	 */
(-)a/dbscripts/xml/install.xml (+1 lines)
 Lines 34-37    Link Here 
34
	<!-- Other install tasks -->
34
	<!-- Other install tasks -->
35
	<code function="createData"/>
35
	<code function="createData"/>
36
	<code function="createConfig"/>
36
	<code function="createConfig"/>
37
	<code function="addPluginVersions"/>
37
</install>
38
</install>
(-)a/dbscripts/xml/upgrade.xml (-1 / +3 lines)
 Lines 204-210    Link Here 
204
		<data file="dbscripts/xml/upgrade/2.3.0_subscription_ip2.xml" />
204
		<data file="dbscripts/xml/upgrade/2.3.0_subscription_ip2.xml" />
205
	</upgrade>
205
	</upgrade>
206
206
207
208
	<upgrade minversion="2.0.0.0" maxversion="2.3.0.0">
207
	<upgrade minversion="2.0.0.0" maxversion="2.3.0.0">
209
		<note file="docs/release-notes/README-2.3.1" />
208
		<note file="docs/release-notes/README-2.3.1" />
210
	</upgrade>
209
	</upgrade>
 Lines 221-224    Link Here 
221
		<data file="dbscripts/xml/upgrade/2.3.3_update.xml" />
220
		<data file="dbscripts/xml/upgrade/2.3.3_update.xml" />
222
		<note file="docs/release-notes/README-2.3.3" />
221
		<note file="docs/release-notes/README-2.3.3" />
223
	</upgrade>
222
	</upgrade>
223
224
	<!-- update plugin configuration - should be done as the final upgrade task -->
225
	<code function="addPluginVersions" />
224
</install>
226
</install>

Return to bug 6076