Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sun, Feb 2, 2:39 PM

in-portal

Index: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1512)
+++ branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php (revision 1513)
@@ -1,54 +1,55 @@
<?php
define('STYLE_INLINE', ' ');
define('STYLE_FILE', "\n");
define('STYLE_PREVIEW', '<br>');
class SelectorsItem extends kDBItem
{
/**
* Returns compiled selector for inserting into css file
*
* @return string
*/
function CompileStyle($separator = STYLE_FILE)
{
$ret = $this->GetDBField('SelectorName')." {\n";
$ret .= $this->CompileStyleBody($separator);
$ret .= $separator."}\n";
return $ret;
}
function CompileStyleBody($separator)
{
$ret = '';
$selector_data = $this->GetDBField('SelectorData');
- if(!$selector_data) return $ret;
-
- foreach($selector_data as $property_name => $property_value)
+ if($selector_data)
{
- if ($property_value == '') continue;
- $ret .= "\t$property_name: $property_value;".$separator;
+ foreach($selector_data as $property_name => $property_value)
+ {
+ if ($property_value == '') continue;
+ $ret .= "\t$property_name: $property_value;".$separator;
+ }
}
$advanced_css = $this->GetDBField('AdvancedCSS');
if($separator != "\n") $advanced_css = str_replace("\n",$separator,$advanced_css);
$ret .= $advanced_css;
return $ret;
}
/**
* Resets all block style attributes to it's base style
*
*/
function ResetStyle()
{
if( $this->GetDBField('ParentId') )
{
$this->SetDBField( 'SelectorData', Array() );
$this->Update();
}
}
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/core/units/selectors/selectors_item.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.6
\ No newline at end of property
+1.1.2.7
\ No newline at end of property

Event Timeline