|
From: <be...@us...> - 2013-09-17 12:12:05
|
Revision: 12064
http://sourceforge.net/p/xoops/svn/12064
Author: beckmi
Date: 2013-09-17 12:12:00 +0000 (Tue, 17 Sep 2013)
Log Message:
-----------
re-added link to individual module's Admin after "Update" (was accidentally overwritten in previous commit)
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/main.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/xoops_version.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/main.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/main.php 2013-09-16 18:46:15 UTC (rev 12063)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/admin/modulesadmin/main.php 2013-09-17 12:12:00 UTC (rev 12064)
@@ -239,7 +239,7 @@
$modifs_mods = array();
$module = empty($_POST['module']) ? array() : $_POST['module'];
foreach ($module as $mid) {
- $mid = (int)$mid;
+ $mid = (int) $mid;
$modifs_mods[$i]['mid'] = $mid;
$modifs_mods[$i]['oldname'] = $myts->htmlspecialchars($myts->stripSlashesGPC($oldname[$mid]));
$modifs_mods[$i]['newname'] = $myts->htmlspecialchars(trim($myts->stripslashesGPC($newname[$mid])));
@@ -544,13 +544,13 @@
$tplfile_handler =& xoops_gethandler('tplfile');
// irmtfan bug fix: remove codes for delete templates
/*
- $deltpl = $tplfile_handler->find('default', 'module', $module->getVar('mid'));
- $delng = array();
+ $deltpl = $tplfile_handler->find('default', 'module', $module->getVar('mid'));
+ $delng = array();
if (is_array($deltpl)) {
// delete template file entry in db
$dcount = count($deltpl);
for ($i = 0; $i < $dcount; $i++) {
- if ( !$tplfile_handler->delete( $deltpl[$i] ) ) {
+ if (!$tplfile_handler->delete($deltpl[$i])) {
$delng[] = $deltpl[$i]->getVar('tpl_file');
}
}
@@ -564,7 +564,7 @@
$tpl['file'] = trim($tpl['file']);
// START irmtfan solve templates duplicate issue
// if (!in_array($tpl['file'], $delng)) { // irmtfan bug fix: remove codes for delete templates
- $type = (isset($tpl['type']) ? $tpl['type'] : 'module');
+ $type = (isset($tpl['type']) ? $tpl['type'] : 'module');
if (preg_match("/\.css$/i", $tpl['file'])) {
$type = 'css';
}
@@ -576,44 +576,44 @@
$criteria->add(new Criteria("tpl_type", $type), "AND");
$tplfiles = $tplfile_handler->getObjects($criteria);
- $tpldata =& xoops_module_gettemplate($dirname, $tpl['file'], $type);
+ $tpldata =& xoops_module_gettemplate($dirname, $tpl['file'], $type);
$tplfile = empty($tplfiles) ? $tplfile_handler->create() : $tplfiles[0];
// END irmtfan solve templates duplicate issue
- $tplfile->setVar('tpl_refid', $newmid);
- $tplfile->setVar('tpl_lastimported', 0);
- $tplfile->setVar('tpl_lastmodified', time());
- $tplfile->setVar('tpl_type', $type);
- $tplfile->setVar('tpl_source', $tpldata, true);
- $tplfile->setVar('tpl_module', $dirname);
- $tplfile->setVar('tpl_tplset', 'default');
- $tplfile->setVar('tpl_file', $tpl['file'], true);
- $tplfile->setVar('tpl_desc', $tpl['description'], true);
- if (!$tplfile_handler->insert($tplfile)) {
- $msgs[] = ' <span style="color:#ff0000;">' . sprintf(
- _AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR,
- "<strong>" . $tpl['file'] . "</strong>"
- ) . '</span>';
- } else {
- $newid = $tplfile->getVar('tpl_id');
- $msgs[] = ' ' . sprintf(
- _AM_SYSTEM_MODULES_TEMPLATE_INSERT_DATA,
- "<strong>" . $tpl['file'] . "</strong>"
- );
- if ($xoopsConfig['template_set'] == 'default') {
- if (!xoops_template_touch($newid)) {
- $msgs[] = ' <span style="color:#ff0000;">' . sprintf(
- _AM_SYSTEM_MODULES_TEMPLATE_RECOMPILE_ERROR,
- "<strong>" . $tpl['file'] . "</strong>"
- ) . '</span>';
- } else {
- $msgs[] = ' <span>' . sprintf(
- _AM_SYSTEM_MODULES_TEMPLATE_RECOMPILE,
- "<strong>" . $tpl['file'] . "</strong>"
- ) . '</span>';
+ $tplfile->setVar('tpl_refid', $newmid);
+ $tplfile->setVar('tpl_lastimported', 0);
+ $tplfile->setVar('tpl_lastmodified', time());
+ $tplfile->setVar('tpl_type', $type);
+ $tplfile->setVar('tpl_source', $tpldata, true);
+ $tplfile->setVar('tpl_module', $dirname);
+ $tplfile->setVar('tpl_tplset', 'default');
+ $tplfile->setVar('tpl_file', $tpl['file'], true);
+ $tplfile->setVar('tpl_desc', $tpl['description'], true);
+ if (!$tplfile_handler->insert($tplfile)) {
+ $msgs[] = ' <span style="color:#ff0000;">' . sprintf(
+ _AM_SYSTEM_MODULES_TEMPLATE_ADD_ERROR,
+ "<strong>" . $tpl['file'] . "</strong>"
+ ) . '</span>';
+ } else {
+ $newid = $tplfile->getVar('tpl_id');
+ $msgs[] = ' ' . sprintf(
+ _AM_SYSTEM_MODULES_TEMPLATE_INSERT_DATA,
+ "<strong>" . $tpl['file'] . "</strong>"
+ );
+ if ($xoopsConfig['template_set'] == 'default') {
+ if (!xoops_template_touch($newid)) {
+ $msgs[] = ' <span style="color:#ff0000;">' . sprintf(
+ _AM_SYSTEM_MODULES_TEMPLATE_RECOMPILE_ERROR,
+ "<strong>" . $tpl['file'] . "</strong>"
+ ) . '</span>';
+ } else {
+ $msgs[] = ' <span>' . sprintf(
+ _AM_SYSTEM_MODULES_TEMPLATE_RECOMPILE,
+ "<strong>" . $tpl['file'] . "</strong>"
+ ) . '</span>';
+ }
}
}
- }
- unset($tpldata);
+ unset($tpldata);
// irmtfan bug fix: remove codes for delete templates
/*
} else {
@@ -1101,6 +1101,7 @@
$msgs[] = sprintf(_AM_SYSTEM_MODULES_OKUPD, '<strong>' . $module->getVar('name', 's') . '</strong>');
$msgs[] = '</div></div>';
$msgs[] = '<div class="center"><a href="admin.php?fct=modulesadmin">' . _AM_SYSTEM_MODULES_BTOMADMIN
+ . '</a> | <a href="' . XOOPS_URL . '/modules/' . $module->getInfo('dirname', 'e') . '/' . $module->getInfo('adminindex') . '">' . _AM_SYSTEM_MODULES_ADMIN
. '</a></div>';
foreach ($msgs as $msg) {
echo $msg . '<br />';
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/xoops_version.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/xoops_version.php 2013-09-16 18:46:15 UTC (rev 12063)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/system/xoops_version.php 2013-09-17 12:12:00 UTC (rev 12064)
@@ -452,5 +452,3 @@
$modversion['config'][$i]['formtype'] = 'hidden';
$modversion['config'][$i]['valuetype'] = 'int';
$modversion['config'][$i]['default'] = 0;
-
-?>
\ No newline at end of file
|