Commit 524def36 authored by Thomas Maroschik's avatar Thomas Maroschik
Browse files

[TASK] Merge submodule version into core

parents 1763aede 742c3bb7
[submodule "typo3/sysext/version"]
path = typo3/sysext/version
url = git://git.typo3.org/TYPO3v4/CoreProjects/workspaces/version.git
version @ b6358dc4
Subproject commit b6358dc4f976e8477a68403568b6f61867fe994b
<?php
/***************************************************************
* Copyright notice
*
* (c) 2004-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Addition of the versioning item to the clickmenu
*
* @author Kasper Skrhj <kasperYYYY@typo3.com>
*/
/**
* [CLASS/FUNCTION INDEX of SCRIPT]
*
*
*
* 54: class tx_version_cm1
* 65: function main(&$backRef,$menuItems,$table,$uid)
* 111: function includeLL()
*
* TOTAL FUNCTIONS: 2
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
/**
* "Versioning" item added to click menu of elements.
*
* @author Kasper Skaarhoj <kasperYYYY@typo3.com>
* @package TYPO3
* @subpackage core
*/
class tx_version_cm1 {
/**
* Main function, adding the item to input menuItems array
*
* @param object References to parent clickmenu objects.
* @param array Array of existing menu items accumulated. New element added to this.
* @param string Table name of the element
* @param integer Record UID of the element
* @return array Modified menuItems array
*/
function main(&$backRef,$menuItems,$table,$uid) {
global $BE_USER,$TCA,$LANG;
$localItems = Array();
if (!$backRef->cmLevel && $uid>0 && $BE_USER->check('modules','web_txversionM1')) {
// Returns directly, because the clicked item was not from the pages table
if (!$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS']) return $menuItems;
// Adds the regular item
$LL = $this->includeLL();
// "Versioning" element added:
$url = t3lib_extMgm::extRelPath('version').'cm1/index.php?table='.rawurlencode($table).'&uid='.$uid;
$localItems[] = $backRef->linkItem(
$GLOBALS['LANG']->getLLL('title',$LL),
$backRef->excludeIcon('<img src="'.$backRef->backPath.t3lib_extMgm::extRelPath('version').'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'),
$backRef->urlRefForCM($url),
1
);
// "Send to review" element added:
$url = t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table=='pages'?$uid:$backRef->rec['pid']).'&table='.rawurlencode($table).'&uid='.$uid.'&sendToReview=1';
$localItems[] = $backRef->linkItem(
$GLOBALS['LANG']->getLLL('title_review',$LL),
$backRef->excludeIcon('<img src="'.$backRef->backPath.t3lib_extMgm::extRelPath('version').'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'),
$backRef->urlRefForCM($url),
1
);
// Find position of "delete" element:
reset($menuItems);
$c=0;
while(list($k)=each($menuItems)) {
$c++;
if (!strcmp($k,'delete')) break;
}
// .. subtract two (delete item + divider line)
$c-=2;
// ... and insert the items just before the delete element.
array_splice(
$menuItems,
$c,
0,
$localItems
);
}
return $menuItems;
}
/**
* Includes the [extDir]/locallang.php and returns the $LOCAL_LANG array found in that file.
*
* @return array Local lang array
*/
function includeLL() {
global $LANG;
return $LANG->includeLLFile('EXT:version/locallang.xml',FALSE);
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/version/class.tx_version_cm1.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/version/class.tx_version_cm1.php']);
}
?>
\ No newline at end of file
<?php
// DO NOT REMOVE OR CHANGE THESE 3 LINES:
define('TYPO3_MOD_PATH', 'sysext/version/cm1/');
$BACK_PATH = '../../../';
$MCONF['name'] = 'web_txversionM1';
$MLANG['default']['tabs_images']['tab'] = 'cm_icon.gif';
$MLANG['default']['ll_ref'] = 'LLL:EXT:version/locallang.xml';
$MCONF['script'] = 'index.php';
$MCONF['access'] = 'user,group';
?>
\ No newline at end of file
This diff is collapsed.
<?php
########################################################################
# Extension Manager/Repository config file for ext: "version"
#
# Auto generated 23-04-2008 10:26
#
# Manual updates:
# Only the data in the array - anything else is removed by next write.
# "version" and "dependencies" must not be touched!
########################################################################
$EM_CONF[$_EXTKEY] = array(
'title' => 'Versioning Management',
'description' => 'Backend Interface for management of the versioning API.',
'category' => 'be',
'author' => 'Kasper Skaarhoj',
'author_email' => 'kasperYYYY@typo3.com',
'shy' => '',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'module' => 'cm1',
'state' => 'beta',
'internal' => '',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'author_company' => '',
'version' => '1.2.0',
'_md5_values_when_last_written' => 'a:8:{s:24:"class.tx_version_cm1.php";s:4:"e612";s:12:"ext_icon.gif";s:4:"1bdc";s:14:"ext_tables.php";s:4:"6e9e";s:13:"locallang.xml";s:4:"176c";s:13:"cm1/clear.gif";s:4:"cc11";s:15:"cm1/cm_icon.gif";s:4:"f35b";s:12:"cm1/conf.php";s:4:"6ed8";s:13:"cm1/index.php";s:4:"3f4a";}',
'constraints' => array(
'depends' => array(
),
'conflicts' => array(
),
'suggests' => array(
),
),
'suggests' => array(
),
);
?>
\ No newline at end of file
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
if (TYPO3_MODE=='BE') {
$GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][]=array(
'name' => 'tx_version_cm1',
'path' => t3lib_extMgm::extPath($_EXTKEY).'class.tx_version_cm1.php'
);
t3lib_extMgm::addModule('web','txversionM1','',t3lib_extMgm::extPath($_EXTKEY).'cm1/');
}
?>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<description>Module labels</description>
<type>module</type>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="title">Versioning</label>
<label index="title_review">Send to review/pub</label>
<label index="mlang_labels_tablabel">Page and content versioning and workspace management for pages.</label>
<label index="mlang_labels_tabdescr">The Web&gt;Versioning module provides access to versioning features for the page tree.</label>
<label index="mlang_tabs_tab">Versioning</label>
<label index="function1">Function #1</label>
<label index="function2">Function #2</label>
<label index="function3">Function #3</label>
<label index="clickAPage_header">Web&gt;Versioning module</label>
<label index="clickAPage_content">Please click a page in the pagetree frame to see the versioning module.</label>
</languageKey>
</data>
</T3locallang>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment