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

Collapse All | Expand All

(-)classes/plugins/PKPPlugin.old.inc.php (-3 / +10 lines)
 Lines 543-553    Link Here 
543
544
544
		$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
545
		$emailTemplateDao =& DAORegistry::getDAO('EmailTemplateDAO');
545
		$sql = $emailTemplateDao->installEmailTemplates($this->getInstallEmailTemplatesFile(), true, null, true);
546
		$sql = $emailTemplateDao->installEmailTemplates($this->getInstallEmailTemplatesFile(), true, null, true);
546
		if ($sql) {
547
547
			$result = $installer->executeSQL($sql);
548
		if ($sql === false) {
548
		} else {
549
			// The template file seems to be invalid.
549
			$installer->setError(INSTALLER_ERROR_DB, str_replace('{$file}', $this->getInstallDataFile(), Locale::translate('installer.installParseEmailTemplatesFileError')));
550
			$installer->setError(INSTALLER_ERROR_DB, str_replace('{$file}', $this->getInstallDataFile(), Locale::translate('installer.installParseEmailTemplatesFileError')));
550
			$result = false;
551
			$result = false;
552
		} else {
553
			// Are there any yet uninstalled email templates?
554
			assert(is_array($sql));
555
			if (!empty($sql)) {
556
				// Install templates.
557
				$result = $installer->executeSQL($sql);
558
			}
551
		}
559
		}
552
		return false;
560
		return false;
553
	}
561
	}

Return to bug 6658