Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/cck/base/form/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function getFields( $type, $client, $stage, $excluded, $idx, $cck
public static function getTemplateStyle( $id, $params = array() )
{
if ( ! $id ) {
return;
return true;
}
$query = 'SELECT a.id, a.template as name, a.params FROM #__template_styles AS a'
. ' LEFT JOIN #__cck_core_templates AS b ON b.name = a.template'
Expand Down
4 changes: 2 additions & 2 deletions libraries/cck/base/install/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public static function update( $path, $copyright )
} elseif ( is_file( $path ) ) {
$paths = array( 0=>$path );
} else {
return;
return true;
}

if ( count( $paths ) ) {
Expand Down Expand Up @@ -167,7 +167,7 @@ public static function zip( $path, $path_zip )
require_once JPATH_COMPONENT.'/helpers/pclzip/pclzip.lib.php';
$zip = new PclZip( $path_zip );
if ( $zip->create( $path, PCLZIP_OPT_REMOVE_PATH, $path ) == 0 ) {
return;
return true;
}
JFolder::delete( $path );

Expand Down
2 changes: 1 addition & 1 deletion libraries/cck/base/list/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public static function getSearch( $name, $id, $location = '' )
public static function getTemplateStyle( $id, $params = array() )
{
if ( ! $id ) {
return;
return true;
}
static $cache = array();

Expand Down
8 changes: 4 additions & 4 deletions libraries/cck/construction/field/cck.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function getInput()
$selectlabel = isset( $this->element['cck_selectlabel'] ) ? (string)$this->element['cck_selectlabel'] : 'undefined';

if ( ! $name ) {
return;
return true;
}

$format = (string)$this->element['js_format'];
Expand All @@ -58,7 +58,7 @@ protected function getInput()

$field = JCckDevField::getObject( $name );
if ( ! $field ) {
return;
return true;
}
$storage_field = $field->storage_field;
$field->storage_field = $this->name;
Expand Down Expand Up @@ -180,8 +180,8 @@ protected function _addScripts( $id, $events, $format )
$doc->addScriptDeclaration( $js );
}
}
return;

return true;
}
}
?>
4 changes: 2 additions & 2 deletions libraries/cck/construction/field/cckjs.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ protected function _addScripts( $id, $events, $format )
$doc->addScriptDeclaration( $js );
}
}
return;

return true;
}
}
?>
6 changes: 3 additions & 3 deletions libraries/cck/construction/field/cckpicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ protected function getInput()

$field = JCckDevField::getObject( $name );
if ( ! $field ) {
return;
return true;
}
$storage_field = $field->storage_field;
$field->storage_field = $this->name;
Expand Down Expand Up @@ -120,8 +120,8 @@ protected function _addScripts( $id, $params, $format )
if ( $css ) {
$doc->addStyleDeclaration( $css );
}
return;

