Clockworkgeek_Adminrewrites - Version 1.0.2

Version Notes

PHP <5.3 compatibility

Download this release

Release Info

Developer Daniel Deady
Extension Clockworkgeek_Adminrewrites
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.2

.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /.buildpath
2
+ /.project
3
+ /.externalToolBuilders/
4
+ /.settings/
README.md ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Admin Rewrites allows you to enable URL rewriting for Magento's admin if the server supports it.
2
+
3
+ This means URLs that look like this:
4
+
5
+ http://www.example.com/index.php/admin/index/index/
6
+
7
+ Can now look like this instead:
8
+
9
+ http://www.example.com/admin/
10
+
11
+ **Beware!** Incorrect use could lock you out of admin and left unable to reverse the setting.
12
+ Should this happen you can still reach the Connect Manager by typing it's address directly:
13
+
14
+ http://www.example.com/downloader/
15
+
16
+ To install, get your extension key from [the Connect Marketplace](http://www.magentocommerce.com/magento-connect/admin-rewrites.html) or composer users can enter this command:
17
+
18
+ composer config repositories.firegento composer http://packages.firegento.com
19
+ composer require clockworkgeek/admin-rewrites
20
+
21
+ If you wish to edit this code then copy these files to an installed Magento directory, the package XML file is included so it will be available from _System > Magento Connect > Package Extensions > Load Local Package_.
22
+ You can then update and re-package as necessary.
app/code/community/Clockworkgeek/Adminrewrites/Model/Store.php CHANGED
@@ -49,6 +49,10 @@ class Clockworkgeek_Adminrewrites_Model_Store extends Mage_Core_Model_Store
49
  if (Mage::isInstalled() && $this->isAdmin() && $this->getConfig(self::XML_PATH_ADMIN_REWRITES)) {
50
  return $url;
51
  }
 
 
 
 
52
  return call_user_func_array('parent::_updatePathUseRewrites', func_get_args());
53
  }
54
 
49
  if (Mage::isInstalled() && $this->isAdmin() && $this->getConfig(self::XML_PATH_ADMIN_REWRITES)) {
50
  return $url;
51
  }
52
+ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
53
+ // before PHP had late static binding we must name the ancestor
54
+ return Mage_Core_Model_Store::_updatePathUseRewrites($url);
55
+ }
56
  return call_user_func_array('parent::_updatePathUseRewrites', func_get_args());
57
  }
58
 
app/code/community/Clockworkgeek/Adminrewrites/etc/config.xml CHANGED
@@ -18,7 +18,7 @@
18
  <config>
19
  <modules>
20
  <Clockworkgeek_Adminrewrites>
21
- <version>1.0.0</version>
22
  </Clockworkgeek_Adminrewrites>
23
  </modules>
24
  <global>
18
  <config>
19
  <modules>
20
  <Clockworkgeek_Adminrewrites>
21
+ <version>1.0.2</version>
22
  </Clockworkgeek_Adminrewrites>
23
  </modules>
24
  <global>
composer.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name":"clockworkgeek/admin-rewrites",
3
+ "type":"magento-module",
4
+ "license":"OSL-3.0",
5
+ "homepage":"https://github.com/clockworkgeek/Magento-Admin-Rewrites",
6
+ "description":"Enables URL rewriting for admin which removes 'index.php'",
7
+ "authors":[
8
+ {
9
+ "name":"Daniel Deady",
10
+ "email":"daniel@clockworkgeek.com"
11
+ }
12
+ ],
13
+ "suggest":{
14
+ "magento-hackathon/magento-composer-installer":"*"
15
+ }
16
+ }
modman ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ app/code/community/Clockworkgeek/Adminrewrites app/code/community/Clockworkgeek/Adminrewrites
2
+ app/etc/modules/Clockworkgeek_Adminrewrites.xml app/etc/modules/Clockworkgeek_Adminrewrites.xml
3
+ app/locale/en_US/Clockworkgeek_Adminrewrites.csv app/locale/en_US/Clockworkgeek_Adminrewrites.csv
4
+ var/connect/Clockworkgeek_Adminrewrites.xml var/connect/Clockworkgeek_Adminrewrites.xml
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Clockworkgeek_Adminrewrites</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
- <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>Enables URL rewriting for admin which removes "index.php".</summary>
10
- <description>Enables URL rewriting for admin which removes "index.php".</description>
11
- <notes>Tested to Magento 1.9.0.1</notes>
12
- <authors><author><name>Clockworkgeek</name><user>nonproffessional</user><email>daniel@clockworkgeek.com</email></author></authors>
13
- <date>2014-11-02</date>
14
- <time>13:15:28</time>
15
- <contents><target name="magecommunity"><dir name="Clockworkgeek"><dir name="Adminrewrites"><dir name="Model"><file name="Store.php" hash="e344e673fe0a1abe62a2dbcfa5bf9147"/></dir><dir name="etc"><file name="config.xml" hash="144f6a8c400f8b89be8c4e4d74f5d317"/><file name="system.xml" hash="2d9cc09afe7434f00468fa5465cacf56"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Clockworkgeek_Adminrewrites.xml" hash="e1851f89766d6031ca1e0e100d7b588c"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Clockworkgeek_Adminrewrites.csv" hash="867e78301664113b1819971035d528b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Clockworkgeek_Adminrewrites</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
+ <license>OSL-3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>Enables URL rewriting for admin which removes 'index.php'</summary>
10
+ <description/>
11
+ <notes>PHP &lt;5.3 compatibility</notes>
12
+ <authors><author><name>Daniel Deady</name><user>daniel</user><email>daniel@clockworkgeek.com</email></author></authors>
13
+ <date>2015-08-12</date>
14
+ <time>11:27:50</time>
15
+ <contents><target name="mageweb"><dir name="."><file name=".gitignore" hash="3e34e53292e6eeb708547b83509edc77"/><file name="README.md" hash="2abecaeec42d83fd0d298f5eb68ad7ce"/><file name="composer.json" hash="79d36c42ca5c8fd025763805f1e66b36"/><file name="modman" hash="87da0981a539c952edd907f9ee28b5f5"/></dir><dir name="var"><dir name="connect"><file name="Clockworkgeek_Adminrewrites.xml" hash="2d9fc21a14ab0b8c3cebb06eb2340e26"/></dir></dir></target><target name="magecommunity"><dir name="Clockworkgeek"><dir name="Adminrewrites"><dir name="Model"><file name="Store.php" hash="0f6f064cdc775e9f7994001ab915e595"/></dir><dir name="etc"><file name="config.xml" hash="d142472805d38f5221fa91fedb9758bd"/><file name="system.xml" hash="2d9cc09afe7434f00468fa5465cacf56"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Clockworkgeek_Adminrewrites.xml" hash="e1851f89766d6031ca1e0e100d7b588c"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Clockworkgeek_Adminrewrites.csv" hash="867e78301664113b1819971035d528b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
var/connect/Clockworkgeek_Adminrewrites.xml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <_>
2
+ <form_key>eb6Mntsdy4Bz6UAx</form_key>
3
+ <name>Clockworkgeek_Adminrewrites</name>
4
+ <channel>community</channel>
5
+ <version_ids>
6
+ <version_ids>2</version_ids>
7
+ </version_ids>
8
+ <summary>Enables URL rewriting for admin which removes &quot;index.php&quot;.</summary>
9
+ <description>Enables URL rewriting for admin which removes &quot;index.php&quot;.</description>
10
+ <license>OSL v3.0</license>
11
+ <license_uri>http://www.opensource.org/licenses/osl-3.0.php</license_uri>
12
+ <version>1.0.0</version>
13
+ <stability>stable</stability>
14
+ <notes>Tested to Magento 1.9.0.1</notes>
15
+ <authors>
16
+ <name>
17
+ <name>Clockworkgeek</name>
18
+ </name>
19
+ <user>
20
+ <user>nonproffessional</user>
21
+ </user>
22
+ <email>
23
+ <email>daniel@clockworkgeek.com</email>
24
+ </email>
25
+ </authors>
26
+ <depends_php_min>5.2.0</depends_php_min>
27
+ <depends_php_max>6.0.0</depends_php_max>
28
+ <depends>
29
+ <package>
30
+ <name>
31
+ <name/>
32
+ </name>
33
+ <channel>
34
+ <channel/>
35
+ </channel>
36
+ <min>
37
+ <min/>
38
+ </min>
39
+ <max>
40
+ <max/>
41
+ </max>
42
+ <files>
43
+ <files> </files>
44
+ </files>
45
+ </package>
46
+ <extension>
47
+ <name>
48
+ <name>PDO</name>
49
+ </name>
50
+ <min>
51
+ <min/>
52
+ </min>
53
+ <max>
54
+ <max/>
55
+ </max>
56
+ </extension>
57
+ </depends>
58
+ <contents>
59
+ <target>
60
+ <target>magelocal</target>
61
+ <target>magecommunity</target>
62
+ <target>mageetc</target>
63
+ <target>magelocale</target>
64
+ </target>
65
+ <path>
66
+ <path/>
67
+ <path>Clockworkgeek/Adminrewrites</path>
68
+ <path>modules/Clockworkgeek_Adminrewrites.xml</path>
69
+ <path>en_US/Clockworkgeek_Adminrewrites.csv</path>
70
+ </path>
71
+ <type>
72
+ <type>file</type>
73
+ <type>dir</type>
74
+ <type>file</type>
75
+ <type>file</type>
76
+ </type>
77
+ <include>
78
+ <include/>
79
+ <include/>
80
+ <include/>
81
+ <include/>
82
+ </include>
83
+ <ignore>
84
+ <ignore/>
85
+ <ignore/>
86
+ <ignore/>
87
+ <ignore/>
88
+ </ignore>
89
+ </contents>
90
+ </_>