CoreFiles by mySites.guru
directory.php60 lines, 1,282 bytes, from Joomla_2.5.21-Stable-Full_Package.zip
Raw History Compare with 2.5.20
md5
1c43b4ac622137e50bb31379f42d6b0b
sha1
8d6b90215aaa78f2da1e8ae565a826ba46dfb1d6
sha256
171ca6c9bdeedc6f9b16fdc3a3d6fd99e4a496c1ab27b7bc188b7ef7978da897
<?php
/**
 * @copyright	Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

/**
 * Utility class working with directory
 *
 * @package		Joomla.Administrator
 * @subpackage	com_admin
 * @since		1.6
 */
abstract class JHtmlDirectory
{
	/**
	 * Method to generate a (un)writable message for directory
	 *
	 * @param	boolean	$writable is the directory writable?
	 *
	 * @return	string	html code
	 */
	public static function writable($writable)
	{
		if ($writable) {
			return '<span class="writable">'. JText::_('COM_ADMIN_WRITABLE') .'</span>';
		}
		else {
			return '<span class="unwritable">'. JText::_('COM_ADMIN_UNWRITABLE') .'</span>';
		}
	}

	/**
	 * Method to generate a message for a directory
	 *
	 * @param	string	$dir the directory
	 * @param	boolean	$message the message
	 * @param	boolean	$visible is the $dir visible?
	 *
	 * @return	string	html code
	 */
	public static function message($dir, $message, $visible=true)
	{
		if ($visible) {
			$output = $dir;
		}
		else {
			$output ='';
		}
		if (empty($message)) {
			return $output;
		}
		else {
			return $output.' <strong>'.JText::_($message).'</strong>';
		}
	}
}

The same content is in 11 releases, Joomla 2.5.18 to 2.5.28. See them all, or every version of this file.