Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F773514
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
Sun, Feb 2, 2:39 PM
Size
2 KB
Mime Type
text/x-diff
Expires
Tue, Feb 4, 2:39 PM (1 h, 48 m)
Engine
blob
Format
Raw Data
Handle
556730
Attached To
rINP In-Portal
in-portal
View Options
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
Log In to Comment