Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Jul 10, 9:33 PM

in-portal

Index: branches/unlabeled/unlabeled-1.9.32/themes/default/my_account.tpl
===================================================================
--- branches/unlabeled/unlabeled-1.9.32/themes/default/my_account.tpl (revision 3980)
+++ branches/unlabeled/unlabeled-1.9.32/themes/default/my_account.tpl (revision 3981)
@@ -1,264 +1,270 @@
<inp2:m_CheckSSL mode="required" condition="Require_SSL" />
<inp:include _template="common/head.tpl" />
<BODY>
<inp:include _Template="common/pagetop.tpl" />
<table width="770" border="0" cellspacing="0" cellpadding="0">
<!-- start content -->
<tr>
<td valign="top" height="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10000"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<td><img src="img/s.gif" width="200" height="1" alt="" /><br /></td>
</tr>
<tr>
<td valign="top" class="bott-line">
<!-- path //-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bgr-path"><img src="img/s.gif" width="549" height="1" alt="" /><br /></td>
<!--<td bgcolor="#61b0ec"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>-->
</tr>
<tr>
<td class="bgr-path">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="17"><img src="img/ic_homepath.gif" width="17" height="24" alt="" /><br /></td>
<td class="path"><a href="<inp:m_template_link _Template="index" _Category=0 />"><inp:m_language _Phrase="lu_home" /></a> > <inp:m_language _Phrase="lu_myaccount" /></td>
<td align="right">
<table border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td><img src="<inp:m_lang_field _Field="icon" _default="img/ic_flag.gif"/>" width="18" height="12" alt="" /><br /></td>
<td>&nbsp;</td>
<td class="post-action"><span onclick="showSeg('langmenu',true); "><inp:m_lang_field _Field="LocalName" /></span></td>
<td>&nbsp;&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<inp:include _Template="lang_select/lang_menu.tpl" />
</td>
<!--<td width="10000" valign="top" bgcolor="#61b0ec">&nbsp;</td>-->
</tr>
</table>
<!-- path \\-->
<!-- profile update line //-->
<img src="img/s.gif" width="1" height="1" alt="" /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="bgr-updatefill" width="10000"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
<td><img src="img/s.gif" width="5" height="1" alt="" /><br /></td>
<td nowrap="nowrap" class="updated"><inp:m_language _Phrase="lu_profile_updated" />: <inp:m_user_field _Field="modified" />&nbsp;</td>
</tr>
</table>
<!-- profile update line \\-->
<!-- profile -->
<img src="img/s.gif" width="1" height="1" alt="" /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/s.gif" width="20" height="1" alt="" /><br /></td>
<td valign="top" width="10000" class="bgr-myaccount">
<!-- page title //-->
<img src="img/s.gif" width="1" height="5" alt="" /><br />
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50"><img src="img/my_profile.gif" width="46" height="46" alt="" /><br /></td>
<td><h1><inp:m_language _Phrase="lu_myaccount" /></h1></td>
</tr>
</table>
<!-- page title \\-->
<!-- profile content -->
<br />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><h2><inp:m_language _phrase="my_account_title" /></h2></td>
</tr>
<tr>
<td colspan="4" class="error"><img src="img/s.gif" width="1" height="3" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4" class="bgr-updatefill"><img src="img/s.gif" width="300" height="1" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="5" alt="" /><br /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="5" alt="" /><br /></td>
</tr>
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_template_link _Template="my_info" />"><img src="img/ic_myprofile46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_template_link _Template="my_info" />"><inp:m_language _Phrase="lu_my_info" /></a>
<p><inp:m_language _Phrase="lu_my_info_description" /></p>
</td>
<td><img src="img/s.gif" width="30" height="1" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_template_link _Template="my_favorites" />"><img src="img/ic_myfavorites46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_template_link _Template="my_favorites" />"><inp:m_language _Phrase="lu_my_favorites" /></a>
<p><inp:m_language _Phrase="lu_my_favorites_description" /></p>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_template_link _Template="my_friends" />"><img src="img/ic_myfriends46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_template_link _Template="my_friends" />"><inp:m_language _Phrase="lu_my_friends" /></a>
<p><inp:m_language _Phrase="lu_my_friends_description" /></p>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<inp:m_module_enabled _Module="In-Bulletin">
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_template_link _Template="inbulletin/pm_list" />"><img src="inbulletin/img/ic_pm_list46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_template_link _Template="inbulletin/pm_list" />&ResetPage=1"><inp:m_language _Phrase="lu_pm_list" /></a>
<p><inp:m_language _Phrase="lu_pm_list_description" /></p>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
</inp:m_module_enabled>
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_template_link _Template="my_preferences" />"><img src="img/ic_mypreferences46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_template_link _Template="my_preferences" />"><inp:m_language _Phrase="lu_my_preferences" /></a>
<p><inp:m_language _Phrase="lu_my_preferences_description" /></p>
</td>
<td>&nbsp;</td>
</tr>
<inp2:m_if check="u_IsAffiliateOrRegisterAsAffiliateAllowed">
<tr>
<inp:perm_include _Module="In-Commerce" _Template="in-commerce/blocks/my_account/my_affiliate_link.tpl" />
</tr>
</inp2:m_if>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
<td><img src="img/s.gif" width="70" height="1" alt="" /><br /></td>
<td valign="top">
<a href="<inp:m_form_action _Form="logout" _Template="index" />"><img src="img/ic_logout46.gif" width="46" height="46" alt="" /></a><br />
</td>
<td width="10000" class="item">
<a href="<inp:m_form_action _Form="logout" _Template="index" />"><inp:m_language _Phrase="lu_logout" /></a>
<p><inp:m_language _Phrase="lu_logout_description" /></p>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="30" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4"><h2><inp:m_language _Phrase="lu_my_items_title" /></h2></td>
</tr>
<tr>
<td colspan="4" class="error"><img src="img/s.gif" width="1" height="3" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4" class="bgr-updatefill"><img src="img/s.gif" width="300" height="1" alt="" /><br /></td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="5" alt="" /><br /></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="5" alt="" /><br /></td>
</tr>
<tr>
<inp:perm_include _Module="In-Link" _Template="inlink/my_account/links.tpl" />
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
<inp:perm_include _Module="In-Commerce" _Template="in-commerce/blocks/my_account/my_orders_link.tpl" />
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
<inp:perm_include _Module="In-Commerce" _Template="in-commerce/blocks/my_account/my_downloads_link.tpl" />
</tr>
<tr>
<td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
</tr>
<tr>
+ <inp:perm_include _Module="In-Commerce" _Template="in-commerce/blocks/my_account/my_address_link" />
+ </tr>
+ <tr>
+ <td colspan="4"><img src="img/s.gif" width="1" height="10" alt="" /><br /></td>
+ </tr>
+ <tr>
<inp:perm_include _Module="In-Bulletin" _Template="inbulletin/my_account/topics.tpl" />
</tr>
</table><br /><br />
<!-- end profile content -->
</td>
</tr>
</table>
<!-- end profile -->
</td>
<!-- start vertical white line in main conent table -->
<td height="100%"><img src="img/s.gif" width="1" height="1" alt="" /><br /></td>
<!-- end vertical white line in main conent table -->
<!-- right column //-->
<td valign="top" height="100%" class="open-box"><inp:include _template="index/right_limited.tpl" /></td>
<!-- right column \\-->
</tr>
</table>
</td>
</tr>
<!-- end content -->
<inp:include _Template="common/footer.tpl" />
</table>
</body>
</html>
Property changes on: branches/unlabeled/unlabeled-1.9.32/themes/default/my_account.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.9
\ No newline at end of property
+1.9.32.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.6.48/kernel/units/custom_fields/custom_fields_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.6.48/kernel/units/custom_fields/custom_fields_event_handler.php (revision 3980)
+++ branches/unlabeled/unlabeled-1.6.48/kernel/units/custom_fields/custom_fields_event_handler.php (revision 3981)
@@ -1,69 +1,79 @@
<?php
class CustomFieldsEventHandler extends InpDBEventHandler {
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
$item_type=$this->Application->GetVar('cf_type');
$object->addFilter('itemtype_filter', '%1$s.Type = '.$item_type);
//$object->AddOrderField('DisplayOrder', 'ASC');
}
/**
* Prevents from duplicate item creation
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$object =& $event->getObject();
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- $new_field_name=$items_info[0]['FieldName'];
-
- $table = $this->Application->getUnitOption($event->Prefix,'TableName');
- $found = $this->Conn->GetOne("SELECT count(*) FROM ".$table." WHERE FieldName='".$new_field_name."'");
+ $live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $sql = 'SELECT COUNT(*)
+ FROM '.$live_table.'
+ WHERE FieldName = '.$this->Conn->qstr($object->GetDBField('FieldName')).' AND Type = '.$object->GetDBField('Type');
+ $found = $this->Conn->GetOne($sql);
- if($found){
- $event->status=erFAIL;
- $object->FieldErrors['FieldName']['pseudo'] = $this->Application->Phrase('la_error_CustomExists');
- }
- else {
- $item_type=$this->Application->GetVar('cf_type');
-
- $object->SetDBField('Type', $this->Application->GetVar('cf_type'));
+ if ($found) {
+ $event->status = erFAIL;
+ $object->SetError('FieldName', 'duplicate', 'la_error_CustomExists');
}
}
/**
* Occurse after deleting item, id of deleted item
* is stored as 'id' param of event
*
* @param kEvent $event
* @access public
*/
function OnAfterItemDelete(&$event)
{
$object =& $event->getObject();
$custom_field_id=$event->getEventParam('id');
$this->Application->SetVar('cf_id', '');
$sql='DELETE FROM '.TABLE_PREFIX.'CustomMetaData WHERE CustomFieldId = '.$custom_field_id;
$this->Conn->Query($sql);
}
function OnMassDelete(&$event)
{
parent::OnMassDelete($event);
$event->redirect_params = Array('opener' => 's');
}
+
+ /**
+ * Prepare temp tables for creating new item
+ * but does not create it. Actual create is
+ * done in OnPreSaveCreated
+ *
+ * @param kEvent $event
+ */
+ function OnPreCreate(&$event)
+ {
+ parent::OnPreCreate($event);
+
+ $object =& $event->getObject();
+ $object->SetDBField('Type', $this->Application->GetVar('cf_type'));
+ }
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.6.48/kernel/units/custom_fields/custom_fields_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.48.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.6.48/core/units/custom_fields/custom_fields_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.6.48/core/units/custom_fields/custom_fields_event_handler.php (revision 3980)
+++ branches/unlabeled/unlabeled-1.6.48/core/units/custom_fields/custom_fields_event_handler.php (revision 3981)
@@ -1,69 +1,79 @@
<?php
class CustomFieldsEventHandler extends InpDBEventHandler {
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
$item_type=$this->Application->GetVar('cf_type');
$object->addFilter('itemtype_filter', '%1$s.Type = '.$item_type);
//$object->AddOrderField('DisplayOrder', 'ASC');
}
/**
* Prevents from duplicate item creation
*
* @param kEvent $event
*/
function OnBeforeItemCreate(&$event)
{
$object =& $event->getObject();
- $items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
- $new_field_name=$items_info[0]['FieldName'];
-
- $table = $this->Application->getUnitOption($event->Prefix,'TableName');
- $found = $this->Conn->GetOne("SELECT count(*) FROM ".$table." WHERE FieldName='".$new_field_name."'");
+ $live_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
+ $sql = 'SELECT COUNT(*)
+ FROM '.$live_table.'
+ WHERE FieldName = '.$this->Conn->qstr($object->GetDBField('FieldName')).' AND Type = '.$object->GetDBField('Type');
+ $found = $this->Conn->GetOne($sql);
- if($found){
- $event->status=erFAIL;
- $object->FieldErrors['FieldName']['pseudo'] = $this->Application->Phrase('la_error_CustomExists');
- }
- else {
- $item_type=$this->Application->GetVar('cf_type');
-
- $object->SetDBField('Type', $this->Application->GetVar('cf_type'));
+ if ($found) {
+ $event->status = erFAIL;
+ $object->SetError('FieldName', 'duplicate', 'la_error_CustomExists');
}
}
/**
* Occurse after deleting item, id of deleted item
* is stored as 'id' param of event
*
* @param kEvent $event
* @access public
*/
function OnAfterItemDelete(&$event)
{
$object =& $event->getObject();
$custom_field_id=$event->getEventParam('id');
$this->Application->SetVar('cf_id', '');
$sql='DELETE FROM '.TABLE_PREFIX.'CustomMetaData WHERE CustomFieldId = '.$custom_field_id;
$this->Conn->Query($sql);
}
function OnMassDelete(&$event)
{
parent::OnMassDelete($event);
$event->redirect_params = Array('opener' => 's');
}
+
+ /**
+ * Prepare temp tables for creating new item
+ * but does not create it. Actual create is
+ * done in OnPreSaveCreated
+ *
+ * @param kEvent $event
+ */
+ function OnPreCreate(&$event)
+ {
+ parent::OnPreCreate($event);
+
+ $object =& $event->getObject();
+ $object->SetDBField('Type', $this->Application->GetVar('cf_type'));
+ }
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.6.48/core/units/custom_fields/custom_fields_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.6
\ No newline at end of property
+1.6.48.1
\ No newline at end of property

Event Timeline