Create documentation for your projects. Like so:
- Up/Down - Previous/Next Gist
- Ctrl+e - Edit a selected Gist
- Ctrl+s - Save Gist
<?php | |
// I almost never use $installer = $this; instead I prefer to use the following | |
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup'); | |
// This is just an example of instantiating the setup class in the script. Of | |
// course I choose the appropriate setup class and resource on a case by case basis. | |
// That way it is very visible what setup class is being used. It can also be | |
// switched within a single setup script, for example to add attributes to |
<?php | |
umask(0); | |
ini_set('memory_limit','512M'); | |
set_time_limit(0); | |
if(file_exists('app/Mage.php')) require 'app/Mage.php'; | |
else require '../../app/Mage.php'; | |
// Init without cache so we get a fresh version | |
Mage::app('admin','store', array('global_ban_use_cache' => TRUE)); |