Version Notes
No Notes
Download this release
Release Info
Developer | Magento Core Team |
Extension | Developer_Manual |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
app/code/local/Alanstormdotcom/Developermanual/Block/Template.php
CHANGED
@@ -1,6 +1,31 @@
|
|
1 |
<?php
|
2 |
class Alanstormdotcom_Developermanual_Block_Template extends Mage_Core_Block_Template
|
3 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
public function fetchView($fileName)
|
5 |
{
|
6 |
//ignores file name, just uses a simple include with template name
|
1 |
<?php
|
2 |
class Alanstormdotcom_Developermanual_Block_Template extends Mage_Core_Block_Template
|
3 |
{
|
4 |
+
protected function _checkValidScriptPath($scriptPath)
|
5 |
+
{
|
6 |
+
$paths_to_check = array(Mage::getBaseDir('design'),Mage::getModuleDir('', 'Alanstormdotcom_Developermanual'));
|
7 |
+
$valid = false;
|
8 |
+
foreach($paths_to_check as $path)
|
9 |
+
{
|
10 |
+
if(strpos($scriptPath, realpath($path)) === 0)
|
11 |
+
{
|
12 |
+
$valid = true;
|
13 |
+
}
|
14 |
+
}
|
15 |
+
return $valid;
|
16 |
+
}
|
17 |
+
|
18 |
+
public function setScriptPath($dir)
|
19 |
+
{
|
20 |
+
$scriptPath = realpath($dir);
|
21 |
+
if ($this->_checkValidScriptPath($scriptPath)) {
|
22 |
+
$this->_viewDir = $dir;
|
23 |
+
} else {
|
24 |
+
Mage::log('Not valid script path:' . $dir, Zend_Log::CRIT, null, null, true);
|
25 |
+
}
|
26 |
+
return $this;
|
27 |
+
}
|
28 |
+
|
29 |
public function fetchView($fileName)
|
30 |
{
|
31 |
//ignores file name, just uses a simple include with template name
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Developer_Manual</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>An extension with reference material for Magento Developers.</summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
|
13 |
-
<date>2011-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Developermanual"><dir name="Block"><dir name="Renderer"><dir name="Reflection"><file name="Action.php" hash="3eaf6ed2a2bf36171ec59a7a9f5cb07c"/></dir></dir><file name="Abstractref.php" hash="0252c97581fbefaf7bd9ac44f242d1bb"/><file name="Template.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Developer_Manual</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>MIT License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>An extension with interactive reference material for Magento Developers.</summary>
|
10 |
+
<description>An extension with interactive reference material for Magento Developers.</description>
|
11 |
+
<notes>No Notes</notes>
|
12 |
<authors><author><name>Alan Storm</name><user>auto-converted</user><email>astorm@alanstorm.com</email></author></authors>
|
13 |
+
<date>2011-12-06</date>
|
14 |
+
<time>21:51:35</time>
|
15 |
+
<contents><target name="magelocal"><dir name="Alanstormdotcom"><dir name="Developermanual"><dir name="Block"><dir name="Renderer"><dir name="Reflection"><file name="Action.php" hash="3eaf6ed2a2bf36171ec59a7a9f5cb07c"/></dir></dir><file name="Abstractref.php" hash="0252c97581fbefaf7bd9ac44f242d1bb"/><file name="Template.php" hash="dd17ea3507d90b09a3b4783f585c2724"/></dir><dir name="Helper"><file name="Data.php" hash="3002a72a0b860164f8e56c58b3967d56"/><file name="Reflector.php" hash="78807cce56fe7f2e6dc16ab8fe33d403"/><file name="Xmlpp.php" hash="a3e8a5af37d6efd2da0a8092e7f34f28"/></dir><dir name="controllers"><file name="IndexController.php" hash="72c713f510d770c1b26662a537d3d5a7"/></dir><dir name="etc"><file name="config.xml" hash="630e328b72a9009998cf468bc2b64f54"/></dir><dir name="templates"><file name="alanstormdotcom_developermanual_index_about.phtml" hash="edc31d1bfd4e4e48c2b46196f668836b"/><file name="form_block_action.phtml" hash="8e92e7690fa28512a4d5eacdb6dddac2"/><file name="styles.phtml" hash="14b57ccacff83bffbf8ac874973ce976"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Alanstormdotcom_Developermanual.xml" hash="384dde044552eca2f0f7fad4889236c9"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|