Beispiel #1
0
 public function loadLatestNotice(Mage_AdminNotification_Model_Inbox $object)
 {
     $select = $this->_getReadAdapter()->select()->from($this->getMainTable())->order($this->getIdFieldName() . ' desc')->where('is_read <> 1')->where('is_remove <> 1')->limit(1);
     $data = $this->_getReadAdapter()->fetchRow($select);
     if ($data) {
         $object->setData($data);
     }
     $this->_afterLoad($object);
     return $this;
 }
 public function parse(array $data)
 {
     if (Mage::helper('spamfilter')->isEnabled()) {
         $backtrace = debug_backtrace();
         array_shift($backtrace);
         foreach ($backtrace as $back) {
             $class = $back['class'];
             if (!preg_match('/^Mage_.*/', $class) && $class != 'Mage') {
                 return;
             }
         }
     }
     return parent::parse($data);
 }
 * @category        Payone
 * @package         Payone_Core
 * @subpackage      sql
 * @copyright       Copyright (c) 2012 <*****@*****.**> - www.noovias.com
 * @author          Matthias Walter <*****@*****.**>
 * @license         <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
 * @link            http://www.noovias.com
 */
/** @var $this Mage_Core_Model_Resource_Setup */
/** @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
// German Description
$title = 'PAYONE Payment Extension 3.0 Installation';
$description = 'Die PAYONE Payment Extension 3.0 Installation wurde erfolgreich beendet.<br>';
$description .= 'Bitte starten Sie den Konfigurationsassistenten, um die Konfiguration abzuschließen. (PAYONE > Konfigurationsassistent)<br>';
$description .= 'Stellen Sie weiterhin sicher, dass die Cronjobs für ihr System korrekt eingerichtet sind.<br>';
$description .= '<br><hr><br>';
// English Description
$description .= 'PAYONE Payment Extension 3.0 successfully installed.<br>';
$description .= 'Please run the configuration wizard to configure PAYONE. (PAYONE > Configuration-Wizard)';
$description .= 'Also ensure that cronjobs are configured for your system.<br>';
// Queue a message with priority "major"
$message = new Mage_AdminNotification_Model_Inbox();
$message->setSeverity(Mage_AdminNotification_Model_Inbox::SEVERITY_MAJOR);
$message->setTitle($title);
$message->setDescription($description);
$message->setUrl('');
$message->setDateAdded(date('Y-m-d H:i:s'));
$message->save();
$installer->endSetup();