[Vtigercrm-commits] [vtiger-commits] r7050 - in /vtigercrm/trunk: data/CRMEntity.php index.php install/5createTables.inc.php modules/Users/User.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Jun 13 10:59:28 EDT 2006
Author: don
Date: Tue Jun 13 08:59:21 2006
New Revision: 7050
Log:
issues in users has been fixed
Modified:
vtigercrm/trunk/data/CRMEntity.php
vtigercrm/trunk/index.php
vtigercrm/trunk/install/5createTables.inc.php
vtigercrm/trunk/modules/Users/User.php
Modified: vtigercrm/trunk/data/CRMEntity.php
==============================================================================
--- vtigercrm/trunk/data/CRMEntity.php (original)
+++ vtigercrm/trunk/data/CRMEntity.php Tue Jun 13 08:59:21 2006
@@ -26,7 +26,7 @@
require_once('include/utils/utils.php');
require_once('include/utils/UserInfoUtil.php');
-class CRMEntity extends SugarBean
+class CRMEntity
{
/**
* This method implements a generic insert and update logic for any SugarBean
@@ -526,20 +526,22 @@
if($insertion_mode == 'edit')
{
$update = '';
+ $tabid= getTabid($module);
+ $sql = "select * from vtiger_field where tabid=".$tabid." and tablename='".$table_name."' and displaytype in (1,3)";
}
else
{
$column = $this->tab_name_index[$table_name];
- if($column == 'id' && $table_name == 'users')
- {
- $currentuser_id = $adb->getUniqueID("users");
+ if($column == 'id' && $table_name == 'vtiger_users')
+ {
+ $currentuser_id = $adb->getUniqueID("vtiger_users");
$this->id = $currentuser_id;
}
$value = $this->id;
+ $tabid= getTabid($module);
+ $sql = "select * from vtiger_field where tabid=".$tabid." and tablename='".$table_name."' and displaytype in (1,3,4)";
}
- $tabid= getTabid($module);
- $sql = "select * from vtiger_field where tabid=".$tabid." and tablename='".$table_name."' and displaytype in (1,3)";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
for($i=0; $i<$noofrows; $i++)
Modified: vtigercrm/trunk/index.php
==============================================================================
--- vtigercrm/trunk/index.php (original)
+++ vtigercrm/trunk/index.php Tue Jun 13 08:59:21 2006
@@ -482,7 +482,7 @@
if(isset($_REQUEST['record']) && $_REQUEST['record']!='' && $_REQUEST["module"] != "Webmails")
{
// Only track a viewing if the record was retrieved.
- $focus->track_view($current_user->id, $actualModule,$_REQUEST['record']);
+ //$focus->track_view($current_user->id, $actualModule,$_REQUEST['record']);
}
}
Modified: vtigercrm/trunk/install/5createTables.inc.php
==============================================================================
--- vtigercrm/trunk/install/5createTables.inc.php (original)
+++ vtigercrm/trunk/install/5createTables.inc.php Tue Jun 13 08:59:21 2006
@@ -89,7 +89,7 @@
$admin_email ="admin at administrator.com";
$user->column_fields["email"] = $admin_email;
//to get the role id for standard_user
- $role_query = "select roleid from role where rolename='administrator'";
+ $role_query = "select roleid from vtiger_role where rolename='administrator'";
$db->database->SetFetchMode(ADODB_FETCH_ASSOC);
$role_result = $db->query($role_query);
$role_id = $db->query_result($role_result,0,"roleid");
@@ -160,7 +160,7 @@
else
eecho("Tables Successfully created.\n");
-foreach ( $modules as $module )
+foreach ($modules as $module )
{
$focus = new $module();
$focus->create_tables();
@@ -178,17 +178,18 @@
$combo = new PopulateComboValues();
$combo->create_tables();
-create_default_users();
-
-// default report population
-require_once('modules/Reports/PopulateReports.php');
-
-// default customview population
-require_once('modules/CustomView/PopulateCustomView.php');
-
//Writing tab data in flat file
create_tab_data_file();
create_parenttab_data_file();
+
+create_default_users();
+
+// default report population
+require_once('modules/Reports/PopulateReports.php');
+
+// default customview population
+require_once('modules/CustomView/PopulateCustomView.php');
+
// ensure required sequences are created (adodb creates them as needed, but if
// creation occurs within a transaction we get problems
Modified: vtigercrm/trunk/modules/Users/User.php
==============================================================================
--- vtigercrm/trunk/modules/Users/User.php (original)
+++ vtigercrm/trunk/modules/Users/User.php Tue Jun 13 08:59:21 2006
@@ -87,7 +87,7 @@
var $tab_name = Array('vtiger_users','vtiger_attachments','vtiger_user2role');
var $tab_name_index = Array('vtiger_users'=>'id','vtiger_attachments'=>'attachmentsid','vtiger_user2role'=>'userid');
var $column_fields = Array();
- var $table_name = "users";
+ var $table_name = "vtiger_users";
var $sortby_fields = Array();
// This is the list of fields that are in the lists.
@@ -201,6 +201,7 @@
$encrypted_password = crypt($user_password, $salt);
return $encrypted_password;
+
}
function authenticate_user($password){
@@ -486,9 +487,9 @@
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
if($sorder != '' && $orderby !='')
- $list_query = ' SELECT * from users where deleted=0 order by '.$orderby.' '.$sorder;
+ $list_query = ' SELECT * from vtiger_users where deleted=0 order by '.$orderby.' '.$sorder;
else
- $list_query = "SELECT * from users where deleted=0 order by ".$this->default_order_by." ".$this->default_sort_order;
+ $list_query = "SELECT * from vtiger_users where deleted=0 order by ".$this->default_order_by." ".$this->default_sort_order;
$result =$adb->query($list_query);
$entries_list = array();
$roleinfo = getAllRoleDetails();
More information about the vtigercrm-commits
mailing list