|
From: <be...@us...> - 2014-07-16 17:10:46
|
Revision: 12715
http://sourceforge.net/p/xoops/svn/12715
Author: beckmi
Date: 2014-07-16 17:10:42 +0000 (Wed, 16 Jul 2014)
Log Message:
-----------
adding code to .html template entries from the tpl table
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/include/update.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/include/update.php
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/include/update.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/include/update.php 2014-07-16 14:05:18 UTC (rev 12714)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/pm/include/update.php 2014-07-16 17:10:42 UTC (rev 12715)
@@ -25,7 +25,7 @@
{
if ($oldversion <= 100) {
- GLOBAL $xoopsDB;
+ global $xoopsDB;
// Check pm table version
$sql = "SHOW COLUMNS FROM " . $xoopsDB->prefix("priv_msgs");
if (!$result = $xoopsDB->queryF($sql)) {
@@ -51,12 +51,15 @@
@unlink($templateDirectory . $v);
}
}
- // Load class XoopsFile
+
xoops_load('xoopsfile');
//remove /images directory
$imagesDirectory = XOOPS_ROOT_PATH . "/modules/" . $module->getVar('dirname', 'n') . "/images/";
$folderHandler = XoopsFile::getHandler("folder", $imagesDirectory);
$folderHandler->delete($imagesDirectory);
+ //delete .html entries from the tpl table
+ $sql = "DELETE FROM " . $xoopsDB->prefix("tplfile") . " WHERE `tpl_module` = '" .$module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
+ $xoopsDB->queryF($sql);
}
return true;
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/include/update.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/include/update.php 2014-07-16 14:05:18 UTC (rev 12714)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/modules/profile/include/update.php 2014-07-16 17:10:42 UTC (rev 12715)
@@ -116,7 +116,7 @@
@unlink($templateDirectory . $v);
}
}
- // Load class XoopsFile
+
xoops_load('xoopsfile');
//delete /images directory
$imagesDirectory = XOOPS_ROOT_PATH . "/modules/" . $module->getVar('dirname', 'n') . "/images/";
@@ -126,6 +126,9 @@
$cssFile = XOOPS_ROOT_PATH . "/modules/" . $module->getVar('dirname', 'n') . "/templates/style.css";
$folderHandler = XoopsFile::getHandler("file", $cssFile);
$folderHandler->delete($cssFile);
+ //delete .html entries from the tpl table
+ $sql = "DELETE FROM " . $GLOBALS['xoopsDB']->prefix("tplfile") . " WHERE `tpl_module` = '" .$module->getVar('dirname', 'n') . "' AND `tpl_file` LIKE '%.html%'";
+ $GLOBALS['xoopsDB']->queryF($sql);
}
$profile_handler =& xoops_getModuleHandler("profile", $module->getVar('dirname', 'n'));
|