[TYPO3-core] RFC: classes for List module ignore BACK_PATH

Franz Holzinger franz at fholzinger.com
Wed Dec 20 13:00:47 CET 2006


Hello Dmitry,

> Solution: add $this->backPath (in one place it is $this->doc->backPath) 
> where necessary.
> 
> List module works ok after such change.
> 
> I really home it comes to both branches (bug fix!) and comes fast 
> (pretty obvious fix). Currently TemplaVoila needs this thing ASAP and I 
> really hate to copy half of List module functions to TemplaVoila just to 
> fix this bug...

this is obviously a very important improvement.


Please add this line:

require_once ($BACK_PATH.'class.db_list.inc');
require_once ($BACK_PATH.'class.db_list_extra.inc');

This is needed for enhancing the thing with a class derived from it.

Also this should not remain:
'sysext/cms/layout/db_new_content_el.php';



still missing here:
'<img'.t3lib_iconWorks::skinImg('','gfx/new_el.gif','width="11"
height="12"').' title="'.$LANG->getLL('newRecordGeneral',1).'"
alt="" />'.

and here:
'<img'.t3lib_iconWorks::skinImg('','gfx/clip_pasteafter.gif','width="12"
height="12"').' title="'.$LANG->getLL('clip_paste',1).'" alt="" />'.


why this $GLOBALS["BACK_PATH"]?
'<img'.t3lib_iconWorks::skinImg($GLOBALS["BACK_PATH"],'gfx/goback.gif','width="14" height="14"').' title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack',1).'" alt="" />'.


missing here and many more t3lib_iconWorks::skinImg:

<img'.t3lib_iconWorks::skinImg('','gfx/i/pages_up.gif','width="18"
height="16"').'
title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel',1).'" alt="" /></a>':'';




class.db_list.inc:
===================

	// "Edit" link: ( Only if permissions to edit the page-record of the
content of the parent page ($this->id)
if ($permsEdit)	{
	$params='&edit['.$table.']['.$row['uid'].']=edit';
	$code = '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,'',-1)).'" title="'.$LANG->getLL('edit',1).'">'.
			$code.
			'</a>';
}

===>

$code = '<a href="#"
onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,
$this->backPath,-1)).'" title="'.$LANG->getLL('edit',1).'">'.


It would even be better if also XCLASSing would be possible:

----------------
db_list.php:

 require ('mod/web/list/conf.php');
 require ('init.php');
 require ('template.php');
-$LANG->includeLLFile('EXT:lang/locallang_mod_web_list.xml');
-require_once (PATH_t3lib.'class.t3lib_page.php');
-require_once (PATH_t3lib.'class.t3lib_pagetree.php');
-require_once (PATH_t3lib.'class.t3lib_recordlist.php');
-require_once (PATH_t3lib.'class.t3lib_clipboard.php');
-require_once ('class.db_list.inc');
-require_once ('class.db_list_extra.inc');
-$BE_USER->modAccess($MCONF,1);
 
-t3lib_BEfunc::lockRecords();
+require_once ('class.db_list_base.inc');
 
+$BE_USER->modAccess($MCONF,1);
 ------------------------

And all the code of the class SC_db_list should come into a new file.
Then someone could write a derived class of it and replace it using
XCLASS.


  * @package TYPO3
  * @subpackage core
  */
-class SC_db_list {
+class SC_db_list extends db_list_base {
+
-		// Internal, GPvars:
-	var $id;					// Page Id for which to make the listing
-	var $pointer;				// Pointer - for browsing list of records.
-	var $imagemode;				// Thumbnails or not
-	var $table;					// Which table to make extended listing for
-	var $search_field;			// Search-fields
-	var $search_levels;			// Search-levels
-	var $showLimit;			


So please, integrate all of these or tell me if you need assistance.



- Franz













More information about the TYPO3-team-core mailing list