Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1069242
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 19, 2:29 PM
Size
4 KB
Mime Type
text/x-diff
Expires
Mon, Jul 21, 2:29 PM (12 h, 59 m)
Engine
blob
Format
Raw Data
Handle
692180
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/RC/core/install/step_templates/choose_modules.tpl
===================================================================
--- branches/RC/core/install/step_templates/choose_modules.tpl (revision 10835)
+++ branches/RC/core/install/step_templates/choose_modules.tpl (revision 10836)
@@ -1,46 +1,58 @@
<?php
ob_start();
?>
<tr class="table-color2">
<td class="text" colspan="2" valign="middle">
<table cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<input type="checkbox" %3$s name="modules[]" id="module_%1$s" value="%1$s"/>
</td>
<td valign="top">
<label for="module_%1$s">%2$s</label>
<div style="font-weight: bold; color: red;">%4$s</div>
</td>
</tr>
</table>
</td>
</tr>
<?php
$module_tpl = ob_get_clean();
$selected = $this->GetVar('modules');
if (!$selected) {
// preselect interface modules
$selected = Array ('kernel', 'proj-base');
}
+ $modules_helper =& $this->Application->recallObject('ModulesHelper');
+ /* @var $modules_helper kModulesHelper */
+
+ $licensed_modules = array_map('strtolower', $modules_helper->_GetModules());
+
$modules = $this->ScanModules();
foreach ($modules as $module) {
$module_version = $this->toolkit->GetMaxModuleVersion($module);
$prerequisites_errors = $this->toolkit->CheckPrerequisites($module . '/', Array ($module_version), 'install');
+ $license_module = $module == 'kernel' ? 'in-portal' : $module;
+
+ if (!in_array(strtolower($license_module), $licensed_modules)) {
+ // when module isn't licensed user can't install it
+ array_unshift($prerequisites_errors, 'Module not licensed');
+ }
+
if ($prerequisites_errors) {
// disable checkbox, when some of prerequisites not passed
$checked = 'disabled';
}
else {
// preserve user selected checked status
$checked = in_array($module, $selected) ? 'checked="checked"' : '';
}
$error_msg = $prerequisites_errors ? implode('<br />', $prerequisites_errors) : '';
echo sprintf($module_tpl, $module, $this->toolkit->getModuleName($module), $checked, $error_msg);
}
?>
\ No newline at end of file
Property changes on: branches/RC/core/install/step_templates/choose_modules.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3.2.1
\ No newline at end of property
+1.3.2.2
\ No newline at end of property
Index: branches/RC/core/install/step_templates/upgrade_modules.tpl
===================================================================
--- branches/RC/core/install/step_templates/upgrade_modules.tpl (revision 10835)
+++ branches/RC/core/install/step_templates/upgrade_modules.tpl (revision 10836)
@@ -1,56 +1,56 @@
<?php
ob_start();
?>
<tr class="table-color2">
<td class="text" colspan="2" valign="middle">
<table cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<input type="checkbox" %3$s name="modules[]" id="module_%1$s" value="%1$s"/>
</td>
<td valign="top">
<label for="module_%1$s">%2$s</label>
<div style="font-weight: bold; color: red;">%4$s</div>
</td>
</tr>
</table>
</td>
</tr>
<?php
$module_tpl = ob_get_clean();
- $selected = $this->GetVar('modules');
+ $selected = $this->GetVar('modules') ? $this->GetVar('modules') : Array ();
$modules = $this->GetUpgradableModules();
foreach ($modules as $module_name => $module_params) {
$module_name = strtolower($module_name);
$upgrade_versions = Array (
$module_params['Version'],
$module_params['ToVersion'],
);
$prerequisites_errors = $this->toolkit->CheckPrerequisites($module_params['Path'], $upgrade_versions, 'upgrade');
$module_title = $this->toolkit->getModuleName($module_name).' ('.$module_params['Version'].' to '.$module_params['ToVersion'].')';
if ($this->Application->isDebugMode()) {
$module_title .= ' [from: '.$module_params['FromVersion'].']';
}
if ($prerequisites_errors) {
// disable checkbox, when some of prerequisites not passed
$checked = 'disabled';
}
else {
// preserve user selected checked status
$checked = in_array($module_name, $selected) ? 'checked="checked"' : '';
}
$error_msg = $prerequisites_errors ? implode('<br />', $prerequisites_errors) : '';
echo sprintf($module_tpl, $module_name, $module_title, $checked, $error_msg);
}
?>
<tr class="table-color1">
<td class="hint" colspan="2" valign="middle">
<img src="incs/img/icon_warning.gif" width="14" height="14" align="absmiddle" />
Your data will be modified during the upgrade. We strongly recommend that you make a backup of your database. Proceed with the upgrade ?
</td>
</tr>
\ No newline at end of file
Property changes on: branches/RC/core/install/step_templates/upgrade_modules.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3.2.2
\ No newline at end of property
+1.3.2.3
\ No newline at end of property
Event Timeline
Log In to Comment