Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1026015
D344.diff
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
Fri, Jun 13, 6:02 PM
Size
1 KB
Mime Type
text/x-diff
Expires
Sat, Jun 14, 6:02 PM (4 h, 30 m)
Engine
blob
Format
Raw Data
Handle
661666
Attached To
D344: INP-1745 Connect "Modified" and "ModifiedById" fields to Links
D344.diff
View Options
Index: branches/5.2.x/core/install/english.lang
===================================================================
--- branches/5.2.x/core/install/english.lang
+++ branches/5.2.x/core/install/english.lang
@@ -566,6 +566,7 @@
<PHRASE Label="la_fld_MetaKeywords" Module="Core" Type="1">TWV0YSBLZXl3b3Jkcw==</PHRASE>
<PHRASE Label="la_fld_MisspelledWord" Module="Core" Type="1" Column="TWlzc3BlbGxlZCBXb3Jk">TWlzc3BlbGxlZCBXb3Jk</PHRASE>
<PHRASE Label="la_fld_Modified" Module="Core" Type="1" Column="TW9kaWZpZWQgT24=">TW9kaWZpZWQ=</PHRASE>
+ <PHRASE Label="la_fld_ModifiedBy" Module="Core" Type="1" Column="TW9kaWZpZWQgQnk=">TW9kaWZpZWQgQnk=</PHRASE>
<PHRASE Label="la_fld_Module" Module="Core" Type="1" Column="TW9kdWxl">TW9kdWxl</PHRASE>
<PHRASE Label="la_fld_ModuleName" Module="Core" Type="1">TW9kdWxl</PHRASE>
<PHRASE Label="la_fld_MultiLingual" Module="Core" Type="1">TXVsdGlsaW5ndWFs</PHRASE>
Index: branches/5.2.x/core/kernel/db/cat_event_handler.php
===================================================================
--- branches/5.2.x/core/kernel/db/cat_event_handler.php
+++ branches/5.2.x/core/kernel/db/cat_event_handler.php
@@ -907,6 +907,13 @@
if ( $object->GetOriginalField('CategoryId') != $target_category ) {
$object->MoveToCat($target_category);
}
+
+ if ( $object->GetChangedFields() ) {
+ $now = adodb_mktime();
+ $object->SetDBField('Modified_date', $now);
+ $object->SetDBField('Modified_time', $now);
+ $object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
+ }
}
/**
@@ -1032,13 +1039,6 @@
$event->CallSubEvent('OnAfterItemDelete');
}
}
-
- if ( $object->GetChangedFields() ) {
- $now = adodb_mktime();
- $object->SetDBField('Modified_date', $now);
- $object->SetDBField('Modified_time', $now);
- $object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
- }
}
/**
Event Timeline
Log In to Comment