[Vtigercrm-commits] [vtiger-commits] r6441 - in /vtigercrm/trunk: Smarty/templates/ include/Ajax/ include/js/ modules/Accounts/ modules/Activities/ modules/Campaigns/ modules/Contacts/ modules/Faq/ modules/HelpDesk/ modules/Leads/ modules/Notes/ modules/Potentials/
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu May 25 23:22:17 EDT 2006
Author: don
Date: Thu May 25 21:21:59 2006
New Revision: 6441
Log:
tag cloud moved to seperate module based files for security reasons
Added:
vtigercrm/trunk/modules/Accounts/TagCloud.php
vtigercrm/trunk/modules/Activities/TagCloud.php
vtigercrm/trunk/modules/Campaigns/TagCloud.php
vtigercrm/trunk/modules/Contacts/TagCloud.php
vtigercrm/trunk/modules/Faq/TagCloud.php
vtigercrm/trunk/modules/HelpDesk/TagCloud.php
vtigercrm/trunk/modules/Leads/TagCloud.php
vtigercrm/trunk/modules/Notes/TagCloud.php
vtigercrm/trunk/modules/Potentials/TagCloud.php
Modified:
vtigercrm/trunk/Smarty/templates/DetailView.tpl
vtigercrm/trunk/include/Ajax/CommonAjax.php
vtigercrm/trunk/include/js/dtlviewajax.js
Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Thu May 25 21:21:59 2006
@@ -316,7 +316,7 @@
{/if}
<script>
-var data = "module={$MODULE}&action={$MODULE}Ajax&ajxaction=GETTAGCLOUD";
+var data = "module={$MODULE}&action={$MODULE}Ajax&file=TagCloud&ajxaction=GETTAGCLOUD";
var ajaxObj = new Ajax(ajaxTagCloudResp);
ajaxObj.process("index.php?",data);
function ajaxTagCloudResp(response)
Modified: vtigercrm/trunk/include/Ajax/CommonAjax.php
==============================================================================
--- vtigercrm/trunk/include/Ajax/CommonAjax.php (original)
+++ vtigercrm/trunk/include/Ajax/CommonAjax.php Thu May 25 21:21:59 2006
@@ -9,52 +9,5 @@
*
********************************************************************************/
-if($ajaxaction == "SAVETAG")
-{
-
- require_once('include/freetag/freetag.class.php');
- global $current_user;
- $crmid = $_REQUEST["recordid"];
- $module = $_REQUEST["module"];
- $tagfields = $_REQUEST["tagfields"];
- $userid = $current_user->id;
- $freetag = new freetag();
- if (isset($_REQUEST["tagfields"]) && trim($_REQUEST["tagfields"]) != "")
- {
- $freetag->tag_object($userid,$crmid,$tagfields,$module);
- $tagcloud = $freetag->get_tag_cloud_html($module);
- echo $tagcloud;
- }
-
-}
-elseif($ajaxaction == 'GETTAGCLOUD')
-{
- require_once('include/freetag/freetag.class.php');
- $freetag = new freetag();
- $module = $_REQUEST["module"];
- $useid = $current_user->id;
- global $adb;
- $query="select * from freetagged_objects where module = '".$module ."'";
- $result=$adb->query($query);
- if($adb->num_rows($result) > 0)
- {
- if(trim($module) != "")
- {
- $tagcloud = $freetag->get_tag_cloud_html($module);
- echo $tagcloud;
- }else
- {
- $tagcloud = $freetag->get_tag_cloud_html();
- echo $tagcloud;
- }
- }
- else
- {
- echo '';
- }
-}
-elseif($_REQUEST['file'] != '')
-{
require_once('modules/'.$_REQUEST['module'].'/'.$_REQUEST['file'].'.php');
-}
?>
Modified: vtigercrm/trunk/include/js/dtlviewajax.js
==============================================================================
--- vtigercrm/trunk/include/js/dtlviewajax.js (original)
+++ vtigercrm/trunk/include/js/dtlviewajax.js Thu May 25 21:21:59 2006
@@ -183,7 +183,7 @@
{
var tagValue = document.getElementById(txtBox).value;
document.getElementById(txtBox).value ='';
- var data = "module=" + module + "&action=" + module + "Ajax&recordid=" + crmId + "&ajxaction=SAVETAG&tagfields=" +tagValue;
+ var data = "module=" + module + "&action=" + module + "Ajax&recordid=" + crmId + "&file=TagCloud&ajxaction=SAVETAG&tagfields=" +tagValue;
var ajaxObj = new Ajax(dtlViewAjaxTagResponse);
ajaxObj.process("index.php?",data);
More information about the vtigercrm-commits
mailing list