Page MenuHomeIn-Portal Phabricator

custom
No OneTemporary

File Metadata

Created
Sat, Feb 1, 3:51 PM
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