Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1109058
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Aug 25, 10:33 AM
Size
6 KB
Mime Type
text/x-diff
Expires
Wed, Aug 27, 10:33 AM (9 h, 33 m)
Engine
blob
Format
Raw Data
Handle
715960
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.1.4/core/units/user_groups/user_groups_dbitem.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.4/core/units/user_groups/user_groups_dbitem.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.4/core/units/user_groups/user_groups_dbitem.php (revision 7426)
@@ -0,0 +1,29 @@
+<?php
+
+ class UserGroups_DBItem extends kDBItem
+ {
+ /**
+ * Returns part of SQL WHERE clause identifing the record, ex. id = 25
+ *
+ * @access public
+ * @param string $method Child class may want to know who called GetKeyClause, Load(), Update(), Delete() send its names as method
+ * @return void
+ * @see kDBItem::Load()
+ * @see kDBItem::Update()
+ * @see kDBItem::Delete()
+ */
+ function GetKeyClause($method=null, $keys_hash = null)
+ {
+ $table_info = $this->getLinkedInfo();
+ $keys_hash = Array(
+ $this->IDField => $this->ID,
+ $table_info['ForeignKey'] => $table_info['ParentId'],
+ );
+
+ return parent::GetKeyClause($method, $keys_hash);
+ }
+
+ }
+
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.4/core/units/user_groups/user_groups_dbitem.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.4.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.3.2/core/units/user_groups/user_groups_config.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.2/core/units/user_groups/user_groups_config.php (revision 7425)
+++ branches/unlabeled/unlabeled-1.3.2/core/units/user_groups/user_groups_config.php (revision 7426)
@@ -1,95 +1,95 @@
<?php
$config = Array(
'Prefix' => 'ug',
'Clones' => Array(
'g-ug' => Array(
'ParentPrefix' => 'g',
'ForeignKey' => 'GroupId',
'ParentTableKey' => 'GroupId',
),
'u-ug' => Array(
'ParentPrefix' => 'u',
'ForeignKey' => 'PortalUserId',
'ParentTableKey' => 'PortalUserId',
),
),
- 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'),
+ 'ItemClass' => Array('class'=>'UserGroups_DBItem','file'=>'user_groups_dbitem.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'kDBEventHandler','file'=>'','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'page',
3 => 'event',
),
'IDField' => 'GroupId',
'StatusField' => Array('UserStatus'),
'TableName' => TABLE_PREFIX.'UserGroup',
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId AND %1$s.PrimaryGroup = 1
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = %1$s.PortalUserId'),
'ItemSQLs' => Array( ''=>' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId AND %1$s.PrimaryGroup = 1
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON u.PortalUserId = %1$s.PortalUserId'),
'AutoDelete' => true,
'AutoClone' => true,
'CalculatedFields' => Array(
'' => Array(
'Login' => 'u.Login',
'FirstName' => 'u.FirstName',
'LastName' => 'u.LastName',
'Email' => 'u.Email',
'PrimaryGroup' => 'g.Name',
'CreatedOn' => 'u.CreatedOn',
'UserStatus' => 'u.Status'
),
),
'Fields' => Array(
'PortalUserId' => Array('type' => 'int','not_null' => '1','default' => '0'),
'GroupId' => Array(),
'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => ''),
'PrimaryGroup' => Array('type' => 'int','not_null' => '1','default' => '1'),
'ExpirationReminderSent' => Array('type' => 'int','not_null' => '1','default' => '0'),
),
'VirtualFields' => Array(
'Login' => Array('type' => 'string'),
'FirstName' => Array('type' => 'string'),
'LastName' => Array('type' => 'string'),
'Email' => Array('type' => 'string'),
'PrimaryGroup' => Array('type' => 'string'),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'not_null' => 1, 'default' => '#NOW#'),
'UserStatus' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array(1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1, 'not_null' => '1','default' => 2),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(0 => 'icon16_user_disabled.gif', 1 => 'icon16_user.gif', 2 => 'icon16_user_pending.gif'),
'Fields' => Array(
'Login' => Array('title' => 'la_col_Username', 'data_block' => 'grid_checkbox_td'),
'LastName' => Array( 'title'=>'la_col_LastName'),
'FirstName' => Array( 'title'=>'la_col_FirstName'),
'Email' => Array( 'title'=>'la_col_Email'),
'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup'),
'CreatedOn_formatted' => Array('title' => 'la_col_CreatedOn', 'sort_field' => 'CreatedOn'),
),
),
),
);
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.2/core/units/user_groups/user_groups_config.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.2.1
\ No newline at end of property
Event Timeline
Log In to Comment