Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1044076
in-portal
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
Tue, Jun 24, 7:47 PM
Size
5 KB
Mime Type
text/x-diff
Expires
Thu, Jun 26, 7:47 PM (3 h, 45 m)
Engine
blob
Format
Raw Data
Handle
675271
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.3.4/core/units/stylesheets/stylesheets_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.3.4/core/units/stylesheets/stylesheets_item.php (revision 3322)
+++ branches/unlabeled/unlabeled-1.3.4/core/units/stylesheets/stylesheets_item.php (revision 3323)
@@ -1,44 +1,44 @@
<?php
class StylesheetsItem extends kDBItem
{
function Compile()
{
$this->Application->setUnitOption('selectors', 'AutoLoad', false);
$selector_item =& $this->Application->recallObject('selectors.item', 'selectors', Array('live_table'=>true) );
$parent_field = $this->Application->getUnitOption($selector_item->Prefix, 'ForeignKey');
$sql_template = 'SELECT '.$selector_item->IDField.' FROM '.$selector_item->TableName.' WHERE '.$parent_field.' = %s';
$selectors_ids = $this->Conn->GetCol( sprintf($sql_template, $this->GetID() ) );
$ret = '/* This file is generated automatically. Don\'t edit it manually ! */'."\n\n";
foreach($selectors_ids as $selector_id)
{
$selector_item->Load($selector_id);
$ret .= $selector_item->CompileStyle()."\n";
}
$ret .= $this->GetDBField('AdvancedCSS');
- $compile_ts = time();
+ $compile_ts = adodb_mktime();
$css_path = FULL_PATH.'/kernel/stylesheets/';
$css_file = $css_path.strtolower($this->GetDBField('Name')).'-'.$compile_ts.'.css';
$fp = fopen($css_file,'w');
if($fp)
{
$prev_css = $css_path.strtolower($this->GetDBField('Name')).'-'.$this->GetDBField('LastCompiled').'.css';
if( file_exists($prev_css) ) unlink($prev_css);
fwrite($fp, $ret);
fclose($fp);
$sql = 'UPDATE '.$this->TableName.' SET LastCompiled = '.$compile_ts.' WHERE '.$this->IDField.' = '.$this->GetID();
$this->Conn->Query($sql);
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.3.4/core/units/stylesheets/stylesheets_item.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.3
\ No newline at end of property
+1.3.4.1
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.13.2/core/units/visits/visits_event_handler.php
===================================================================
--- branches/unlabeled/unlabeled-1.13.2/core/units/visits/visits_event_handler.php (revision 3322)
+++ branches/unlabeled/unlabeled-1.13.2/core/units/visits/visits_event_handler.php (revision 3323)
@@ -1,86 +1,86 @@
<?php
class VisitsEventHandler extends InpDBEventHandler {
/**
* Registers user visit to site
*
* @param kEvent $event
*/
function OnRegisterVisit(&$event)
{
$object =& $event->getObject( Array('skip_autoload'=>true) );
- $object->SetDBField('VisitDate_date', time() );
- $object->SetDBField('VisitDate_time', time() );
+ $object->SetDBField('VisitDate_date', adodb_mktime() );
+ $object->SetDBField('VisitDate_time', adodb_mktime() );
$object->SetDBField('Referer', getArrayValue($_SERVER, 'HTTP_REFERER') );
$object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR'] );
if( $object->Create() )
{
$this->Application->StoreVar('visit_id', $object->GetID() );
$this->Application->SetVar('visits_id', $object->GetID() );
}
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @access protected
* @see OnListBuild
*/
function SetCustomQuery(&$event)
{
$object =& $event->getObject();
$types = $event->getEventParam('types');
if($types == 'myvisitors')
{
$user_id = $this->Application->GetVar('u_id');
$object->addFilter('myitems_user1','au.PortalUserId = '.$user_id);
$object->addFilter('myitems_user2','au.PortalUserId >0');
//$object->AddGroupByField('VisitDate');
$object->AddGroupByField('%1$s.VisitId');
}
if($types == 'myvisitororders' && $event->Special == 'incommerce')
{
$user_id = $this->Application->GetVar('u_id');
$object->addFilter('myitems_orders','ord.OrderId IS NOT NULL');
$object->addFilter('myitems_user1','au.PortalUserId = '.$user_id);
$object->addFilter('myitems_user2','au.PortalUserId >0');
$object->addFilter('myitems_orders_processed','ord.Status = 4');
}
}
/**
* Apply some special processing to
* object beeing recalled before using
* it in other events that call prepareObject
*
* @param kBase $object
* @param kEvent $event
* @access protected
*/
function prepareObject(&$object, &$event)
{
$types = $event->getEventParam('types');
if(method_exists($object, 'AddGroupByField'))
{
if( ($types == 'myvisitors' || !$types) && $object->Special == 'incommerce')
{
$object->addCalculatedField('OrderTotalAmountSum', 'SUM(IF(ord.Status = 4, ord.SubTotal+ord.ShippingCost+ord.VAT, 0))');
$object->addCalculatedField('OrderAffiliateCommissionSum', 'SUM( IF(ord.Status = 4,ord.AffiliateCommission,0))');
$object->addCalculatedField('OrderCountByVisit', 'SUM( IF(ord.Status = 4, 1, 0) )');
}
if (!$types){
$object->AddGroupByField('%1$s.VisitId');
}
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.13.2/core/units/visits/visits_event_handler.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.13
\ No newline at end of property
+1.13.2.1
\ No newline at end of property
Event Timeline
Log In to Comment