Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F772703
custom
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
Sat, Feb 1, 3:51 PM
Size
2 KB
Mime Type
text/x-diff
Expires
Mon, Feb 3, 3:51 PM (1 d, 1 h)
Engine
blob
Format
Raw Data
Handle
556008
Attached To
rMCUS Modules.Custom
custom
View Options
Index: branches/1.2.x/units/widgets/widget_tp.php
===================================================================
--- branches/1.2.x/units/widgets/widget_tp.php (revision 15152)
+++ branches/1.2.x/units/widgets/widget_tp.php (revision 15153)
@@ -1,47 +1,47 @@
<?php
defined('FULL_PATH') or die('restricted access!');
/**
* Widgets Tag Processor (sample)
*
*/
class WidgetTagProcessor extends kDBTagProcessor {
/**
* Custom tag to output "Hello World!"
*
* @param Array $params
* @return string
*/
function NewTag($params)
{
return 'Hello world!';
}
-
+
/**
* Returns a link for editing product
*
* @param Array $params
* @return string
*/
function ItemEditLink($params)
{
- $object =& $this->getObject();
+ $object = $this->getObject($params);
/* @var $object kDBList */
-
+
$edit_template = $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePath') . '/' . $this->Application->getUnitOption($this->Prefix, 'AdminTemplatePrefix') . 'edit';
-
+
$url_params = Array (
'm_opener' => 'd',
$this->Prefix.'_mode' => 't',
$this->Prefix.'_event' => 'OnEdit',
- $this->Prefix.'_id' => $object->GetID(),
+ $this->Prefix.'_id' => $object->GetID(),
'pass' => 'all,'.$this->Prefix,
'no_pass_through' => 1,
);
-
+
return $this->Application->HREF($edit_template, '', $url_params);
}
}
\ No newline at end of file
Index: branches/1.2.x/units/sections/users/e_user_tp.php
===================================================================
--- branches/1.2.x/units/sections/users/e_user_tp.php (revision 15152)
+++ branches/1.2.x/units/sections/users/e_user_tp.php (revision 15153)
@@ -1,37 +1,37 @@
<?php
defined('FULL_PATH') or die('restricted access!');
/**
* Extends default UsersTagProcessor class
*
*/
class EUserTagProcessor extends UsersTagProcessor {
/**
* Returns formated user address
*
* @param Array
* @return string
*/
function PrintFormattedUserAddress($params)
{
- $object =& $this->getObject($params);
+ $object = $this->getObject($params);
/* @var $object kDBItem */
$ret = '';
$newline = '<br/>';
if ($object->isLoaded()) {
$ret = $object->GetField('Street') ? $object->GetField('Street') . $newline : '';
$ret .= $object->GetField('Street2') ? $object->GetField('Street2') . $newline : '';
$ret .= $object->GetField('City') ? $object->GetField('City') . ', ' : '';
$ret .= $object->GetField('State') ? $object->GetField('State') . ' ' : '';
$ret .= $object->GetField('Zip') ? $object->GetField('Zip') . $newline : '';
$ret .= $object->GetField('Country');
}
return $ret;
}
}
\ No newline at end of file
Event Timeline
Log In to Comment