Skip to content

Instantly share code, notes, and snippets.

@damienwebdev
Last active December 14, 2017 15:18
Show Gist options
  • Save damienwebdev/a56db084a5fbba55bd4bf5ecd773fc1f to your computer and use it in GitHub Desktop.
Save damienwebdev/a56db084a5fbba55bd4bf5ecd773fc1f to your computer and use it in GitHub Desktop.
Broken Widget function
<?php
class Mage_Core_Model_Layout_Update {
public function fetchDbLayoutUpdates($handle)
{
$_profilerKey = 'layout/db_update: '.$handle;
Varien_Profiler::start($_profilerKey);
$updateStr = $this->_getUpdateString($handle);
if (!$updateStr) {
return false;
}
$updateStr = '<update_xml>' . $updateStr . '</update_xml>';
$updateStr = str_replace($this->_subst['from'], $this->_subst['to'], $updateStr);
$updateXml = simplexml_load_string($updateStr, $this->getElementClass());
$this->fetchRecursiveUpdates($updateXml);
$this->addUpdate($updateXml->innerXml());
Varien_Profiler::stop($_profilerKey);
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment