forked from OpenMage/magento-mirror
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Magento Mirror
committed
Jan 17, 2009
1 parent
3fed190
commit 6bfe398
Showing
38 changed files
with
645 additions
and
540 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ final class Mage { | |
|
||
public static function getVersion() | ||
{ | ||
return '1.1.5'; | ||
return '1.1.6'; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,9 +31,10 @@ | |
* @package Mage_Adminhtml | ||
* @author Magento Core Team <[email protected]> | ||
*/ | ||
class Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Grid | ||
extends Mage_Adminhtml_Block_Widget_Grid | ||
class Mage_Adminhtml_Block_Extensions_Custom_Edit_Tab_Grid extends Mage_Adminhtml_Block_Widget_Grid | ||
{ | ||
protected $_defaultLimit = 200; | ||
|
||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
@@ -68,9 +69,6 @@ public function getCurrentUrl($params=array()) | |
|
||
public function getRowUrl($row) | ||
{ | ||
return $this->getUrl('*/*/load', array( | ||
'id' => $row->getFilenameId(), | ||
)); | ||
return $this->getUrl('*/*/load') . '?id=' . urlencode($row->getFilenameId()); | ||
} | ||
|
||
} |
102 changes: 0 additions & 102 deletions
102
app/code/core/Mage/Adminhtml/Helper/Dashboard/Visitor.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 95 additions & 13 deletions
108
app/code/core/Mage/Adminhtml/Model/Extension/Collection.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,105 @@ | ||
<?php | ||
/** | ||
* Magento | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to [email protected] so we can send you a copy immediately. | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Magento to newer | ||
* versions in the future. If you wish to customize Magento for your | ||
* needs please refer to http://www.magentocommerce.com for more information. | ||
* | ||
* @category Mage | ||
* @package Mage_Adminhtml | ||
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* Extension packages files collection | ||
* | ||
*/ | ||
class Mage_Adminhtml_Model_Extension_Collection extends Mage_Adminhtml_Model_Extension_Collection_Abstract | ||
{ | ||
public static $allowDirs = '/^[a-z0-9\.\-]+$/i'; | ||
public static $allowFiles = '/^[a-z0-9\.\-\_]+\.(xml|ser)$/i'; | ||
public static $disallowFiles = '/^package\.xml$/i'; | ||
|
||
/** | ||
* Get all packages identifiers | ||
* | ||
* @return array | ||
*/ | ||
protected function _fetchPackages() | ||
{ | ||
$_files = @glob(Mage::getBaseDir('var') . DS . 'pear' . DS . '{*\.ser,*\.xml}', GLOB_BRACE); | ||
$_items = array(); | ||
foreach ($_files as $_file) { | ||
$_file = str_replace(Mage::getBaseDir('var') . DS . 'pear' . DS, '', $_file); | ||
if ($_file == 'package.xml') { | ||
continue; | ||
} | ||
$_file = preg_replace('/\.ser|\.xml/', '', $_file); | ||
$_items[] = array( | ||
'filename' => $_file, | ||
'filename_id' => $_file | ||
$baseDir = Mage::getBaseDir('var') . DS . 'pear'; | ||
$files = array(); | ||
$this->_collectRecursive($baseDir, $files); | ||
$result = array(); | ||
foreach ($files as $file) { | ||
$file = preg_replace(array('/^' . preg_quote($baseDir . DS, '/') . '/', '/\.(xml|ser)$/'), '', $file); | ||
$result[] = array( | ||
'filename' => $file, | ||
'filename_id' => $file | ||
); | ||
} | ||
return $result; | ||
} | ||
|
||
return $_items; | ||
/** | ||
* Get package files from directory recursively | ||
* | ||
* @param string $dir | ||
* @param array &$result | ||
* @param bool $dirsFirst | ||
*/ | ||
protected function _collectRecursive($dir, &$result, $dirsFirst = true) | ||
{ | ||
$_result = glob($dir . DS . '*'); | ||
if (!$dirsFirst) { | ||
// collect all the stuff recursively | ||
foreach ($_result as $item) { | ||
if (is_dir($item) && preg_match(self::$allowDirs, basename($item))) { | ||
$this->_collectRecursive($item, $result, $dirsFirst); | ||
} | ||
elseif (is_file($item) | ||
&& preg_match(self::$allowFiles, basename($item)) | ||
&& !preg_match(self::$disallowFiles, basename($item))) { | ||
$result[] = $item; | ||
} | ||
} | ||
} | ||
else { | ||
// collect directories first | ||
$dirs = array(); | ||
$files = array(); | ||
foreach ($_result as $item) { | ||
if (is_dir($item) && preg_match(self::$allowDirs, basename($item))) { | ||
$dirs[] = $item; | ||
} | ||
elseif (is_file($item) | ||
&& preg_match(self::$allowFiles, basename($item)) | ||
&& !preg_match(self::$disallowFiles, basename($item))) { | ||
$files[] = $item; | ||
} | ||
} | ||
// search directories recursively | ||
foreach ($dirs as $item) { | ||
$this->_collectRecursive($item, $result, $dirsFirst); | ||
} | ||
// add files | ||
foreach ($files as $item) { | ||
$result[] = $item; | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.