Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F804044
D189.id457.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
Wed, Feb 26, 9:04 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Thu, Feb 27, 9:04 AM (5 h, 1 m)
Engine
blob
Format
Raw Data
Handle
576758
Attached To
D189: INP-1527 User's profile update via AJAX support
D189.id457.diff
View Options
Index: core/units/users/users_event_handler.php
===================================================================
--- core/units/users/users_event_handler.php
+++ core/units/users/users_event_handler.php
@@ -154,7 +154,7 @@
return true;
}
- if ( $event->Name == 'OnUpdate' && $user_id > 0 ) {
+ if ( substr($event->Name, 0, 8) == 'OnUpdate' && $user_id > 0 ) {
$user_dummy = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $user_dummy UsersItem */
@@ -186,7 +186,7 @@
return is_numeric($this->getPassedID($event));
}
- if ( $event->Name == 'OnUpdate' && $user_id <= 0 ) {
+ if ( substr($event->Name, 0, 8) == 'OnUpdate' && $user_id <= 0 ) {
// guests are not allowed to update their record, because they don't have it :)
return false;
}
@@ -906,6 +906,20 @@
}
/**
+ * Updates kDBItem via AJAX.
+ *
+ * @param kEvent $event Event.
+ *
+ * @return void
+ */
+ protected function OnUpdateAjax(kEvent $event)
+ {
+ /** @var AjaxFormHelper $ajax_form_helper */
+ $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper');
+ $ajax_form_helper->transitEvent($event, 'OnUpdate');
+ }
+
+ /**
* Checks state against country
*
* @param kEvent $event
Event Timeline
Log In to Comment