Markshust_Enterprisefallback - Version 1.0.1

Version Notes

Initial release

Download this release

Release Info

Developer Mark Shust
Extension Markshust_Enterprisefallback
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0.0 to 1.0.1

app/code/community/Markshust/Enterprisefallback/Model/Design/Package.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Markshust
4
+ * @package Markshust_Enterprisefallback
5
+ * @author Mark Shust <mark@shust.com>
6
+ * @license http://sam.zoy.org/wtfpl/
7
+ */
8
+ class Markshust_Enterprisefallback_Model_Design_Package extends Mage_Core_Model_Design_Package
9
+ {
10
+ /**
11
+ * Use this one to get existing file name with fallback to default
12
+ *
13
+ * $params['_type'] is required
14
+ *
15
+ * @param string $file
16
+ * @param array $params
17
+ * @return string
18
+ */
19
+ public function getFilename($file, array $params)
20
+ {
21
+ Varien_Profiler::start(__METHOD__);
22
+ $this->updateParamDefaults($params);
23
+ $result = $this->_fallback($file, $params, array(
24
+ array(),
25
+ array('_theme' => $this->getFallbackTheme()),
26
+ array('_theme' => self::DEFAULT_THEME, '_package' => 'enterprise'),
27
+ array('_theme' => self::DEFAULT_THEME),
28
+ ));
29
+ Varien_Profiler::stop(__METHOD__);
30
+ return $result;
31
+ }
32
+
33
+ /**
34
+ * Get skin file url
35
+ *
36
+ * @param string $file
37
+ * @param array $params
38
+ * @return string
39
+ */
40
+ public function getSkinUrl($file = null, array $params = array())
41
+ {
42
+ Varien_Profiler::start(__METHOD__);
43
+ if (empty($params['_type'])) {
44
+ $params['_type'] = 'skin';
45
+ }
46
+ if (empty($params['_default'])) {
47
+ $params['_default'] = false;
48
+ }
49
+ $this->updateParamDefaults($params);
50
+ if (!empty($file)) {
51
+ $result = $this->_fallback($file, $params, array(
52
+ array(),
53
+ array('_theme' => $this->getFallbackTheme()),
54
+ array('_theme' => self::DEFAULT_THEME, '_package' => 'enterprise'),
55
+ array('_theme' => self::DEFAULT_THEME),
56
+ ));
57
+ }
58
+ $result = $this->getSkinBaseUrl($params) . (empty($file) ? '' : $file);
59
+ Varien_Profiler::stop(__METHOD__);
60
+ return $result;
61
+ }
62
+ }
app/code/community/Markshust/Enterprisefallback/README/CHANGELOG.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ Markshust_Enterprisefallback
2
+ --------------------------------------------------------------------------------
3
+ CHANGELOG
4
+ --------------------------------------------------------------------------------
5
+ 1.0.0 (Released NOV-30-2011)
6
+ - Initial release.
app/code/community/Markshust/Enterprisefallback/README/WTFPL.txt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
2
+ Version 2, December 2004
3
+
4
+ Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
5
+
6
+ Everyone is permitted to copy and distribute verbatim or modified
7
+ copies of this license document, and changing it is allowed as long
8
+ as the name is changed.
9
+
10
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
11
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
12
+
13
+ 0. You just DO WHAT THE FUCK YOU WANT TO.
app/code/community/Markshust/Enterprisefallback/etc/config.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ * @category Markshust
4
+ * @package Markshust_Enterprisefallback
5
+ * @author Mark Shust <mark@shust.com>
6
+ * @license http://sam.zoy.org/wtfpl/
7
+ -->
8
+ <config>
9
+ <modules>
10
+ <Markshust_Enterprisefallback>
11
+ <version>1.0.1</version>
12
+ </Markshust_Enterprisefallback>
13
+ </modules>
14
+
15
+ <global>
16
+ <models>
17
+ <core>
18
+ <rewrite>
19
+ <design_package>Markshust_Enterprisefallback_Model_Design_Package</design_package>
20
+ </rewrite>
21
+ </core>
22
+ </models>
23
+ </global>
24
+ </config>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Markshust_Enterprisefallback</name>
4
- <version>1.0.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://sam.zoy.org/wtfpl/">WTFPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension adds the Enterprise package/theme to the fallback layer of Magento.</summary>
10
  <description>This extension adds the Enterprise theme to the fallback layer of Magento. This allows you to create your own namespace_theme, while still falling back to the Enterprise package for non-existent files.</description>
11
- <notes>Initial release.</notes>
12
  <authors><author><name>Mark Shust</name><user>markoshust</user><email>mark@shust.com</email></author></authors>
13
- <date>2011-11-30</date>
14
- <time>22:12:50</time>
15
- <contents><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Markshust_Enterprisefallback.xml" hash="e5cdbc03b6dfa4a8b3e7e24a907aedb0"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name></name><channel>connect.magentocommerce.com/core</channel><min></min><max></max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Markshust_Enterprisefallback</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://sam.zoy.org/wtfpl/">WTFPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension adds the Enterprise package/theme to the fallback layer of Magento.</summary>
10
  <description>This extension adds the Enterprise theme to the fallback layer of Magento. This allows you to create your own namespace_theme, while still falling back to the Enterprise package for non-existent files.</description>
11
+ <notes>Initial release</notes>
12
  <authors><author><name>Mark Shust</name><user>markoshust</user><email>mark@shust.com</email></author></authors>
13
+ <date>2012-02-27</date>
14
+ <time>22:34:32</time>
15
+ <contents><target name="magecommunity"><dir name="Markshust"><dir name="Enterprisefallback"><dir name="Model"><dir name="Design"><file name="Package.php" hash="ba2786ecc7e7e10cc038f1dfe2554ea7"/></dir></dir><dir name="README"><file name="CHANGELOG.txt" hash="1d1a925876a0bdf8571933f26ae1c153"/><file name="WTFPL.txt" hash="f312a7c4d02230e8f2b537295d375c69"/></dir><dir name="etc"><file name="config.xml" hash="6ec9695cda7eb79a0781de7e90eeb069"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Markshust_Enterprisefallback.xml" hash="e5cdbc03b6dfa4a8b3e7e24a907aedb0"/></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>