CoreFiles by mySites.guru
directory.php60 lines, 1,282 bytes, from Joomla_2.5.0-Stable-Full_Package.zip
Raw History Compare with 1.7.5
md5
181a9d81416ea9ac17cd5c2830984f3f
sha1
6c14eedbf7258577312080d86946801d71b3f335
sha256
be0b61ee1b5b725443dd1e13bb5ed43d4cde5642872131ba9adaa29feb2d2398
<?php
/**
 * @copyright	Copyright (C) 2005 - 2012 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 9 releases, Joomla 2.5.0 to 2.5.8. See them all, or every version of this file.