Index: branches/5.1.x/core/units/helpers/skin_helper.php =================================================================== diff -u -r12657 -r13086 --- branches/5.1.x/core/units/helpers/skin_helper.php (.../skin_helper.php) (revision 12657) +++ branches/5.1.x/core/units/helpers/skin_helper.php (.../skin_helper.php) (revision 13086) @@ -9,7 +9,7 @@ * the GNU General Public License, and as distributed it includes * or is derivative of works licensed under the GNU General Public License * or other free or open source software licenses. -* See http://www.in-portal.net/license/ for copyright notices and details. +* See http://www.in-portal.org/license for copyright notices and details. */ defined('FULL_PATH') or die('restricted access!'); @@ -165,9 +165,9 @@ /** * Returns full path to primary admin skin using given or last compiled date * - * @param unknown_type $url - * @param unknown_type $compile_date - * @return unknown + * @param string $url + * @param int $compile_date + * @return string */ function getSkinPath($url = false, $compile_date = null) { @@ -205,4 +205,21 @@ return $last_compiled; } + + /** + * Deletes all compiled versions of all skins + * + */ + function deleteCompiled() + { + $dh = dir($this->_getStylesheetPath() . DIRECTORY_SEPARATOR); + + while (false !== ($file = $dh->read())) { + if ( preg_match('/admin-(.*)-([\d]+).css/', $file, $rets) ) { + unlink($dh->path . $file); + } + } + + $dh->close(); + } } \ No newline at end of file