return true;
}
}
?>
2 changes: 1 addition & 1 deletion libraries/cck/content/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static function getValues( $text, $fieldnames = '' )
public static function prepare( &$row = null, $name = 'description', $params = null )
{
if ( $row === null ) {
return;
return true;
}
if ( $params === null ) {
$params = new JObject;
Expand Down
6 changes: 3 additions & 3 deletions libraries/cck/development/plugins/plg_cck_field/%name%.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function onCCK_FieldPrepareContent( &$field, $value = '', &$config = arra
public function onCCK_FieldPrepareForm( &$field, $value = '', &$config = array(), $inherit = array(), $return = false )
{
if ( self::$type != $field->type ) {
return;
return true;
}
self::$path = parent::g_getPath( self::$type.'/' );
parent::g_onCCK_FieldPrepareForm( $field, $config );
Expand Down Expand Up @@ -97,7 +97,7 @@ public function onCCK_FieldPrepareForm( &$field, $value = '', &$config = array()
public function onCCK_FieldPrepareSearch( &$field, $value = '', &$config = array(), $inherit = array(), $return = false )
{
if ( self::$type != $field->type ) {
return;
return true;
}

// Prepare
Expand All @@ -113,7 +113,7 @@ public function onCCK_FieldPrepareSearch( &$field, $value = '', &$config = array
public function onCCK_FieldPrepareStore( &$field, $value = '', &$config = array(), $inherit = array(), $return = false )
{
if ( self::$type != $field->type ) {
return;
return true;
}

// Init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class plgCCK_Field_Restriction%class% extends JCckPluginRestriction
public static function onCCK_Field_RestrictionPrepareContent( &$field, &$config )
{
if ( self::$type != $field->restriction ) {
return;
return true;
}

$restriction = parent::g_getRestriction( $field->restriction_options );
Expand All @@ -33,7 +33,7 @@ public static function onCCK_Field_RestrictionPrepareContent( &$field, &$config
public static function onCCK_Field_RestrictionPrepareForm( &$field, &$config )
{
if ( self::$type != $field->restriction ) {
return;
return true;
}

$restriction = parent::g_getRestriction( $field->restriction_options );
Expand All @@ -45,7 +45,7 @@ public static function onCCK_Field_RestrictionPrepareForm( &$field, &$config )
public static function onCCK_Field_RestrictionPrepareStore( &$field, &$config )
{
if ( self::$type != $field->restriction ) {
return;
return true;
}

$restriction = parent::g_getRestriction( $field->restriction_options );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static function onCCK_Storage_LocationDelete( $pk, &$config = array() )
public function onCCK_Storage_LocationStore( $type, $data, &$config = array(), $pk = 0 )
{
if ( self::$type != $type ) {
return;
return true;
}

if ( ! @$config['storages'][self::$table]['_']->pk ) {
Expand Down
8 changes: 4 additions & 4 deletions libraries/cck/rendering/rendering.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function __call( $method, $args )
$property = strtolower( substr( $method, 3 ) );

if ( empty( $prefix ) ) {
return;
return true;
}

if ( $prefix == 'get' ) {
Expand Down Expand Up @@ -484,7 +484,7 @@ public function doExist( $fieldname = '' )
public function getLabel( $fieldname = '', $html = false, $suffix = '' )
{
if ( ! isset ( $this->me[$fieldname] ) ) {
return;
return true;
}

$label = trim( $this->me[$fieldname]->label );
Expand Down Expand Up @@ -781,8 +781,8 @@ protected function renderPos( $pos = '' )
include $pos;
return ob_get_clean();
}
return;

return true;
}

// renderPosition
Expand Down
8 changes: 4 additions & 4 deletions libraries/cck/rendering/rendering_item.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __call( $method, $args )
$property = strtolower( substr( $method, 3 ) );

if ( empty( $prefix ) ) {
return;
return true;
}

if ( $prefix == 'get' ) {
Expand Down Expand Up @@ -162,7 +162,7 @@ public function getFields( $position = '', $type = '', $prepare = true )
public function getLabel( $fieldname = '', $html = false, $suffix = '' )
{
if ( ! isset ( $this->me[$fieldname] ) ) {
return;
return true;
}

$label = trim( $this->me[$fieldname]->label );
Expand Down Expand Up @@ -261,8 +261,8 @@ protected function renderPos( $pos = '' )
include $pos;
return ob_get_clean();
}
return;

return true;
}

// renderPosition
Expand Down
8 changes: 4 additions & 4 deletions libraries/cms/cck/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ protected function getInstanceBase()
public function create( $cck, $data_content, $data_more = null, $data_more2 = null )
{
if ( $this->_id ) {
return;
return true;
}

$this->_type = $cck;
Expand All @@ -101,7 +101,7 @@ public function create( $cck, $data_content, $data_more = null, $data_more2 = nu
$this->_table = $this->_columns['table'];

if ( !$this->_object ) {
return;
return true;
}
}

Expand Down Expand Up @@ -271,7 +271,7 @@ public function load( $identifier, $data = true )
$this->_instance_base = $this->getInstanceBase();

if( !isset( $identifier[1] ) ) {
return;
return true;
}

$core = JCckDatabase::loadObject( 'SELECT id, cck, pk, storage_location FROM #__cck_core WHERE storage_location = "'.(string)$identifier[0].'" AND pk = '.(int)$identifier[1] );
Expand All @@ -292,7 +292,7 @@ public function load( $identifier, $data = true )
$this->_instance_base->load( $this->_pk );

if ( !$this->_columns['table'] ) {
return;
return true;
}

$this->_table = $this->_columns['table'];
Expand Down
10 changes: 5 additions & 5 deletions libraries/cms/cck/dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ public static function renderBlank( $html = '', $label = '' )
$app = JFactory::getApplication();

if ( $app->input->get( 'option' ) == 'com_cck' && $app->input->get( 'view' ) == 'form' ) {
return;
return true;
}

return '<li><label>'.$label.'</label>'.$html.'</li>';
Expand All @@ -593,14 +593,14 @@ public static function renderBlank( $html = '', $label = '' )
public static function renderHelp( $type, $url = '' )
{
if ( !$url ) {
return;
return true;
}

$app = JFactory::getApplication();
$raw = false;

if ( $app->input->get( 'option' ) == 'com_cck' && $app->input->get( 'view' ) == 'form' ) {
return;
return true;
}

switch ( $type ) {
Expand Down Expand Up @@ -637,7 +637,7 @@ public static function renderLegend( $legend, $tooltip = '', $tag = '1' )
$app = JFactory::getApplication();

if ( $app->input->get( 'option' ) == 'com_cck' && $app->input->get( 'view' ) == 'form' ) {
return;
return true;
}

if ( $tooltip != '' ) {
Expand All @@ -657,7 +657,7 @@ public static function renderSpacer( $legend, $tooltip = '', $tag = '2', $option
$app = JFactory::getApplication();

if ( $app->input->get( 'option' ) == 'com_cck' && $app->input->get( 'view' ) == 'form' ) {
return;
return true;
}

if ( isset( $app->cck_markup_closed ) && $app->cck_markup_closed === true ) {
Expand Down
6 changes: 3 additions & 3 deletions libraries/cms/cck/dev/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static function get( $field, $value, &$config = array( 'doTranslation'=>1
if ( ! is_object( $field ) ) {
$field = JCckDatabase::loadObject( 'SELECT a.* FROM #__cck_core_fields AS a WHERE a.name = "'.$field.'"' ); //#
if ( ! $field ) {
return;
return true;
}
}
$field->required_alert = '';
Expand Down Expand Up @@ -94,7 +94,7 @@ public static function getForm( $field, $value, &$config = array( 'doTranslation
if ( ! is_object( $field ) ) {
$field = JCckDatabase::loadObject( 'SELECT a.* FROM #__cck_core_fields AS a WHERE a.name = "'.$field.'"' ); //#
if ( ! $field ) {
return;
return true;
}
}
$field->required_alert = '';
Expand Down Expand Up @@ -165,7 +165,7 @@ public static function renderContent( $field, $value = '', &$config = array( 'do
if ( ! is_object( $field ) ) {
$field = JCckDatabase::loadObject( 'SELECT a.* FROM #__cck_core_fields AS a WHERE a.name = "'.$field.'"' ); //#
if ( ! $field ) {
return;
return true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/cms/cck/dev/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __call( $method, $args )
$property = strtolower( substr( $method, 3 ) );

if ( empty( $prefix ) ) {
return;
return true;
}

if ( $prefix == 'get' ) {
Expand Down
1 change: 1 addition & 0 deletions libraries/cms/cck/ecommerce/promotion.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public static function apply( $type, &$total, $items, $params = array() )
'title'=>$p->title,
'type'=>$p->type
);
break;
default:
break;
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/cck/field.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __call( $method, $args )
$property = strtolower( substr( $method, 3 ) );

if ( empty( $prefix ) ) {
return;
return true;
}

if ( $prefix == 'get' ) {
Expand All @@ -45,7 +45,7 @@ public function __call( $method, $args )
public static function getInstance( $name = '', $config = array( 'doTranslation'=>1, 'doValidation'=>2, 'mode'=>'content' ) )
{
if ( !$name ) {
return;
return true;
}

if ( empty( self::$instances[$name] ) ) {
Expand Down
4 changes: 2 additions & 2 deletions libraries/cms/cck/installer/script/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ function postflight( $type, $parent )
function postInstallMessage( $event, $pk = 0 )
{
if ( !( property_exists( $this, 'template_placeholder' ) && $this->template_placeholder != '' ) ) {
return;
return true;
}

if ( !version_compare( JVERSION, '3.2', 'ge' ) ) {
return;
return true;
}
if ( !$pk ) {
$db = JFactory::getDbo();
Expand Down
Loading