diff --git a/oss/vtiger/trunk/modules/CustomerPortal/AdvancedSettings.php b/oss/vtiger/trunk/modules/CustomerPortal/AdvancedSettings.php
deleted file mode 100644
index 7a1419e7..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/AdvancedSettings.php
+++ /dev/null
@@ -1,57 +0,0 @@
-id.'.php');
-
-if(!$is_admin) {
- echo "
";
- exit;
-}
-
-$mode = $_REQUEST['mode'];
-if($mode !='' && $mode == 'save') {
- cp_saveAdvancedSettings($_REQUEST);
-}
-$category = getParentTab();
-$smarty = new vtigerCRM_Smarty();
-$smarty->assign("THEME", $theme);
-$smarty->assign('MOD', $mod_strings);
-$smarty->assign('APP', $app_strings);
-$smarty->assign('MODULE', $currentModule);
-$smarty->assign('CATEGORY', $category);
-$smarty->assign('BUTTONS', $list_buttons);
-$smarty->assign('CHECK', $tool_buttons);
-$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
-$smarty->assign('MODULE_VIEWALL',cp_getContactsViewInfo());
-
-$smarty->assign('USERS', cp_getUsers());
-$smarty->assign('USERID',cp_getCurrentUser());
-$smarty->display(vtlib_getModuleTemplate($currentModule,'AdvancedSettings.tpl'));
-?>
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.js b/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.js
deleted file mode 100644
index 3b178630..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*********************************************************************************
- ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
- * ("License"); You may not use this file except in compliance with the License
- * The Original Code is: vtiger CRM Open Source
- * The Initial Developer of the Original Code is vtiger.
- * Portions created by vtiger are Copyright (C) vtiger.
- * All Rights Reserved.
- *
- ********************************************************************************/
-
-function move_module(tabid,move){
-
- //$('vtbusy_info').style.display = "block";
- new Ajax.Request(
- 'index.php',
- {queue: {position: 'end', scope: 'command'},
- method: 'post',
- postBody: 'module=CustomerPortal&action=CustomerPortalAjax&file=ListView&sub_mode=movemodules&parenttab=Settings&tabid='+tabid+'&move='+move+'&ajax=true',
- onComplete: function(response) {
- $("portallist").innerHTML=response.responseText;
- //$('vtbusy_info').style.display = "none";
- }
- }
- );
-}
-
-function toggleModule(tabid, action) {
-var data = 'module=CustomerPortal&action=CustomerPortalAjax&file=ListView&tabid='+tabid+'&sub_mode=enable_disable&status='+action;
-new Ajax.Request(
- 'index.php',
- {queue: {position: 'end', scope: 'command'},
- method: 'post',
- postBody: data,
- onComplete: function(response) {
- // Reload the page to apply the effect of module setting
- window.location.href = "index.php?module=CustomerPortal&action=index&parenttab=Settings";
- }
- }
- );
-}
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.php b/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.php
deleted file mode 100644
index 3dec9d33..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortal.php
+++ /dev/null
@@ -1,70 +0,0 @@
-pquery($query,array());
- $tabseq = $adb->query_result($res,0,'max_tabseq');
- $i = ++$tabseq;
- foreach($portalmodules as $modules) {
- ++$i;
- $tabid = getTabid($modules);
- $adb->query("INSERT INTO vtiger_customerportal_tabs (tabid,visible,sequence) VALUES ($tabid,1,$i)");
- }
- for($j = 0; $j< count($portalmodules); $j++) {
- $tabid = getTabid($portalmodules[$j]);
- $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES ($tabid,'showrelatedinfo',1)");
- }
-
- $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (0,'userid',1)");
-
- // Mark the module as Standard module
- $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName));
-
- $fieldid = $adb->getUniqueID('vtiger_settings_field');
- $blockid = getSettingsBlockId('LBL_OTHER_SETTINGS');
- $seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid));
- if ($adb->num_rows($seq_res) > 0) {
- $cur_seq = $adb->query_result($seq_res, 0, 'max_seq');
- if ($cur_seq != null) $seq = $cur_seq + 1;
- }
-
- $adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence)
- VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'LBL_CUSTOMER_PORTAL', 'portal_icon.png', 'PORTAL_EXTENSION_DESCRIPTION', 'index.php?module=CustomerPortal&action=index&parenttab=Settings', $seq));
-
-
- } else if($eventType == 'module.disabled') {
- // TODO Handle actions when this module is disabled.
- } else if($eventType == 'module.enabled') {
- // TODO Handle actions when this module is enabled.
- } else if($eventType == 'module.preuninstall') {
- // TODO Handle actions when this module is about to be deleted.
- } else if($eventType == 'module.preupdate') {
- // TODO Handle actions before this module is updated.
- } else if($eventType == 'module.postupdate') {
- // TODO Handle actions after this module is updated.
- }
- }
-}
-?>
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalAjax.php b/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalAjax.php
deleted file mode 100644
index 4529abde..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalAjax.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalHandler.php b/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalHandler.php
deleted file mode 100644
index 729d97fa..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/CustomerPortalHandler.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/ListView.php b/oss/vtiger/trunk/modules/CustomerPortal/ListView.php
deleted file mode 100644
index eb2c13d7..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/ListView.php
+++ /dev/null
@@ -1,76 +0,0 @@
-id.'.php');
-
-if(!$is_admin) {
- echo "";
- exit;
-}
-
-if($_REQUEST['sub_mode'] != '' && isset($_REQUEST['sub_mode'])){
- $sub_mode =$_REQUEST['sub_mode'];
-}
-if($sub_mode == 'movemodules'){
- $tabid = $_REQUEST['tabid'];
- $move = $_REQUEST['move'];
- if($tabid != ''){
- cp_changeTabOrder($tabid,$move);
- }
-}elseif($sub_mode == 'enable_disable') {
- $tabid = $_REQUEST['tabid'];
- $status =$_REQUEST['status'];
- if($status != '' && $tabid != ''){
- cp_changeModuleVisibility($tabid,$status);
- }
-}
-$category = getParentTab();
-$smarty = new vtigerCRM_Smarty();
-$portalmodules = cp_getPortalModuleinfo();
-
-$smarty->assign('PORTALMODULES',$portalmodules);
-$smarty->assign("THEME", $theme);
-$smarty->assign('MOD', $mod_strings);
-$smarty->assign('APP', $app_strings);
-$smarty->assign('MODULE', $currentModule);
-$smarty->assign('CATEGORY', $category);
-$smarty->assign('BUTTONS', $list_buttons);
-$smarty->assign('CHECK', $tool_buttons);
-$smarty->assign('IMAGE_PATH', "themes/$theme/images/");
-$smarty->assign('MODE',$mode);
-if($_REQUEST['ajax'] != true) {
- $smarty->display(vtlib_getModuleTemplate($currentModule,'BasicSetttings.tpl'));
-}
-else {
- $smarty->display(vtlib_getModuleTemplate($currentModule,'BasicSetttingsContents.tpl'));
-}
-?>
\ No newline at end of file
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/PortalUtils.php b/oss/vtiger/trunk/modules/CustomerPortal/PortalUtils.php
deleted file mode 100644
index 99008664..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/PortalUtils.php
+++ /dev/null
@@ -1,136 +0,0 @@
-query("SELECT vtiger_customerportal_tabs.*,vtiger_tab.name from vtiger_customerportal_tabs
- INNER JOIN vtiger_tab ON vtiger_customerportal_tabs.tabid = vtiger_tab.tabid and vtiger_tab.presence = 0
- ORDER BY vtiger_customerportal_tabs.sequence");
- $rows = $adb->num_rows($query);
- for($i = 0;$i < $rows; $i++){
- $portalmodules[$i]['tabid'] = $adb->query_result($query,$i,'tabid');
- $portalmodules[$i]['visible'] = $adb->query_result($query,$i,'visible');
- $portalmodules[$i]['sequence'] = $adb->query_result($query,$i,'sequence');
- $portalmodules[$i]['name'] = $adb->query_result($query,$i,'name');
- }
- return $portalmodules;
-}
-
-/* Function is used to change the order of modules in Customer portal
- *
- */
-function cp_changeTabOrder($tabid,$move) {
- global $adb,$log;
- $log->fatal("$tabid,$move");
- if($move == 'Down'){
- $sequence = $adb->pquery("SELECT sequence FROM vtiger_customerportal_tabs WHERE tabid = ?", array($tabid));
- $oldsequence = $adb->query_result($sequence,0,'sequence');
-
- $nexttab = $adb->pquery("SELECT sequence,tabid FROM vtiger_customerportal_tabs WHERE sequence > ? ORDER BY SEQUENCE LIMIT 0,1", array($oldsequence));
- $newsequence = $adb->query_result($nexttab,0,'sequence');
- $righttabid = $adb->query_result($nexttab,0,'tabid');
-
- $adb->pquery("UPDATE vtiger_customerportal_tabs set sequence=? WHERE tabid = ?", array($newsequence, $tabid));
- $adb->pquery("UPDATE vtiger_customerportal_tabs set sequence=? WHERE tabid = ?", array($oldsequence, $righttabid));
- }elseif ($move == 'Up') {
- $sequence = $adb->pquery("SELECT sequence FROM vtiger_customerportal_tabs WHERE tabid = ?", array($tabid));
- $oldsequence = $adb->query_result($sequence,0,'sequence');
-
- $nexttab = $adb->pquery("SELECT sequence,tabid FROM vtiger_customerportal_tabs WHERE sequence < ? ORDER BY SEQUENCE DESC LIMIT 0,1", array($oldsequence));
- $newsequence = $adb->query_result($nexttab,0,'sequence');
- $lefttabid = $adb->query_result($nexttab,0,'tabid');
-
- $adb->pquery("UPDATE vtiger_customerportal_tabs SET sequence=? WHERE tabid = ?", array($newsequence, $tabid));
- $adb->pquery("UPDATE vtiger_customerportal_tabs SET sequence=? WHERE tabid = ?", array($oldsequence, $lefttabid));
-
- }
-
-}
-
-/* Function to obtain related info for Customer Portal(contacts can see other contacts info ar not)
- */
-
-function cp_getContactsViewInfo() {
- global $adb;
- $relatedinfo = $adb->query("SELECT vtiger_customerportal_prefs.*,vtiger_tab.name FROM vtiger_customerportal_prefs
- INNER JOIN vtiger_tab ON vtiger_tab.tabid = vtiger_customerportal_prefs.tabid
- WHERE prefkey = 'showrelatedinfo' AND vtiger_tab.presence = 0");
- $norows = $adb->num_rows($relatedinfo);
- for($i = 0;$i < $norows;$i++) {
- $module_viewall[$i]['module'] = $adb->query_result($relatedinfo,$i,'name');
- $module_viewall[$i]['value'] = $adb->query_result($relatedinfo,$i,'prefvalue');
- }
- return $module_viewall;
-}
-
-/* Function to show/hide the tabs(modules) in Customer Portal
- */
-function cp_changeModuleVisibility($tabid,$status) {
- global $adb,$log;
- if($status == 'module_disable'){
- $updatevisibility = $adb->pquery("UPDATE vtiger_customerportal_tabs SET visible = 0 WHERE tabid = ?", array($tabid));
- }else {
- $updatevisibility = $adb->pquery("UPDATE vtiger_customerportal_tabs SET visible = 1 WHERE tabid = ?", array($tabid));
- }
-}
-
-/* Function to save Advanced info fro Customer Portal
- */
-function cp_saveAdvancedSettings($input) {
- global $adb;
-
- $portalmodules = array("Accounts","Contacts","HelpDesk","Invoice","Quotes","Documents","Faq","Services","Products");
- foreach($portalmodules as $modules) {
- $view = $input['view_'.$modules];
- $tabid = getTabid($modules);
- if($view == 'showall'){
- $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = 1 WHERE prefkey = 'showrelatedinfo' and tabid = ?", array($tabid));
- }else {
- $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = 0 WHERE prefkey = 'showrelatedinfo' and tabid = ?", array($tabid));
- }
- }
-
- //user update
- $userid = $input['userid'];
- $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = ? WHERE prefkey = 'userid' and tabid = 0", array($userid));
-
-}
-
-/* It gives you a list of users
- *
- */
-function cp_getUsers(){
- global $adb;
- $res = $adb->query("SELECT id,user_name from vtiger_users");
- $norows = $adb->num_rows($res);
- for($i = 0;$i < $norows;$i++) {
- $users[$i]['id'] = $adb->query_result($res,$i,'id');
- $users[$i]['name'] = $adb->query_result($res,$i,'user_name');
- }
- return $users;
-}
-
-/* Function to get the customer portal user id
- */
-function cp_getCurrentUser() {
- global $adb;
- $res = $adb->query("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'userid' AND tabid = 0");
- $userid = $adb->query_result($res,0,'prefvalue');
- if($userid != '') {
- return $userid;
- }
- return false;
-}
-?>
\ No newline at end of file
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/index.php b/oss/vtiger/trunk/modules/CustomerPortal/index.php
deleted file mode 100644
index 93f50e26..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/index.php
+++ /dev/null
@@ -1,36 +0,0 @@
-id.'.php');
-
-if(!$is_admin) {
- echo "";
- exit;
-}
-include_once("modules/$currentModule/ListView.php");
-
-?>
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/language/en_us.lang.php b/oss/vtiger/trunk/modules/CustomerPortal/language/en_us.lang.php
deleted file mode 100644
index 6fdc959f..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/language/en_us.lang.php
+++ /dev/null
@@ -1,22 +0,0 @@
- 'CustomerPortal',
-'LBL_BASIC_SETTINGS'=>'Basic Settings',
-'LBL_ADVANCED_SETTINGS'=>'Advanced Settings',
-'LBL_MODULE'=>'Module',
-'LBL_VIEW_ALL_RECORD'=>'View All Related Records ?',
-'YES'=>'Yes',
-'NO'=>'No',
-'LBL_USER_DESCRIPTION'=>'The above selected User\'s profile will be selected to control the fields that appear in the Customer Portal
- You can enable/disable the fields that show in the customer Portal.',
-'SELECT_USERS'=>'Select the Users',
-'LBL_DISABLE'=>'Disable',
-'LBL_ENABLE' =>'Enable',
-'Module' => 'Module',
-'Sequence' =>'Sequence',
-'Visible'=>'Visible'
-
-);
-
-?>
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/language/zh_cn.lang.php b/oss/vtiger/trunk/modules/CustomerPortal/language/zh_cn.lang.php
deleted file mode 100644
index d8d8a084..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/language/zh_cn.lang.php
+++ /dev/null
@@ -1,21 +0,0 @@
- '客户门户 ',
-'LBL_BASIC_SETTINGS'=>'基本设置',
-'LBL_ADVANCED_SETTINGS'=>'高级设置',
-'LBL_MODULE'=>'模块',
-'LBL_VIEW_ALL_RECORD'=>'查看所有相关记录 ?',
-'YES'=>'是',
-'NO'=>'否',
-'LBL_USER_DESCRIPTION'=>'您可以通过设置来决定上述选定的用户的相关权限,比如字段是否可见,模块是否可用等.',
-'SELECT_USERS'=>'选择用户',
-'LBL_DISABLE'=>'禁用',
-'LBL_ENABLE' =>'启用',
-'Module' => '模块',
-'Sequence' =>'次序',
-'Visible'=>'可见'
-
-);
-
-?>
diff --git a/oss/vtiger/trunk/modules/CustomerPortal/schema.xml b/oss/vtiger/trunk/modules/CustomerPortal/schema.xml
deleted file mode 100644
index 07fd58fe..00000000
--- a/oss/vtiger/trunk/modules/CustomerPortal/schema.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- vtiger_customerportal_fields
-
-
-
-