Index: branches/RC/core/units/admin/admin_tag_processor.php =================================================================== diff -u -N -r9046 -r9313 --- branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 9046) +++ branches/RC/core/units/admin/admin_tag_processor.php (.../admin_tag_processor.php) (revision 9313) @@ -789,8 +789,8 @@ $style = $this->Conn->GetRow('SELECT * FROM '.TABLE_PREFIX.'Skins WHERE IsPrimary = 1'); } - $css_path = WRITEABLE.'/user_files'; - $css_url = $this->Application->BaseURL(WRITEBALE_BASE).'user_files/'; + $css_path = (defined('WRITEABLE') ? WRITEABLE : FULL_PATH.'/kernel').'/user_files'; + $css_url = $this->Application->BaseURL(defined('WRITEBALE_BASE') ? WRITEBALE_BASE : '/kernel').'user_files/'; if (isset($params['type']) && $params['type'] == 'logo') { return $style['Logo'] ? $css_url.$style['Logo'] : ''; Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r9310 -r9313 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9310) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9313) @@ -2033,7 +2033,8 @@ $value = $this->Application->GetVar('Filedata'); if (!$value) return ; - $tmp_path = WRITEABLE.'/tmp/'; + + $tmp_path = defined('WRITEABLE') ? WRITEABLE.'/tmp/' : FULL_PATH.'/kernel/cache/'; $fname = $value['name']; $id = $this->Application->GetVar('id'); if ($id) $fname = $id.'_'.$fname; @@ -2075,7 +2076,7 @@ { if (strpos($this->Application->GetVar('file'), '../') !== false) return ; if ($this->Application->GetVar('tmp')) { - $path = WRITEABLE.'/tmp/'.$this->Application->GetVar('id').'_'.$this->Application->GetVar('file'); + $path = (defined('WRITEABLE') ? WRITEABLE.'/tmp/' : FULL_PATH.'/kernel/cache/').$this->Application->GetVar('id').'_'.$this->Application->GetVar('file'); } else { $object =& $event->getObject(array('skip_autoload'=>true)); Index: branches/RC/core/units/general/xml_helper.php =================================================================== diff -u -N -r9297 -r9313 --- branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 9297) +++ branches/RC/core/units/general/xml_helper.php (.../xml_helper.php) (revision 9313) @@ -29,14 +29,17 @@ xml_get_current_line_number($xml_parser)), E_USER_WARNING); } xml_parser_free($xml_parser); - return $this->RootElement; + + $root_copy = $this->RootElement; + + return $root_copy; } function startElement(&$Parser, &$Elem, $Attrs) { $parent =& $this->CurrentElement; // 1. $parent is now reference to $this->CurrentElement $this->CurrentElement =& new kXMLNode($Elem, $Attrs); // 2. =& ensures, that new object won't be assigned to $parent as well (don't remove) - if (is_null($this->RootElement)) { + if (!isset($this->RootElement) || is_null($this->RootElement)) { $this->RootElement =& $this->CurrentElement; } if (!is_null($parent)) { @@ -58,8 +61,8 @@ function Clear() { - $this->RootElement = null; - $this->CurrentElement = null; + unset($this->RootElement); + unset($this->CurrentElement); } } Index: branches/RC/core/kernel/utility/formatters/upload_formatter.php =================================================================== diff -u -N -r9256 -r9313 --- branches/RC/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 9256) +++ branches/RC/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 9313) @@ -67,7 +67,7 @@ $real_name = $this->ValidateFileName($this->FullPath, $real_name); $file_name = $this->FullPath.$real_name; - $tmp_file = WRITEABLE.'/tmp/'.$swf_uploaded_ids[$i].'_'.$swf_uploaded_names[$i]; + $tmp_file = (defined('WRITEABLE') ? WRITEABLE.'/tmp/' : FULL_PATH.'/kernel/cache/').$swf_uploaded_ids[$i].'_'.$swf_uploaded_names[$i]; rename($tmp_file, $file_name); @chmod($file_name, 0666); Index: branches/RC/core/units/skins/skin_eh.php =================================================================== diff -u -N -r8929 -r9313 --- branches/RC/core/units/skins/skin_eh.php (.../skin_eh.php) (revision 8929) +++ branches/RC/core/units/skins/skin_eh.php (.../skin_eh.php) (revision 9313) @@ -70,7 +70,7 @@ } $compile_ts = adodb_mktime(); - $css_path = WRITEABLE.'/user_files/'; + $css_path = (defined('WRITEABLE') ? WRITEABLE : FULL_PATH.'/kernel').'/user_files/'; $css_file = $css_path.'admin-'.strtolower($object->GetDBField('Name')).'-'.$compile_ts.'.css';