[TYPO3-core] RFC: #16225: Disable draft workspace and migrate it to a real workspace

Oliver Klee typo3-german-01 at oliverklee.de
Thu Nov 4 10:00:53 CET 2010


Hi,

I've just noticed two more issues (no CGL stuff - just one bug and one
superfluous "if"):

> +class tx_coreupdates_migrateworkspaces extends tx_coreupdates_installsysexts {
> +	public $versionNumber;	// version number coming from t3lib_div::int_from_ver()
> +
> +	/**
> +	 * parent object
> +	 *
> +	 * @var tx_install
> +	 */
> +	public $pObj;
> +	public $userInput;	// user input
> +	public $sqlQueries;

[snip]

> +	protected function createWorkspace() {
> +			// @todo who are the reviewers and owners for this workspace?
> +			// In previous versions this was defined in be_groups/be_users with the setting "Edit in Draft"
> +		$data = array(
> +			'title' => 'Draft'
> +		);
> +		$GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_workspace', $data);
> +		$this->sqlQueries[] =  $GLOBALS['TYPO3_DB']->debug_lastBuiltQuery;

The way the field $sqlQueries is used here, it needs to be
declared/initialized as array() in the class.

> +	public function performUpdate(array &$databaseQueries, &$customMessages) {
[snip]
> +		if (is_array($this->sqlQueries) && is_array($databaseQueries)) {

The first check is not needed if $sqlQueries is properly initilalized,
and the second check is not needed because the type checking already
ensures that $databaseQueries is an array.


Oli

-- 
Certified TYPO3 Integrator | TYPO3 Security Team Member


More information about the TYPO3-team-core mailing list