Public Member Functions | |
| init () | |
| Standard init function of a module. | |
| handleExternalFunctionValue ($MM_key='function', $MS_value=NULL) | |
| This function is a copy of the same function in t3lib_SCbase with one modification: In contrast to t3lib_SCbase::handleExternalFunctionValue() this function merges the $this->extClassConf array instead of overwriting it. | |
| menuConfig () | |
| Configuration of which mod-menu items can be used. | |
| main () | |
| Main function for Extension Manager module. | |
| printContent () | |
| Print module content. | |
| extensionList_loaded () | |
| Listing of loaded (installed) extensions. | |
| extensionList_installed () | |
| Listing of available (installed) extensions. | |
| extensionList_import () | |
| Listing remote extensions from online repository. | |
| alterSettings () | |
| Allows changing of settings. | |
| importExtInfo ($extRepUid) | |
| Returns detailed info about an extension in the online repository. | |
| importExtFromRep ($extRepUid, $loc, $uploadFlag=0, $directInput='', $recentTranslations=0, $incManual=0) | |
| Imports an extensions from the online repository. | |
| showExtDetails ($extKey) | |
| Display extensions details. | |
| updatesForm ($extKey, $extInfo, $notSilent=0, $script='', $addFields='') | |
| Creates a form for an extension which contains all options for configuration, updates of database, clearing of cache etc. | |
| extDumpTables ($extKey, $extInfo) | |
| Creates view for dumping static tables and table/fields structures... | |
| getFileListOfExtension ($extKey, $conf) | |
| Returns file-listing of an extension. | |
| extDelete ($extKey, $extInfo) | |
| Delete extension from the file system. | |
| extUpdateEMCONF ($extKey, $extInfo) | |
| Update extension EM_CONF... | |
| extBackup ($extKey, $extInfo) | |
| Download extension as file / make backup. | |
| extBackup_dumpDataTablesLine ($tablesArray, $extKey) | |
| Link to dump of database tables. | |
| extInformationArray ($extKey, $extInfo, $remote=0) | |
| Prints a table with extension information in it. | |
| extInformationArray_dbReq ($techInfo, $tableHeader=0) | |
| Returns HTML with information about database requirements. | |
| extInformationArray_dbInst ($dbInst, $current) | |
| Double install warning. | |
| getRepositoryUploadForm ($extKey, $extInfo) | |
| Prints the upload form for extensions. | |
| extensionListRowHeader ($trAttrib, $cells, $import=0) | |
| Prints the header row for the various listings. | |
| extensionListRow ($extKey, $extInfo, $cells, $bgColorClass='', $inst_list=array(), $import=0, $altLinkUrl='') | |
| Prints a row with data for the various extension listings. | |
| wrapEmail ($str, $email) | |
| Wrapping input string in a link tag with link to email address. | |
| helpCol ($key) | |
| Returns help text if applicable. | |
| labelInfo ($str) | |
| Returns title and style attribute for mouseover help text. | |
| extensionTitleIconHeader ($extKey, $extInfo, $align='top') | |
| Returns a header for an extensions including icon if any. | |
| removeButton () | |
| Returns image tag for "uninstall". | |
| installButton () | |
| Returns image for "install". | |
| noImportMsg () | |
| Warning ( + text string) message about the impossibility to import extensions (both local and global locations are disabled...). | |
| getInstalledExtensions () | |
| Returns the list of available (installed) extensions. | |
| getInstExtList ($path, &$list, &$cat, $type) | |
| Gathers all extensions in $path. | |
| getImportExtList ($listArr) | |
| Maps remote extensions information into $cat/$list arrays for listing. | |
| setCat (&$cat, $listArrayPart, $extKey) | |
| Set category array entries for extension. | |
| makeDetailedExtensionAnalysis ($extKey, $extInfo, $validity=0) | |
| Perform a detailed, technical analysis of the available extension on server! Includes all kinds of verifications Takes some time to process, therfore use with care, in particular in listings. | |
| getClassIndexLocallangFiles ($absPath, $table_class_prefix, $extKey) | |
| Analyses the php-scripts of an available extension on server. | |
Public Attributes | |
| $versionDiffFactor = 1000 | |
| $systemInstall = 0 | |
| $repositoryUrl = '' | |
| $requiredExt = '' | |
| $maxUploadSize = 6024000 | |
| $kbMax = 100 | |
| $defaultCategories | |
| Internal variable loaded with extension categories (for display/listing). | |
| $categories | |
| Extension Categories (static var) Content must be redundant with the same internal variable as in class.tx_extrep.php! | |
| $states | |
| Extension States Content must be redundant with the same internal variable as in class.tx_extrep.php! | |
| $typeLabels | |
| "TYPE" information; labels, paths, description etc. | |
| $typeDescr | |
| $typePaths = Array() | |
| $typeBackPaths = Array() | |
| $typeRelPaths | |
| $remoteAccess | |
| Remote access types (labels). | |
| $detailCols | |
| $fe_user | |
| $privacyNotice = 'When ever you interact with the online repository server information is sent and stored in the repository for statistics. No personal information is sent only identification of this TYPO3 install. If you want know exactly what is sent look in typo3/tools/em/index.php function repTransferParams()' | |
| $editTextExtensions = 'htmlhtmtxtcsstmplincphpsqlconfcnfplpmsh' | |
| $nameSpaceExceptions = 'beuser_trackingdesign_componentsimpexpstatic_file_editcmsfreesitequickhelpclassic_welcomeindexed_searchsys_actionsys_workflowssys_todossys_messagesplugin_mgmdirect_mailsys_stattt_addresstt_boardtt_calendertt_guesttt_linkstt_newstt_polltt_ratingtt_productssetuptaskcentertsconfig_helpcontext_helpsys_notetstemplatelowlevelinstallbelogbeuserphpmyadminaboutmodulesimagelistsetuptaskcentersys_notepadviewpage' | |
| $MCONF = array() | |
| Loaded with the global array $MCONF which holds some module configuration from the conf.php file of backend modules. | |
| $MOD_MENU = array() | |
| The module menu items array. | |
| $MOD_SETTINGS = array() | |
| Current settings for the keys of the MOD_MENU array. | |
| $doc | |
| Generally used to hold an instance of the 'template' class from typo3/template.php. | |
| $content | |
| Generally used for accumulating the output content of backend modules. | |
| $inst_keys = array() | |
| $gzcompress = 0 | |
| $CMD = array() | |
| The value of GET/POST var, 'CMD'. | |
| $listRemote | |
|
|
Allows changing of settings.
Definition at line 868 of file index.php. References $content, t3lib_BEfunc::cshItem(), and table(). 00868 {
00869 $content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'settings', $GLOBALS['BACK_PATH'],'|<br/>');
00870 $content.= '
00871 <table border="0" cellpadding="2" cellspacing="2">
00872 <tr class="bgColor4">
00873 <td>Enter repository username:</td>
00874 <td><input type="text" name="SET[fe_u]" value="'.htmlspecialchars($this->MOD_SETTINGS['fe_u']).'" /></td>
00875 </tr>
00876 <tr class="bgColor4">
00877 <td>Enter repository password:</td>
00878 <td><input type="password" name="SET[fe_p]" value="'.htmlspecialchars($this->MOD_SETTINGS['fe_p']).'" /></td>
00879 </tr>
00880 <tr class="bgColor4">
00881 <td>Enter default upload password:</td>
00882 <td><input type="password" name="SET[fe_up]" value="'.htmlspecialchars($this->MOD_SETTINGS['fe_up']).'" /></td>
00883 </tr>
00884 </table>
00885
00886 <strong>Notice:</strong> This is <em>not</em> your password to the TYPO3 backend! This user information is what is needed to log in at typo3.org with your account there!<br />
00887 <br />
00888 <input type="submit" value="Update" />
00889 ';
00890
00891 $this->content.=$this->doc->section('Repository settings',$content,0,1);
00892 }
|
|
||||||||||||
|
Download extension as file / make backup.
Definition at line 1677 of file index.php. References $content, and table(). 01677 {
01678 $uArr = $this->makeUploadArray($extKey,$extInfo);
01679 if (is_array($uArr)) {
01680 $local_gzcompress = $this->gzcompress && !$this->CMD['dontCompress'];
01681 $backUpData = $this->makeUploadDataFromArray($uArr,intval($local_gzcompress));
01682 $filename = 'T3X_'.$extKey.'-'.str_replace('.','_',$extInfo['EM_CONF']['version']).($local_gzcompress?'-z':'').'-'.date('YmdHi').'.t3x';
01683 if (intval($this->CMD['doBackup'])==1) {
01684
01685 $mimeType = 'application/octet-stream';
01686 Header('Content-Type: '.$mimeType);
01687 Header('Content-Disposition: attachment; filename='.$filename);
01688
01689 // New headers suggested by Xin:
01690 // For now they are commented out because a) I have seen no official support yet, b) when clicking the back-link in MSIE after download you see ugly binary stuff and c) I couldn't see a BIG difference, in particular not in Moz/Opera.
01691 /* header('Content-Type: application/force-download');
01692 header('Content-Length: '.strlen($backUpData));
01693
01694 header('Content-Disposition: attachment; filename='.$filename);
01695 header('Content-Description: File Transfer');
01696 header('Content-Transfer-Encoding: binary');
01697 */
01698
01699 // ANYWAYS! The download is NOT always working - in some cases extensions will never get the same MD5 sum as the one shown at the download link - and they should in order to work! We do NOT know why yet.
01700
01701 echo $backUpData;
01702 exit;
01703 } elseif ($this->CMD['dumpTables']) {
01704 $filename='T3X_'.$extKey;
01705 $cTables = count(explode(',',$this->CMD['dumpTables']));
01706 if ($cTables>1) {
01707 $filename.='-'.$cTables.'tables';
01708 } else {
01709 $filename.='-'.$this->CMD['dumpTables'];
01710 }
01711 $filename.='+adt.sql';
01712
01713 $mimeType = 'application/octet-stream';
01714 Header('Content-Type: '.$mimeType);
01715 Header('Content-Disposition: attachment; filename='.$filename);
01716 echo $this->dumpStaticTables($this->CMD['dumpTables']);
01717 exit;
01718 } else {
01719 $techInfo = $this->makeDetailedExtensionAnalysis($extKey,$extInfo);
01720 // if ($techInfo['tables']||$techInfo['static']||$techInfo['fields']) {
01721 #debug($techInfo);
01722 $lines=array();
01723 $lines[]='<tr class="bgColor5"><td colspan="2"><strong>Make selection:</strong></td></tr>';
01724 $lines[]='<tr class="bgColor4"><td><strong>Extension files:</strong></td><td>'.
01725 '<a href="'.htmlspecialchars('index.php?CMD[doBackup]=1&CMD[showExt]='.$extKey).'">Download extension "'.$extKey.'" as a file</a><br />('.$filename.', '.t3lib_div::formatSize(strlen($backUpData)).', MD5: '.md5($backUpData).')<br />'.
01726 ($this->gzcompress ? '<br /><a href="'.htmlspecialchars('index.php?CMD[doBackup]=1&CMD[dontCompress]=1&CMD[showExt]='.$extKey).'">(Click here to download extension without compression.)</a>':'').
01727 '</td></tr>';
01728
01729 if (is_array($techInfo['tables'])) { $lines[]='<tr class="bgColor4"><td><strong>Data tables:</strong></td><td>'.$this->extBackup_dumpDataTablesLine($techInfo['tables'],$extKey).'</td></tr>'; }
01730 if (is_array($techInfo['static'])) { $lines[]='<tr class="bgColor4"><td><strong>Static tables:</strong></td><td>'.$this->extBackup_dumpDataTablesLine($techInfo['static'],$extKey).'</td></tr>'; }
01731
01732 $content = '<table border="0" cellpadding="2" cellspacing="2">'.implode('',$lines).'</table>';
01733 return $content;
01734 }
01735 } else die('Error...');
01736 }
|
|
||||||||||||
|
Link to dump of database tables.
Definition at line 1745 of file index.php. References table(). 01745 {
01746 $tables = array();
01747 $tablesNA = array();
01748
01749 foreach($tablesArray as $tN) {
01750 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $tN, '');
01751 if (!$GLOBALS['TYPO3_DB']->sql_error()) {
01752 $row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
01753 $tables[$tN]='<tr><td> </td><td><a href="'.htmlspecialchars('index.php?CMD[dumpTables]='.rawurlencode($tN).'&CMD[showExt]='.$extKey).'" title="Dump table \''.$tN.'\'">'.$tN.'</a></td><td> </td><td>'.$row[0].' records</td></tr>';
01754 } else {
01755 $tablesNA[$tN]='<tr><td> </td><td>'.$tN.'</td><td> </td><td>Did not exist.</td></tr>';
01756 }
01757 }
01758 $label = '<table border="0" cellpadding="0" cellspacing="0">'.implode('',array_merge($tables,$tablesNA)).'</table>';// Candidate for t3lib_div::array_merge() if integer-keys will some day make trouble...
01759 if (count($tables)) {
01760 $label = '<a href="'.htmlspecialchars('index.php?CMD[dumpTables]='.rawurlencode(implode(',',array_keys($tables))).'&CMD[showExt]='.$extKey).'" title="Dump all existing tables.">Download all data from:</a><br /><br />'.$label;
01761 } else $label = 'Nothing to dump...<br /><br />'.$label;
01762 return $label;
01763 }
|
|
||||||||||||
|
Delete extension from the file system.
Definition at line 1626 of file index.php. References $content, and t3lib_extMgm::isLoaded(). 01626 {
01627 $absPath = $this->getExtPath($extKey,$extInfo['type']);
01628 if (t3lib_extMgm::isLoaded($extKey)) {
01629 return 'This extension is currently installed (loaded and active) and so cannot be deleted!';
01630 } elseif (!$this->deleteAsType($extInfo['type'])) {
01631 return 'You cannot delete (and install/update) extensions in the '.$this->typeLabels[$extInfo['type']].' scope.';
01632 } elseif (t3lib_div::inList('G,L',$extInfo['type'])) {
01633 if ($this->CMD['doDelete'] && !strcmp($absPath,$this->CMD['absPath'])) {
01634 $res = $this->removeExtDirectory($absPath);
01635 if ($res) {
01636 return 'ERROR: Could not remove extension directory "'.$absPath.'". Had the following errors:<br /><br />'.
01637 nl2br($res);
01638 } else {
01639 return 'Removed extension in path "'.$absPath.'"!';
01640 }
01641 } else {
01642 $onClick = "if (confirm('Are you sure you want to delete this extension from the server?')) {document.location='index.php?CMD[showExt]=".$extKey.'&CMD[doDelete]=1&CMD[absPath]='.rawurlencode($absPath)."';}";
01643 $content.= '<a href="#" onclick="'.htmlspecialchars($onClick).' return false;"><strong>DELETE EXTENSION FROM SERVER</strong> (in the "'.$this->typeLabels[$extInfo['type']].'" location "'.substr($absPath,strlen(PATH_site)).'")!</a>';
01644 $content.= '<br /><br />(Maybe you should make a backup first, see above.)';
01645 return $content;
01646 }
01647 } else return 'Extension is not a global or local extension and cannot be removed.';
01648 }
|
|
||||||||||||
|
Creates view for dumping static tables and table/fields structures...
Definition at line 1508 of file index.php. References PATH_site, and table(). 01508 {
01509
01510 // Get dbInfo which holds the structure known from the tables.sql file
01511 $techInfo = $this->makeDetailedExtensionAnalysis($extKey,$extInfo);
01512 $absPath = $this->getExtPath($extKey,$extInfo['type']);
01513
01514 // Static tables:
01515 if (is_array($techInfo['static'])) {
01516 if ($this->CMD['writeSTATICdump']) { // Writing static dump:
01517 $writeFile = $absPath.'ext_tables_static+adt.sql';
01518 if (@is_file($writeFile)) {
01519 $dump_static = $this->dumpStaticTables(implode(',',$techInfo['static']));
01520 t3lib_div::writeFile($writeFile,$dump_static);
01521 $this->content.=$this->doc->section('Table and field structure required',t3lib_div::formatSize(strlen($dump_static)).'bytes written to '.substr($writeFile,strlen(PATH_site)),0,1);
01522 }
01523 } else { // Showing info about what tables to dump - and giving the link to execute it.
01524 $msg = 'Dumping table content for static tables:<br />';
01525 $msg.= '<br />'.implode('<br />',$techInfo['static']).'<br />';
01526
01527 // ... then feed that to this function which will make new CREATE statements of the same fields but based on the current database content.
01528 $this->content.=$this->doc->section('Static tables',$msg.'<hr /><strong><a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[writeSTATICdump]=1').'">Write current static table contents to ext_tables_static+adt.sql now!</a></strong>',0,1);
01529 $this->content.=$this->doc->spacer(20);
01530 }
01531 }
01532
01533 // Table and field definitions:
01534 if (is_array($techInfo['dump_tf'])) {
01535 $dump_tf_array = $this->getTableAndFieldStructure($techInfo['dump_tf']);
01536 $dump_tf = $this->dumpTableAndFieldStructure($dump_tf_array);
01537 if ($this->CMD['writeTFdump']) {
01538 $writeFile = $absPath.'ext_tables.sql';
01539 if (@is_file($writeFile)) {
01540 t3lib_div::writeFile($writeFile,$dump_tf);
01541 $this->content.=$this->doc->section('Table and field structure required',t3lib_div::formatSize(strlen($dump_tf)).'bytes written to '.substr($writeFile,strlen(PATH_site)),0,1);
01542 }
01543 } else {
01544 $msg = 'Dumping current database structure for:<br />';
01545 if (is_array($techInfo['tables'])) {
01546 $msg.= '<br /><strong>Tables:</strong><br />'.implode('<br />',$techInfo['tables']).'<br />';
01547 }
01548 if (is_array($techInfo['fields'])) {
01549 $msg.= '<br /><strong>Solo-fields:</strong><br />'.implode('<br />',$techInfo['fields']).'<br />';
01550 }
01551
01552 // ... then feed that to this function which will make new CREATE statements of the same fields but based on the current database content.
01553 $this->content.=$this->doc->section('Table and field structure required',$msg.'<hr /><strong><a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[writeTFdump]=1').'">Write this dump to ext_tables.sql now!</a></strong><hr />
01554 <pre>'.htmlspecialchars($dump_tf).'</pre>',0,1);
01555
01556
01557 $details = ' This dump is based on two factors:<br />
01558 <ul>
01559 <li>1) All tablenames in ext_tables.sql which are <em>not</em> found in the "modify_tables" list in ext_emconf.php are dumped with the current database structure.</li>
01560 <li>2) For any tablenames which <em>are</em> listed in "modify_tables" all fields and keys found for the table in ext_tables.sql will be re-dumped with the fresh equalents from the database.</li>
01561 </ul>
01562 Bottomline is: Whole tables are dumped from database with no regard to which fields and keys are defined in ext_tables.sql. But for tables which are only modified, any NEW fields added to the database must in some form or the other exist in the ext_tables.sql file as well.<br />';
01563 $this->content.=$this->doc->section('',$details);
01564 }
01565 }
01566 }
|
|
|
Listing remote extensions from online repository.
Definition at line 707 of file index.php. References $content, t3lib_BEfunc::cshItem(), t3lib_extMgm::isLoaded(), and table(). 00707 {
00708 global $TYPO3_LOADED_EXT;
00709
00710 // Listing from online repository:
00711 if ($this->listRemote) {
00712 list($inst_list,$inst_cat) = $this->getInstalledExtensions();
00713 $this->inst_keys = array_flip(array_keys($inst_list));
00714
00715 $this->detailCols[1]+=6;
00716
00717 // Getting data from repository:
00718 $repositoryUrl=$this->repositoryUrl.
00719 $this->repTransferParams().
00720 '&tx_extrep[cmd]=currentListing'.
00721 ($this->MOD_SETTINGS['own_member_only']?'&tx_extrep[listmode]=1':'').
00722 ($this->listRemote_search ? '&tx_extrep[search]='.rawurlencode($this->listRemote_search) : '');
00723
00724 $fetchData = $this->fetchServerData($repositoryUrl);
00725
00726 if (is_array($fetchData)) {
00727 $listArr = $fetchData[0];
00728 list($list,$cat) = $this->getImportExtList($listArr);
00729
00730 // Available extensions
00731 if (is_array($cat[$this->MOD_SETTINGS['listOrder']])) {
00732 $content='';
00733 $lines=array();
00734 $lines[]=$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'),1);
00735
00736 foreach($cat[$this->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
00737 if (count($extEkeys)) {
00738 $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
00739 $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/i/sysf.gif" width="18" height="16" align="top" alt="" /><strong>'.$this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName).'</strong></td></tr>';
00740
00741 asort($extEkeys);
00742 reset($extEkeys);
00743 while(list($extKey)=each($extEkeys)) {
00744 if ($this->MOD_SETTINGS['display_shy'] || !$list[$extKey]['EM_CONF']['shy']) {
00745 $loadUnloadLink='';
00746 if ($inst_list[$extKey]['type']!='S' && (!isset($inst_list[$extKey]) || $this->versionDifference($list[$extKey]['EM_CONF']['version'],$inst_list[$extKey]['EM_CONF']['version'],$this->versionDiffFactor))) {
00747 if (isset($inst_list[$extKey])) {
00748 // update
00749 $loc= ($inst_list[$extKey]['type']=='G'?'G':'L');
00750 $aUrl = 'index.php?CMD[importExt]='.$list[$extKey]['extRepUid'].'&CMD[loc]='.$loc.($this->getDocManual($extKey,$loc)?'&CMD[inc_manual]=1':'');
00751 $loadUnloadLink.= '<a href="'.htmlspecialchars($aUrl).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/import_update.gif" width="12" height="12" title="Update the extension in \''.($loc=='G'?'global':'local').'\' from online repository to server" alt="" /></a>';
00752 } else {
00753 // import
00754 $aUrl = 'index.php?CMD[importExt]='.$list[$extKey]['extRepUid'].'&CMD[loc]=L'.($this->getDocManual($extKey)?'&CMD[inc_manual]=1':'');
00755 $loadUnloadLink.= '<a href="'.htmlspecialchars($aUrl).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/import.gif" width="12" height="12" title="Import this extension to \'local\' dir typo3conf/ext/ from online repository." alt="" /></a>';
00756 }
00757 } else {
00758 $loadUnloadLink = ' ';
00759 }
00760
00761 if ($list[$extKey]['_MEMBERS_ONLY']) {
00762 $theRowClass = 'em-private';
00763 } elseif (isset($inst_list[$extKey])) {
00764 $theRowClass = t3lib_extMgm::isLoaded($extKey) ? 'em-listbg1' : 'em-listbg2';
00765 } else {
00766 $theRowClass = 'em-listbg3';
00767 }
00768 $lines[]=$this->extensionListRow($extKey,$list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'),$theRowClass,$inst_list,1,'index.php?CMD[importExtInfo]='.$list[$extKey]['extRepUid']);
00769 }
00770 }
00771 }
00772 }
00773
00774 // CSH:
00775 $content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'import_ter', $GLOBALS['BACK_PATH'],'|<br/>');
00776
00777 $content.= '
00778
00779 <!-- TER Extensions list -->
00780 <table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
00781
00782 $content.= '<br />Data fetched: ['.implode('][',$fetchData[1]).']';
00783 $content.= '<br /><br /><strong>PRIVACY NOTICE:</strong><br /> '.$this->privacyNotice;
00784
00785 $this->content.=$this->doc->section('Extensions in TYPO3 Extension Repository (online) - Order by: '.$this->MOD_MENU['listOrder'][$this->MOD_SETTINGS['listOrder']],$content,0,1);
00786
00787 if (!$this->MOD_SETTINGS['own_member_only'] && !$this->listRemote_search) {
00788 // Plugins which are NOT uploaded to repository but present on this server.
00789 $content='';
00790 $lines=array();
00791 if (count($this->inst_keys)) {
00792 $lines[]=$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'));
00793
00794 reset($this->inst_keys);
00795 while(list($extKey)=each($this->inst_keys)) {
00796 if ($this->MOD_SETTINGS['display_shy'] || !$inst_list[$extKey]['EM_CONF']['shy']) {
00797 $loadUnloadLink = t3lib_extMgm::isLoaded($extKey)?
00798 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->removeButton().'</a>':
00799 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->installButton().'</a>';
00800 if (in_array($extKey,$this->requiredExt)) $loadUnloadLink='<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('Rq').'</strong>';
00801 $lines[]=$this->extensionListRow($extKey,$inst_list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'),t3lib_extMgm::isLoaded($extKey)?'em-listbg1':'em-listbg2');
00802 }
00803 }
00804 }
00805
00806 $content.= 'This is the list of extensions which are either user-defined (should be prepended user_ then) or which are private (and does not show up in the public list above).<br /><br />';
00807 $content.= '<table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
00808 $this->content.=$this->doc->spacer(20);
00809 $this->content.=$this->doc->section('Extensions found only on this server',$content,0,1);
00810 }
00811 }
00812 }
00813 } else {
00814 // CSH
00815 $content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'import', $GLOBALS['BACK_PATH'],'|<br/>');
00816 $content.= 'Click here to connect to "'.$this->repositoryUrl.'" and retrieve the list of publicly available plugins from the TYPO3 Extension Repository.<br />';
00817
00818 if ($this->fe_user['username']) {
00819 $content.= '<br /><img src="'.$GLOBALS['BACK_PATH'].'gfx/icon_note.gif" width="18" height="16" align="top" alt="" />Repository username "'.$this->fe_user['username'].'" will be sent as authentication.<br />';
00820 } else {
00821 $content.= '<br /><img src="'.$GLOBALS['BACK_PATH'].'gfx/icon_warning2.gif" width="18" height="16" align="top" alt="" />You have not configured a repository username/password yet. Please <a href="index.php?SET[function]=3">go to "Settings"</a> and do that.<br />';
00822 }
00823
00824 $onCLick = "document.location='index.php?ter_connect=1&ter_search='+escape(this.form['_lookUp'].value);return false;";
00825 $content.= '<br />
00826 Look up: <input type="text" name="_lookUp" value="" />
00827 <input type="submit" value="Connect to online repository" onclick="'.htmlspecialchars($onCLick).'" />';
00828
00829 $this->content.=$this->doc->section('Extensions in TYPO3 Extension Repository',$content,0,1);
00830 }
00831
00832 // Private lookup:
00833 /*
00834 $onClick = 'document.location=\'index.php?CMD[importExtInfo]=\'+document.pageform.uid_private_key.value+\'&CMD[download_password]=\'+document.pageform.download_password.value; return false;';
00835 $content= 'Privat lookup key: <input type="text" name="uid_private_key" /> Password, if any: <input type="text" name="download_password" /><input type="submit" value="Lookup" onclick="'.htmlspecialchars($onClick).'" />';
00836 $this->content.=$this->doc->spacer(20);
00837 $this->content.=$this->doc->section('Private extension lookup:',$content,0,1);
00838 */
00839
00840 // Upload:
00841 if ($this->importAtAll()) {
00842 $content= '</form><form action="index.php" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" method="post">
00843 Upload extension file (.t3x):<br />
00844 <input type="file" size="60" name="upload_ext_file" /><br />
00845 ... in location:<br />
00846 <select name="CMD[loc]">';
00847 if ($this->importAsType('L')) $content.='<option value="L">Local (../typo3conf/ext/)</option>';
00848 if ($this->importAsType('G')) $content.='<option value="G">Global (typo3/ext/)</option>';
00849 if ($this->importAsType('S')) $content.='<option value="S">System (typo3/sysext/)</option>';
00850 $content.='</select><br />
00851 <input type="checkbox" value="1" name="CMD[uploadOverwrite]" /> Overwrite any existing extension!<br />
00852 <input type="submit" name="CMD[uploadExt]" value="Upload extension file" /><br />
00853 ';
00854 if (!$this->gzcompress) {
00855 $content.='<br />'.$GLOBALS['TBE_TEMPLATE']->rfw("NOTE: No decompression available! Don't upload a compressed extension - it will not succeed.");
00856 }
00857 } else $content=$this->noImportMsg();
00858
00859 $this->content.=$this->doc->spacer(20);
00860 $this->content.=$this->doc->section('Upload extension file directly (.t3x):',$content,0,1);
00861 }
|
|
|
Listing of available (installed) extensions.
Definition at line 637 of file index.php. References $content, t3lib_BEfunc::cshItem(), t3lib_extMgm::isLoaded(), and table(). 00637 {
00638 global $TYPO3_LOADED_EXT;
00639
00640 list($list,$cat)=$this->getInstalledExtensions();
00641
00642 // Available extensions
00643 if (is_array($cat[$this->MOD_SETTINGS['listOrder']])) {
00644 $content='';
00645 $lines=array();
00646 $lines[]=$this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="18" height="1" alt="" /></td>'));
00647
00648 $allKeys=array();
00649 foreach($cat[$this->MOD_SETTINGS['listOrder']] as $catName => $extEkeys) {
00650 $allKeys[]='';
00651 $allKeys[]='TYPE: '.$catName;
00652
00653 $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
00654 $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img src="'.$GLOBALS['BACK_PATH'].'gfx/i/sysf.gif" width="18" height="16" align="top" alt="" /><strong>'.$this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName).'</strong></td></tr>';
00655
00656 asort($extEkeys);
00657 reset($extEkeys);
00658 while(list($extKey)=each($extEkeys)) {
00659 $allKeys[]=$extKey;
00660 if ($this->MOD_SETTINGS['display_shy'] || !$list[$extKey]['EM_CONF']['shy']) {
00661 $loadUnloadLink = t3lib_extMgm::isLoaded($extKey)?
00662 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->removeButton().'</a>':
00663 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->installButton().'</a>';
00664 if (in_array($extKey,$this->requiredExt)) $loadUnloadLink='<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('Rq').'</strong>';
00665
00666 if ($list[$extKey]['EM_CONF']['private']) {
00667 $theRowClass = 'em-private';
00668 } else {
00669 $theRowClass = t3lib_extMgm::isLoaded($extKey)? 'em-listbg1' : 'em-listbg2';
00670 }
00671 $lines[]=$this->extensionListRow($extKey,$list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'),$theRowClass);
00672 }
00673 }
00674 }
00675
00676 $content.='
00677
00678
00679 <!--
00680 EXTENSION KEYS:
00681
00682
00683 '.trim(implode(chr(10),$allKeys)).'
00684
00685 -->
00686
00687
00688
00689
00690 ';
00691
00692 #debug($this->MOD_SETTINGS['listOrder']);
00693 $content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'avail', $GLOBALS['BACK_PATH'],'|<br/>');
00694 $content.= 'If you want to use an extension in TYPO3, you should simply click the "plus" button '.$this->installButton().' . <br />
00695 Installed extensions can also be removed again - just click the remove button '.$this->removeButton().' .<br /><br />';
00696 $content.= '<table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
00697
00698 $this->content.=$this->doc->section('Available Extensions - Order by: '.$this->MOD_MENU['listOrder'][$this->MOD_SETTINGS['listOrder']],$content,0,1);
00699 }
00700 }
|
|
|
Listing of loaded (installed) extensions.
Definition at line 599 of file index.php. References $content, t3lib_BEfunc::cshItem(), and table(). 00599 {
00600 global $TYPO3_LOADED_EXT;
00601
00602 list($list) = $this->getInstalledExtensions();
00603
00604 // Loaded extensions
00605 $content = '';
00606 $lines = array();
00607 $lines[] = $this->extensionListRowHeader(' class="bgColor5"',array('<td><img src="clear.gif" width="1" height="1" alt="" /></td>'));
00608
00609 foreach($TYPO3_LOADED_EXT as $extKey => $eConf) {
00610 if (strcmp($extKey, '_CACHEFILE')) {
00611 if ($this->MOD_SETTINGS['display_shy'] || !$list[$extKey]['EM_CONF']['shy']) {
00612 if (in_array($extKey, $this->requiredExt)) {
00613 $loadUnloadLink = '<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('Rq').'</strong>';
00614 } else {
00615 $loadUnloadLink = '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1').'">'.$this->removeButton().'</a>';
00616 }
00617
00618 $lines[] = $this->extensionListRow($extKey,$list[$extKey],array('<td class="bgColor">'.$loadUnloadLink.'</td>'));
00619 }
00620 }
00621 }
00622
00623 $content.= t3lib_BEfunc::cshItem('_MOD_tools_em', 'loaded', $GLOBALS['BACK_PATH'],'');
00624 $content.= '
00625
00626 <!-- Loaded Extensions List -->
00627 <table border="0" cellpadding="2" cellspacing="1">'.implode('',$lines).'</table>';
00628
00629 $this->content.=$this->doc->section('Loaded Extensions',$content,0,1);
00630 }
|
|
||||||||||||||||||||||||||||||||
|
Prints a row with data for the various extension listings.
tag class
content Definition at line 2065 of file index.php. References $cells, error(), t3lib_extMgm::isLoaded(), PATH_site, and table(). 02065 {
02066
02067 // Initialize:
02068 $style = t3lib_extMgm::isLoaded($extKey) ? '' : ' style="color:#666666;"';
02069
02070 // Icon:
02071 $imgInfo = @getImageSize($this->getExtPath($extKey,$extInfo['type']).'/ext_icon.gif');
02072 if (is_array($imgInfo)) {
02073 $cells[] = '<td><img src="'.$GLOBALS['BACK_PATH'].$this->typeRelPaths[$extInfo['type']].$extKey.'/ext_icon.gif'.'" '.$imgInfo[3].' alt="" /></td>';
02074 } elseif ($extInfo['_ICON']) {
02075 $cells[] = '<td>'.$extInfo['_ICON'].'</td>';
02076 } else {
02077 $cells[] = '<td><img src="clear.gif" width="1" height="1" alt="" /></td>';
02078 }
02079
02080 // Extension title:
02081 $cells[] = '<td nowrap="nowrap"><a href="'.htmlspecialchars($altLinkUrl?$altLinkUrl:'index.php?CMD[showExt]='.$extKey.'&SET[singleDetails]=info').'" title="'.$extKey.'"'.$style.'>'.t3lib_div::fixed_lgd($extInfo['EM_CONF']['title']?$extInfo['EM_CONF']['title']:'<em>'.$extKey.'</em>',40).'</a></td>';
02082
02083 // Unset extension key in installed keys array (for tracking)
02084 if (isset($inst_list[$extKey])) {
02085 unset($this->inst_keys[$extKey]);
02086 }
02087
02088 // Based on which display mode you will see more or less details:
02089 if (!$this->MOD_SETTINGS['display_details']) {
02090 $cells[] = '<td>'.htmlspecialchars(t3lib_div::fixed_lgd($extInfo['EM_CONF']['description'],400)).'<br /><img src="clear.gif" width="300" height="1" alt="" /></td>';
02091 $cells[] = '<td nowrap="nowrap">'.htmlspecialchars($extInfo['EM_CONF']['author'].($extInfo['EM_CONF']['author_company'] ? '<br />'.$extInfo['EM_CONF']['author_company'] : '')).'</td>';
02092 } elseif ($this->MOD_SETTINGS['display_details']==2) {
02093 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['priority'].'</td>';
02094 $cells[] = '<td nowrap="nowrap">'.implode('<br />',t3lib_div::trimExplode(',',$extInfo['EM_CONF']['modify_tables'],1)).'</td>';
02095 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['module'].'</td>';
02096 $cells[] = '<td nowrap="nowrap">'.($extInfo['EM_CONF']['clearCacheOnLoad'] ? 'Yes' : '').'</td>';
02097 $cells[] = '<td nowrap="nowrap">'.($extInfo['EM_CONF']['internal'] ? 'Yes' : '').'</td>';
02098 $cells[] = '<td nowrap="nowrap">'.($extInfo['EM_CONF']['shy'] ? 'Yes' : '').'</td>';
02099 } elseif ($this->MOD_SETTINGS['display_details']==3) {
02100 $techInfo = $this->makeDetailedExtensionAnalysis($extKey,$extInfo);
02101
02102 $cells[] = '<td>'.$this->extInformationArray_dbReq($techInfo).
02103 '</td>';
02104 $cells[] = '<td nowrap="nowrap">'.(is_array($techInfo['TSfiles']) ? implode('<br />',$techInfo['TSfiles']) : '').'</td>';
02105 $cells[] = '<td nowrap="nowrap">'.(is_array($techInfo['flags']) ? implode('<br />',$techInfo['flags']) : '').'</td>';
02106 $cells[] = '<td nowrap="nowrap">'.(is_array($techInfo['moduleNames']) ? implode('<br />',$techInfo['moduleNames']) : '').'</td>';
02107 $cells[] = '<td nowrap="nowrap">'.($techInfo['conf'] ? 'Yes' : '').'</td>';
02108 $cells[] = '<td>'.
02109 $GLOBALS['TBE_TEMPLATE']->rfw((t3lib_extMgm::isLoaded($extKey)&&$techInfo['tables_error']?'<strong>Table error!</strong><br />Probably one or more required fields/tables are missing in the database!':'').
02110 (t3lib_extMgm::isLoaded($extKey)&&$techInfo['static_error']?'<strong>Static table error!</strong><br />The static tables are missing or empty!':'')).
02111 '</td>';
02112 } elseif ($this->MOD_SETTINGS['display_details']==4) {
02113 $techInfo=$this->makeDetailedExtensionAnalysis($extKey,$extInfo,1);
02114
02115 $cells[] = '<td>'.(is_array($techInfo['locallang']) ? implode('<br />',$techInfo['locallang']) : '').'</td>';
02116 $cells[] = '<td>'.(is_array($techInfo['classes']) ? implode('<br />',$techInfo['classes']) : '').'</td>';
02117 $cells[] = '<td>'.(is_array($techInfo['errors']) ? $GLOBALS['TBE_TEMPLATE']->rfw(implode('<hr />',$techInfo['errors'])) : '').'</td>';
02118 $cells[] = '<td>'.(is_array($techInfo['NSerrors']) ? (!t3lib_div::inList($this->nameSpaceExceptions,$extKey) ? t3lib_div::view_array($techInfo['NSerrors']) : $GLOBALS['TBE_TEMPLATE']->dfw('[exception]')) :'').'</td>';
02119 } elseif ($this->MOD_SETTINGS['display_details']==5) {
02120 $currentMd5Array = $this->serverExtensionMD5Array($extKey,$extInfo);
02121 $affectedFiles = '';
02122 $msgLines = array();
02123 $msgLines[] = 'Files: '.count($currentMd5Array);
02124 if (strcmp($extInfo['EM_CONF']['_md5_values_when_last_written'],serialize($currentMd5Array))) {
02125 $msgLines[] = $GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>A difference between the originally installed version and the current was detected!</strong>');
02126 $affectedFiles = $this->findMD5ArrayDiff($currentMd5Array,unserialize($extInfo['EM_CONF']['_md5_values_when_last_written']));
02127 if (count($affectedFiles)) $msgLines[] = '<br /><strong>Modified files:</strong><br />'.$GLOBALS['TBE_TEMPLATE']->rfw(implode('<br />',$affectedFiles));
02128 }
02129 $cells[] = '<td>'.implode('<br />',$msgLines).'</td>';
02130 } else {
02131 // Default view:
02132 $verDiff = $inst_list[$extKey] && $this->versionDifference($extInfo['EM_CONF']['version'],$inst_list[$extKey]['EM_CONF']['version'],$this->versionDiffFactor);
02133
02134 $cells[] = '<td nowrap="nowrap"><em>'.$extKey.'</em></td>';
02135 $cells[] = '<td nowrap="nowrap">'.($verDiff ? '<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw(htmlspecialchars($extInfo['EM_CONF']['version'])).'</strong>' : $extInfo['EM_CONF']['version']).'</td>';
02136 if (!$import) { // Listing extenson on LOCAL server:
02137 $fileP = PATH_site.$this->typePaths[$extInfo['type']].$extKey.'/doc/manual.sxw';
02138
02139 $cells[] = '<td nowrap="nowrap">'.
02140 ($this->typePaths[$extInfo['type']] && @is_file($fileP)?'<img src="oodoc.gif" width="13" height="16" title="Local Open Office Manual" alt="" />':'').
02141 '</td>';
02142 $cells[] = '<td nowrap="nowrap">'.$this->typeLabels[$extInfo['type']].(strlen($extInfo['doubleInstall'])>1?'<strong> '.$GLOBALS['TBE_TEMPLATE']->rfw($extInfo['doubleInstall']).'</strong>':'').'</td>';
02143 } else { // Listing extensions from REMOTE repository:
02144 $inst_curVer = $inst_list[$extKey]['EM_CONF']['version'];
02145 if (isset($inst_list[$extKey])) {
02146 if ($verDiff) $inst_curVer = '<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw($inst_curVer).'</strong>';
02147 }
02148 $cells[] = '<td nowrap="nowrap">'.$inst_curVer.'</td>';
02149 $cells[] = '<td nowrap="nowrap">'.$this->typeLabels[$inst_list[$extKey]['type']].(strlen($inst_list[$extKey]['doubleInstall'])>1?'<strong> '.$GLOBALS['TBE_TEMPLATE']->rfw($inst_list[$extKey]['doubleInstall']).'</strong>':'').'</td>';
02150 $cells[] = '<td nowrap="nowrap"><strong>'.$GLOBALS['TBE_TEMPLATE']->rfw($this->remoteAccess[$extInfo['_ACCESS']]).'</strong></td>';
02151 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['_typo3_ver'].'</td>';
02152 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['_php_ver'].'</td>';
02153 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['_size'].'</td>';
02154 $cells[] = '<td nowrap="nowrap">'.($extInfo['_STAT_IMPORT']['extension_allversions']?$extInfo['_STAT_IMPORT']['extension_allversions']:' ').'/'.($extInfo['_STAT_IMPORT']['extension_thisversion']?$extInfo['_STAT_IMPORT']['extension_thisversion']:' ').'</td>';
02155 }
02156 $cells[] = '<td nowrap="nowrap">'.$this->states[$extInfo['EM_CONF']['state']].'</td>';
02157 $cells[] = '<td nowrap="nowrap">'.$extInfo['EM_CONF']['dependencies'].'</td>';
02158 }
02159
02160 $bgColor = ' class="'.($bgColorClass?$bgColorClass:'bgColor4').'"';
02161 return '
02162 <tr'.$bgColor.$style.'>
02163 '.implode('
02164 ',$cells).'
02165 </tr>';
02166 }
|
|
||||||||||||||||
|
Prints the header row for the various listings.
tag
table row Definition at line 2000 of file index.php. References $cells. 02000 {
02001 $cells[] = '<td></td>';
02002 $cells[] = '<td>Title:</td>';
02003
02004 if (!$this->MOD_SETTINGS['display_details']) {
02005 $cells[] = '<td>Description:</td>';
02006 $cells[] = '<td>Author:</td>';
02007 } elseif ($this->MOD_SETTINGS['display_details']==2) {
02008 $cells[] = '<td>Priority:</td>';
02009 $cells[] = '<td>Mod.Tables:</td>';
02010 $cells[] = '<td>Modules:</td>';
02011 $cells[] = '<td>Cl.Cache?</td>';
02012 $cells[] = '<td>Internal?</td>';
02013 $cells[] = '<td>Shy?</td>';
02014 } elseif ($this->MOD_SETTINGS['display_details']==3) {
02015 $cells[] = '<td>Tables/Fields:</td>';
02016 $cells[] = '<td>TS-files:</td>';
02017 $cells[] = '<td>Affects:</td>';
02018 $cells[] = '<td>Modules:</td>';
02019 $cells[] = '<td>Config?</td>';
02020 $cells[] = '<td>Errors:</td>';
02021 } elseif ($this->MOD_SETTINGS['display_details']==4) {
02022 $cells[] = '<td>locallang:</td>';
02023 $cells[] = '<td>Classes:</td>';
02024 $cells[] = '<td>Errors:</td>';
02025 $cells[] = '<td>NameSpace Errors:</td>';
02026 } elseif ($this->MOD_SETTINGS['display_details']==5) {
02027 $cells[] = '<td>Changed files:</td>';
02028 } else {
02029 $cells[] = '<td>Extension key:</td>';
02030 $cells[] = '<td>Version:</td>';
02031 if (!$import) {
02032 $cells[] = '<td>Doc:</td>';
02033 $cells[] = '<td>Type:</td>';
02034 } else {
02035 $cells[] = '<td class="bgColor6"'.$this->labelInfo('Current version of the extension on this server. If colored red there is a newer version in repository! Then you should upgrade.').'>Cur. Ver:</td>';
02036 $cells[] = '<td class="bgColor6"'.$this->labelInfo('Current type of installation of the extension on this server.').'>Cur. Type:</td>';
02037 $cells[] = '<td'.$this->labelInfo('If blank, everyone has access to this extension. "Owner" means that you see it ONLY because you are the owner. "Member" means you see it ONLY because you are among the project members.').'>Access:</td>';
02038 $cells[] = '<td'.$this->labelInfo('TYPO3 version of last uploading server.').'>T3 ver:</td>';
02039 $cells[] = '<td'.$this->labelInfo('PHP version of last uploading server.').'>PHP:</td>';
02040 $cells[] = '<td'.$this->labelInfo('Size of extension, uncompressed / compressed').'>Size:</td>';
02041 $cells[] = '<td'.$this->labelInfo('Number of downloads, all versions/this version').'>DL:</td>';
02042 }
02043 $cells[] = '<td>State:</td>';
02044 $cells[] = '<td>Dependencies:</td>';
02045 }
02046 return '
02047 <tr'.$trAttrib.'>
02048 '.implode('
02049 ',$cells).'
02050 </tr>';
02051 }
|
|
||||||||||||||||
|
Returns a header for an extensions including icon if any.
Definition at line 2229 of file index.php. References $out. 02229 {
02230 $imgInfo = @getImageSize($this->getExtPath($extKey,$extInfo['type']).'/ext_icon.gif');
02231 $out = '';
02232 if (is_array($imgInfo)) {
02233 $out.= '<img src="'.$GLOBALS['BACK_PATH'].$this->typeRelPaths[$extInfo['type']].$extKey.'/ext_icon.gif" '.$imgInfo[3].' align="'.$align.'" alt="" />';
02234 }
02235 $out.= $extInfo['EM_CONF']['title'] ? htmlspecialchars(t3lib_div::fixed_lgd($extInfo['EM_CONF']['title'],40)) : '<em>'.$extKey.'</em>';
02236 return $out;
02237 }
|
|
||||||||||||||||
|
Prints a table with extension information in it.
Definition at line 1773 of file index.php. References error(), t3lib_extMgm::isLoaded(), and table(). 01773 {
01774 $lines=array();
01775 $lines[]='<tr class="bgColor5"><td colspan="2"><strong>General information:</strong></td>'.$this->helpCol('').'</tr>';
01776 $lines[]='<tr class="bgColor4"><td>Title:</td><td>'.$extInfo['EM_CONF']['_icon'].$extInfo['EM_CONF']['title'].'</td>'.$this->helpCol('title').'</tr>';
01777 $lines[]='<tr class="bgColor4"><td>Description:</td><td>'.nl2br(htmlspecialchars($extInfo['EM_CONF']['description'])).'</td>'.$this->helpCol('description').'</tr>';
01778 $lines[]='<tr class="bgColor4"><td>Author:</td><td>'.$this->wrapEmail($extInfo['EM_CONF']['author'].($extInfo['EM_CONF']['author_email'] ? ' <'.$extInfo['EM_CONF']['author_email'].'>' : ''),$extInfo['EM_CONF']['author_email']).
01779 ($extInfo['EM_CONF']['author_company']?', '.$extInfo['EM_CONF']['author_company']:'').
01780 '</td>'.$this->helpCol('description').'</tr>';
01781
01782 $lines[]='<tr class="bgColor4"><td>Version:</td><td>'.$extInfo['EM_CONF']['version'].'</td>'.$this->helpCol('version').'</tr>';
01783 $lines[]='<tr class="bgColor4"><td>Category:</td><td>'.$this->categories[$extInfo['EM_CONF']['category']].'</td>'.$this->helpCol('category').'</tr>';
01784 $lines[]='<tr class="bgColor4"><td>State:</td><td>'.$this->states[$extInfo['EM_CONF']['state']].'</td>'.$this->helpCol('state').'</tr>';
01785 $lines[]='<tr class="bgColor4"><td>Shy?</td><td>'.($extInfo['EM_CONF']['shy']?'Yes':'').'</td>'.$this->helpCol('shy').'</tr>';
01786 $lines[]='<tr class="bgColor4"><td>Internal?</td><td>'.($extInfo['EM_CONF']['internal']?'Yes':'').'</td>'.$this->helpCol('internal').'</tr>';
01787
01788 $lines[]='<tr class="bgColor4"><td>Dependencies:</td><td>'.$extInfo['EM_CONF']['dependencies'].'</td>'.$this->helpCol('dependencies').'</tr>';
01789 if (!$remote) {
01790 $lines[]='<tr class="bgColor4"><td>Conflicts:</td><td>'.$extInfo['EM_CONF']['conflicts'].'</td>'.$this->helpCol('conflicts').'</tr>';
01791 $lines[]='<tr class="bgColor4"><td>Priority:</td><td>'.$extInfo['EM_CONF']['priority'].'</td>'.$this->helpCol('priority').'</tr>';
01792 $lines[]='<tr class="bgColor4"><td>Clear cache?</td><td>'.($extInfo['EM_CONF']['clearCacheOnLoad']?'Yes':'').'</td>'.$this->helpCol('clearCacheOnLoad').'</tr>';
01793 $lines[]='<tr class="bgColor4"><td>Includes modules:</td><td>'.$extInfo['EM_CONF']['module'].'</td>'.$this->helpCol('module').'</tr>';
01794 }
01795 $lines[]='<tr class="bgColor4"><td>Lock Type?</td><td>'.($extInfo['EM_CONF']['lockType']?$extInfo['EM_CONF']['lockType']:'').'</td>'.$this->helpCol('lockType').'</tr>';
01796 $lines[]='<tr class="bgColor4"><td>Modifies tables:</td><td>'.$extInfo['EM_CONF']['modify_tables'].'</td>'.$this->helpCol('modify_tables').'</tr>';
01797
01798 $lines[]='<tr class="bgColor4"><td>Private?</td><td>'.($extInfo['EM_CONF']['private']?'Yes':'').'</td>'.$this->helpCol('private').'</tr>';
01799 if (!$remote) $lines[]='<tr class="bgColor4"><td>Download password:</td><td>'.$extInfo['EM_CONF']['download_password'].'</td>'.$this->helpCol('download_password').'</tr>';
01800
01801 // Installation status:
01802 $lines[]='<tr><td> </td><td></td>'.$this->helpCol('').'</tr>';
01803 $lines[]='<tr class="bgColor5"><td colspan="2"><strong>Installation status:</strong></td>'.$this->helpCol('').'</tr>';
01804 if (!$remote) {
01805 $lines[]='<tr class="bgColor4"><td>Type of install:</td><td>'.$this->typeLabels[$extInfo['type']].' - <em>'.$this->typeDescr[$extInfo['type']].'</em></td>'.$this->helpCol('type').'</tr>';
01806 $lines[]='<tr class="bgColor4"><td>Double installs?</td><td>'.$this->extInformationArray_dbInst($extInfo['doubleInstall'],$extInfo['type']).'</td>'.$this->helpCol('doubleInstall').'</tr>';
01807 }
01808 if (is_array($extInfo['files'])) {
01809 sort($extInfo['files']);
01810 $lines[]='<tr class="bgColor4"><td>Root files:</td><td>'.implode('<br />',$extInfo['files']).'</td>'.$this->helpCol('rootfiles').'</tr>';
01811 }
01812
01813 if (!$remote) {
01814 $techInfo = $this->makeDetailedExtensionAnalysis($extKey,$extInfo,1);
01815 } else $techInfo = $extInfo['_TECH_INFO'];
01816 #debug($techInfo);
01817
01818 if ($techInfo['tables']||$techInfo['static']||$techInfo['fields']) {
01819 if (!$remote && t3lib_extMgm::isLoaded($extKey)) {
01820 $tableStatus = $GLOBALS['TBE_TEMPLATE']->rfw(($techInfo['tables_error']?'<strong>Table error!</strong><br />Probably one or more required fields/tables are missing in the database!':'').
01821 ($techInfo['static_error']?'<strong>Static table error!</strong><br />The static tables are missing or empty!':''));
01822 } else {
01823 $tableStatus = $techInfo['tables_error']||$techInfo['static_error'] ? 'The database will need to be updated when this extension is installed.' : 'All required tables are already in the database!';
01824 }
01825 }
01826
01827 $lines[]='<tr class="bgColor4"><td>Database requirements:</td><td>'.$this->extInformationArray_dbReq($techInfo,1).'</td>'.$this->helpCol('dbReq').'</tr>';
01828 if (!$remote) $lines[]='<tr class="bgColor4"><td>Database status:</td><td>'.$tableStatus.'</td>'.$this->helpCol('dbStatus').'</tr>';
01829 $lines[]='<tr class="bgColor4"><td>Flags:</td><td>'.(is_array($techInfo['flags'])?implode('<br />',$techInfo['flags']):'').'</td>'.$this->helpCol('flags').'</tr>';
01830 $lines[]='<tr class="bgColor4"><td>Config template?</td><td>'.($techInfo['conf']?'Yes':'').'</td>'.$this->helpCol('conf').'</tr>';
01831 $lines[]='<tr class="bgColor4"><td>TypoScript files:</td><td>'.(is_array($techInfo['TSfiles'])?implode('<br />',$techInfo['TSfiles']):'').'</td>'.$this->helpCol('TSfiles').'</tr>';
01832 $lines[]='<tr class="bgColor4"><td>Language files:</td><td>'.(is_array($techInfo['locallang'])?implode('<br />',$techInfo['locallang']):'').'</td>'.$this->helpCol('locallang').'</tr>';
01833 $lines[]='<tr class="bgColor4"><td>Upload folder:</td><td>'.($techInfo['uploadfolder']?$techInfo['uploadfolder']:'').'</td>'.$this->helpCol('uploadfolder').'</tr>';
01834 $lines[]='<tr class="bgColor4"><td>Create directories:</td><td>'.(is_array($techInfo['createDirs'])?implode('<br />',$techInfo['createDirs']):'').'</td>'.$this->helpCol('createDirs').'</tr>';
01835 $lines[]='<tr class="bgColor4"><td>Module names:</td><td>'.(is_array($techInfo['moduleNames'])?implode('<br />',$techInfo['moduleNames']):'').'</td>'.$this->helpCol('moduleNames').'</tr>';
01836 $lines[]='<tr class="bgColor4"><td>Class names:</td><td>'.(is_array($techInfo['classes'])?implode('<br />',$techInfo['classes']):'').'</td>'.$this->helpCol('classNames').'</tr>';
01837 $lines[]='<tr class="bgColor4"><td>Errors:</td><td>'.(is_array($techInfo['errors'])?$GLOBALS['TBE_TEMPLATE']->rfw(implode('<hr />',$techInfo['errors'])):'').'</td>'.$this->helpCol('errors').'</tr>';
01838 $lines[]='<tr class="bgColor4"><td>Naming errors:</td><td>'.(is_array($techInfo['NSerrors'])?
01839 (!t3lib_div::inList($this->nameSpaceExceptions,$extKey)?t3lib_div::view_array($techInfo['NSerrors']):$GLOBALS['TBE_TEMPLATE']->dfw('[exception]'))
01840 :'').'</td>'.$this->helpCol('NSerrors').'</tr>';
01841
01842
01843 if (!$remote) {
01844 $currentMd5Array = $this->serverExtensionMD5Array($extKey,$extInfo);
01845 $affectedFiles='';
01846
01847 $msgLines=array();
01848 # $msgLines[] = 'Files: '.count($currentMd5Array);
01849 if (strcmp($extInfo['EM_CONF']['_md5_values_when_last_written'],serialize($currentMd5Array))) {
01850 $msgLines[] = $GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>A difference between the originally installed version and the current was detected!</strong>');
01851 $affectedFiles = $this->findMD5ArrayDiff($currentMd5Array,unserialize($extInfo['EM_CONF']['_md5_values_when_last_written']));
01852 if (count($affectedFiles)) $msgLines[] = '<br /><strong>Modified files:</strong><br />'.$GLOBALS['TBE_TEMPLATE']->rfw(implode('<br />',$affectedFiles));
01853 }
01854 $lines[]='<tr class="bgColor4"><td>Files changed?</td><td>'.implode('<br />',$msgLines).'</td>'.$this->helpCol('filesChanged').'</tr>';
01855 }
01856
01857 return '<table border="0" cellpadding="1" cellspacing="2">
01858 '.implode('
01859 ',$lines).'
01860 </table>';
01861 }
|
|
||||||||||||
|
Double install warning.
Definition at line 1883 of file index.php. References $a. 01883 {
01884 if (strlen($dbInst)>1) {
01885 $others = array();
01886 for($a=0;$a<strlen($dbInst);$a++) {
01887 if (substr($dbInst,$a,1)!=$current) {
01888 $others[]='"'.$this->typeLabels[substr($dbInst,$a,1)].'"';
01889 }
01890 }
01891 return $GLOBALS['TBE_TEMPLATE']->rfw('A '.implode(' and ',$others).' extension with this key is also available on the server, but cannot be loaded because the "'.$this->typeLabels[$current].'" version takes precedence.');
01892 } else return '';
01893 }
|
|
||||||||||||
|
Returns HTML with information about database requirements.
Definition at line 1870 of file index.php. 01870 {
01871 return nl2br(trim((is_array($techInfo['tables'])?($tableHeader?"\n\n<strong>Tables:</strong>\n":'').implode(chr(10),$techInfo['tables']):'').
01872 (is_array($techInfo['static'])?"\n\n<strong>Static tables:</strong>\n".implode(chr(10),$techInfo['static']):'').
01873 (is_array($techInfo['fields'])?"\n\n<strong>Additional fields:</strong>\n".implode('<hr />',$techInfo['fields']):'')));
01874 }
|
|
||||||||||||
|
Update extension EM_CONF...
Definition at line 1657 of file index.php. References $content. 01657 {
01658 $absPath = $this->getExtPath($extKey,$extInfo['type']);
01659 if ($this->CMD['doUpdateEMCONF']) {
01660 return $this->updateLocalEM_CONF($extKey,$extInfo);
01661 } else {
01662 $onClick = "if (confirm('Are you sure you want to update EM_CONF?')) {document.location='index.php?CMD[showExt]=".$extKey."&CMD[doUpdateEMCONF]=1';}";
01663 $content.= '<a href="#" onclick="'.htmlspecialchars($onClick).' return false;"><strong>Update extension EM_CONF file</strong> (in the "'.$this->typeLabels[$extInfo['type']].'" location "'.substr($absPath,strlen(PATH_site)).'")!</a>';
01664 $content.= '<br /><br />If files are changed, added or removed to an extension this is normally detected and displayed so you know that this extension has been locally altered and may need to be uploaded or at least not overridden.<br />
01665 Updating this file will first of all reset this registration.';
01666 return $content;
01667 }
01668 }
|
|
||||||||||||||||
|
Analyses the php-scripts of an available extension on server.
Reads $confFilePath (a module $conf-file) and returns information on the existence of TYPO3_MOD_PATH definition and MCONF_name
Creates a MD5-hash array over the current files in the extension
Compares two arrays with MD5-hash values for analysis of which files has changed.
Creates directories in $extDirPath
Removes the extension directory (including content)
Removes the current extension of $type and creates the base folder for the new one (which is going to be imported)
Unlink (delete) cache files
Extracts the directories in the $files array
Returns the absolute path where the extension $extKey is installed (based on 'type' (SGL))
Write new TYPO3_MOD_PATH to "conf.php" file.
Writes the extension list to "localconf.php" file Removes the temp_CACHED* files before return.
Writes the TSstyleconf values to "localconf.php" Removes the temp_CACHED* files before return.
Forces update of local EM_CONF. This will renew the information of changed files.
Compiles the ext_emconf.php file
Make upload array out of extension
Include a locallang file and return the $LOCAL_LANG array serialized.
Adds extension to extension list and returns new list. If -1 is returned, an error happend. Checks dependencies etc.
Remove extension key from the list of currently installed extensions and return list. If -1 is returned, an error happend. Checks dependencies etc.
This removes any required extensions from the $listArr - they should NOT be added to the common extension list, because they are found already in "requiredExt" list
Traverse the array of installed extensions keys and arranges extensions in the priority order they should be in
Check if clear-cache should be performed, otherwise show form (for installation of extension) Shown only if the extension has the clearCacheOnLoad flag set.
Check if upload folder / "createDir" directories should be created.
Validates the database according to extension requirements Prints form for changes if any. If none, returns blank. If an update is ordered, empty is returned as well. DBAL compliant (based on Install Tool code)
Produces the config form for an extension (if any template file, ext_conf_template.txt is found)
Makes a dump of the tables/fields definitions for an extension
Dump content for static tables
Header comments of the SQL dump file
Dump CREATE TABLE definition
Dump table content Is DBAL compliant, but the dump format is written as MySQL standard. If the INSERT statements should be imported in a DBMS using other quoting than MySQL they must first be translated. t3lib_sqlengine can parse these queries correctly and translate them somehow.
Gets the table and field structure from database. Which fields and which tables are determined from the ext_tables.sql file
Fetches data from the $repositoryUrl, un-compresses it, unserializes array and returns an array with the content if success.
Decode server data This is information like the extension list, extension information etc., return data after uploads (new em_conf)
Decodes extension upload array. This kind of data is when an extension is uploaded to TER
Encodes extension upload array
Compiles the additional GET-parameters sent to the repository during requests for information.
Returns the return Url of the current script (for repository exchange)
Returns the unique TYPO3 Install Identification (sent to repository for statistics)
Processes return-data from online repository. Currently only the returned emconf array is written to extension.
Returns subtitles for the extension listings
Returns version information
Parses the version number x.x.x and returns an array with the various parts.
Returns upload folder for extension
Returns true if global OR local installation of extensions is allowed/possible.
Reports back if installation in a certain scope is possible.
Returns true if extensions in scope, $type, can be deleted (or installed for that sake)
Returns true if the doc/manual.sxw should be returned
Evaluates differences in version numbers with three parts, x.x.x. Returns true if $v1 is greater than $v2
Returns true if the $str is found as the first part of a string in $array
Returns the $EM_CONF array from an extensions ext_emconf.php file
Definition at line 2644 of file index.php. References $out, error(), and TYPO3_MODE. |
|
||||||||||||
|
Returns file-listing of an extension.
Definition at line 1575 of file index.php. References table(). 01575 {
01576 $extPath = $this->getExtPath($extKey,$conf['type']);
01577
01578 if ($extPath) {
01579 // Read files:
01580 $fileArr = array();
01581 $fileArr = t3lib_div::getAllFilesAndFoldersInPath($fileArr,$extPath);
01582
01583 // Start table:
01584 $lines = array();
01585 $totalSize = 0;
01586
01587 // Header:
01588 $lines[] = '
01589 <tr class="bgColor5">
01590 <td>File:</td>
01591 <td>Size:</td>
01592 <td>Edit:</td>
01593 </tr>';
01594
01595 foreach($fileArr as $file) {
01596 $fI = t3lib_div::split_fileref($file);
01597 $lines[] = '
01598 <tr class="bgColor4">
01599 <td><a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[downloadFile]='.rawurlencode($file)).'" title="Download...">'.substr($file,strlen($extPath)).'</a></td>
01600 <td>'.t3lib_div::formatSize(filesize($file)).'</td>
01601 <td>'.(!in_array($extKey,$this->requiredExt)&&t3lib_div::inList($this->editTextExtensions,$fI['fileext'])?'<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[editFile]='.rawurlencode($file)).'">Edit file</a>':'').'</td>
01602 </tr>';
01603 $totalSize+=filesize($file);
01604 }
01605
01606 $lines[] = '
01607 <tr class="bgColor6">
01608 <td><strong>Total:</strong></td>
01609 <td><strong>'.t3lib_div::formatSize($totalSize).'</strong></td>
01610 <td> </td>
01611 </tr>';
01612
01613 return '
01614 Path: '.$extPath.'<br /><br />
01615 <table border="0" cellpadding="1" cellspacing="2">'.implode('',$lines).'</table>';
01616 }
01617 }
|
|
|
Maps remote extensions information into $cat/$list arrays for listing.
Definition at line 2348 of file index.php. 02348 {
02349 $list = array();
02350 $cat = $this->defaultCategories;
02351
02352 if (is_array($listArr)) {
02353
02354 foreach($listArr as $dat) {
02355 $extKey = $dat['extension_key'];
02356 $list[$extKey]['type'] = '_';
02357 $list[$extKey]['extRepUid'] = $dat['uid'];
02358 $list[$extKey]['_STAT_IMPORT'] = $dat['_STAT_IMPORT'];
02359 $list[$extKey]['_ACCESS'] = $dat['_ACCESS'];
02360 $list[$extKey]['_ICON'] = $dat['_ICON'];
02361 $list[$extKey]['_MEMBERS_ONLY'] = $dat['_MEMBERS_ONLY'];
02362 $list[$extKey]['EM_CONF'] = array(
02363 'title' => $dat['emconf_title'],
02364 'description' => $dat['emconf_description'],
02365 'category' => $dat['emconf_category'],
02366 'shy' => $dat['emconf_shy'],
02367 'dependencies' => $dat['emconf_dependencies'],
02368 'state' => $dat['emconf_state'],
02369 'private' => $dat['emconf_private'],
02370 'uploadfolder' => $dat['emconf_uploadfolder'],
02371 'createDirs' => $dat['emconf_createDirs'],
02372 'modify_tables' => $dat['emconf_modify_tables'],
02373 'module' => $dat['emconf_module'],
02374 'lockType' => $dat['emconf_lockType'],
02375 'clearCacheOnLoad' => $dat['emconf_clearCacheOnLoad'],
02376 'priority' => $dat['emconf_priority'],
02377 'version' => $dat['version'],
02378 'internal' => $dat['emconf_internal'],
02379 'author' => $dat['emconf_author'],
02380 'author_company' => $dat['emconf_author_company'],
02381
02382 '_typo3_ver' => $dat['upload_typo3_version'],
02383 '_php_ver' => $dat['upload_php_version'],
02384 '_size' => t3lib_div::formatSize($dat['datasize']).'/'.t3lib_div::formatSize($dat['datasize_gz']),
02385 );
02386 $this->setCat($cat, $list[$extKey], $extKey);
02387 }
02388 }
02389 return array($list,$cat);
02390 }
|
|
|
Returns the list of available (installed) extensions.
Definition at line 2287 of file index.php. References PATH_site. 02287 {
02288 $list = array();
02289 $cat = $this->defaultCategories;
02290
02291 $path = PATH_site.TYPO3_mainDir.'sysext/';
02292 $this->getInstExtList($path,$list,$cat,'S');
02293
02294 $path = PATH_site.TYPO3_mainDir.'ext/';
02295 $this->getInstExtList($path,$list,$cat,'G');
02296
02297 $path = PATH_site.'typo3conf/ext/';
02298 $this->getInstExtList($path,$list,$cat,'L');
02299
02300 return array($list,$cat);
02301 }
|
|
||||||||||||||||||||
|
Gathers all extensions in $path.
Definition at line 2314 of file index.php. 02314 {
02315
02316 if (@is_dir($path)) {
02317 $extList = t3lib_div::get_dirs($path);
02318 if (is_array($extList)) {
02319 foreach($extList as $extKey) {
02320 if (@is_file($path.$extKey.'/ext_emconf.php')) {
02321 $emConf = $this->includeEMCONF($path.$extKey.'/ext_emconf.php', $extKey);
02322 if (is_array($emConf)) {
02323 # unset($emConf['_md5_values_when_last_written']); // Trying to save space - hope this doesn't break anything. Shaves of maybe 100K!
02324 # unset($emConf['description']); // Trying to save space - hope this doesn't break anything
02325 if (is_array($list[$extKey])) {
02326 $list[$extKey]=array('doubleInstall'=>$list[$extKey]['doubleInstall']);
02327 }
02328 $list[$extKey]['doubleInstall'].= $type;
02329 $list[$extKey]['type'] = $type;
02330 $list[$extKey]['EM_CONF'] = $emConf;
02331 # $list[$extKey]['files'] = array_keys(array_flip(t3lib_div::getFilesInDir($path.$extKey))); // Shaves off a little by using num-indexes
02332 $list[$extKey]['files'] = t3lib_div::getFilesInDir($path.$extKey);
02333
02334 $this->setCat($cat,$list[$extKey], $extKey);
02335 }
02336 }
02337 }
02338 }
02339 }
02340 }
|
|
||||||||||||
|
Prints the upload form for extensions.
Definition at line 1902 of file index.php. References $content, main(), rfw(), and table(). 01902 {
01903 $uArr = $this->makeUploadArray($extKey,$extInfo);
01904 if (is_array($uArr)) {
01905 $backUpData = $this->makeUploadDataFromArray($uArr);
01906
01907 #debug($this->decodeExchangeData($backUpData));
01908 $content.='Extension "'.$this->extensionTitleIconHeader($extKey,$extInfo).'" is ready to be uploaded.<br />
01909 The size of the upload is <strong>'.t3lib_div::formatSize(strlen($backUpData)).'</strong><br />
01910 ';
01911
01912 $b64data = base64_encode($backUpData);
01913 $content='</form><form action="'.$this->repositoryUrl.'" method="post" enctype="application/x-www-form-urlencoded">
01914 <input type="hidden" name="tx_extrep[upload][returnUrl]" value="'.htmlspecialchars($this->makeReturnUrl()).'" />
01915 <input type="hidden" name="tx_extrep[upload][data]" value="'.$b64data.'" />
01916 <input type="hidden" name="tx_extrep[upload][typo3ver]" value="'.$GLOBALS['TYPO_VERSION'].'" />
01917 <input type="hidden" name="tx_extrep[upload][os]" value="'.TYPO3_OS.'" />
01918 <input type="hidden" name="tx_extrep[upload][sapi]" value="'.php_sapi_name().'" />
01919 <input type="hidden" name="tx_extrep[upload][phpver]" value="'.phpversion().'" />
01920 <input type="hidden" name="tx_extrep[upload][gzcompressed]" value="'.$this->gzcompress.'" />
01921 <input type="hidden" name="tx_extrep[upload][data_md5]" value="'.md5($b64data).'" />
01922 <table border="0" cellpadding="2" cellspacing="1">
01923 <tr class="bgColor4">
01924 <td>Repository Username:</td>
01925 <td><input'.$this->doc->formWidth(20).' type="text" name="tx_extrep[user][fe_u]" value="'.$this->fe_user['username'].'" /></td>
01926 </tr>
01927 <tr class="bgColor4">
01928 <td>Repository Password:</td>
01929 <td><input'.$this->doc->formWidth(20).' type="password" name="tx_extrep[user][fe_p]" value="'.$this->fe_user['password'].'" /></td>
01930 </tr>
01931 <tr class="bgColor4">
01932 <td>Upload password for this extension:</td>
01933 <td><input'.$this->doc->formWidth(30).' type="password" name="tx_extrep[upload][upload_p]" value="'.$this->fe_user['uploadPass'].'" /></td>
01934 </tr>
01935 <tr class="bgColor4">
01936 <td>Changelog for upload:</td>
01937 <td><textarea'.$this->doc->formWidth(30,1).' rows="5" name="tx_extrep[upload][comment]"></textarea></td>
01938 </tr>
01939 <tr class="bgColor4">
01940 <td>Upload command:</td>
01941 <td nowrap="nowrap">
01942 <input type="radio" name="tx_extrep[upload][mode]" value="new_dev" checked="checked" /> New development version (latest x.x.<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('x+1').'</strong>)<br />
01943 <input type="radio" name="tx_extrep[upload][mode]" value="latest" /> Override <em>this</em> development version ('.$extInfo['EM_CONF']['version'].')<br />
01944 <input type="radio" name="tx_extrep[upload][mode]" value="new_sub" /> New sub version (latest x.<strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('x+1').'</strong>.0)<br />
01945 <input type="radio" name="tx_extrep[upload][mode]" value="new_main" /> New main version (latest <strong>'.$GLOBALS['TBE_TEMPLATE']->rfw('x+1').'</strong>.0.0)<br />
01946 </td>
01947 </tr>
01948 <!-- Removing "private keys" since they are probably not used much. Better option for people is to distribute "private" extensions as files by emails.
01949 <tr class="bgColor4">
01950 <td>Private?</td>
01951 <td>
01952 <input type="checkbox" name="tx_extrep[upload][private]" value="1"'.($extInfo['EM_CONF']['private'] ? ' checked="checked"' : '').' />Yes, dont show <em>this upload</em> in the public list.<br />
01953 ("Private" uploads requires you to manually enter a special key (which will be shown to you after the upload has been completed) to be able to import and view details for the upload. This is nice when you are working on something internally which you do not want others to look at.)<br />
01954 <br /><strong>Additional import password:</strong><br />
01955 <input'.$this->doc->formWidth(20).' type="text" name="tx_extrep[upload][download_password]" value="'.htmlspecialchars(trim($extInfo['EM_CONF']['download_password'])).'" /> (Textfield!) <br />
01956 (Anybody who knows the "special key" assigned to the private upload will be able to import it. Specifying an import password allows you to give away the download key for private uploads and also require a password given in addition. The password can be changed later on.)<br />
01957 </td>
01958 </tr>
01959 -->
01960 <tr class="bgColor4">
01961 <td> </td>
01962 <td><input type="submit" name="submit" value="Upload extension" /><br />
01963 '.t3lib_div::formatSize(strlen($b64data)).($this->gzcompress?", compressed":"").', base64<br />
01964 <br />
01965
01966 </td>
01967 </tr>
01968 </table>
01969 ';
01970
01971 return $content;
01972 } else {
01973 return $uArr;
01974 }
01975 }
|
|
||||||||||||
|
This function is a copy of the same function in t3lib_SCbase with one modification: In contrast to t3lib_SCbase::handleExternalFunctionValue() this function merges the $this->extClassConf array instead of overwriting it. That was necessary for including the Kickstarter as a submodule into the 'singleDetails' selectorbox as well as in the main 'function' selectorbox.
Reimplemented from t3lib_SCbase. Definition at line 414 of file index.php. 00414 {
00415 $MS_value = is_null($MS_value) ? $this->MOD_SETTINGS[$MM_key] : $MS_value;
00416 $externalItems = $this->getExternalItemConfig($this->MCONF['name'],$MM_key,$MS_value);
00417 if (is_array($externalItems)) $this->extClassConf = array_merge($externalItems,is_array($this->extClassConf)?$this->extClassConf:array());
00418 if (is_array($this->extClassConf) && $this->extClassConf['path']) {
00419 $this->include_once[]=$this->extClassConf['path'];
00420 }
00421 }
|
|
|
Returns help text if applicable.
Definition at line 2203 of file index.php. References t3lib_BEfunc::helpTextIcon(). 02203 {
02204 global $BE_USER;
02205 if ($BE_USER->uc['edit_showFieldHelp']) {
02206 $hT = trim(t3lib_BEfunc::helpText($this->descrTable,'emconf_'.$key,$this->doc->backPath));
02207 return '<td>'.($hT?$hT:t3lib_BEfunc::helpTextIcon($this->descrTable,'emconf_'.$key,$this->doc->backPath)).'</td>';
02208 }
02209 }
|
|
||||||||||||||||||||||||||||
|
Imports an extensions from the online repository.
Definition at line 1016 of file index.php. References $content, $EM_CONF, t3lib_extMgm::isLoaded(), PATH_site, and TYPO3_OS. 01016 {
01017
01018 if (is_array($directInput)) {
01019 $fetchData = array($directInput,'');
01020 $loc = !strcmp($loc,'G')?'G':'L';
01021 } elseif ($uploadFlag) {
01022 if ($_FILES['upload_ext_file']['tmp_name']) {
01023
01024 // Read uploaded file:
01025 $uploadedTempFile = t3lib_div::upload_to_tempfile($_FILES['upload_ext_file']['tmp_name']);
01026 $fileContent = t3lib_div::getUrl($uploadedTempFile);
01027 t3lib_div::unlink_tempfile($uploadedTempFile);
01028
01029 // Decode file data:
01030 $fetchData = array($this->decodeExchangeData($fileContent),'');
01031
01032 if (is_array($fetchData)) {
01033 $extKey = $fetchData[0]['extKey'];
01034 if ($extKey) {
01035 if (!$this->CMD['uploadOverwrite']) {
01036 $loc = !strcmp($loc,'G')?'G':'L';
01037 $comingExtPath = PATH_site.$this->typePaths[$loc].$extKey.'/';
01038 if (@is_dir($comingExtPath)) {
01039 # debug('!');
01040 return 'Extension was already present in "'.$comingExtPath.'" - and the overwrite flag was not set! So nothing done...';
01041 } // ... else go on, install...
01042 } // ... else go on, install...
01043 } else return 'No extension key in file. Strange...';
01044 } else return 'Wrong file format. No data recognized.';
01045 } else return 'No file uploaded! Probably the file was too large for PHPs internal limit for uploadable files.';
01046 } else {
01047
01048 // Create link:
01049 $content = '<a href="index.php" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/goback.gif','width="14" height="14"').' alt="" /> Go back</a>';
01050 $this->content.= $this->doc->section('',$content);
01051 $content = '';
01052
01053 // Building request URL:
01054 $uidParts = t3lib_div::trimExplode('-',$extRepUid);
01055 if (count($uidParts)==2) {
01056 $extRepUid=$uidParts[0];
01057 $addParams='&tx_extrep[pKey]='.rawurlencode(trim($uidParts[1]))
01058 .'&tx_extrep[pPass]='.rawurlencode(trim($this->CMD['download_password']));
01059 } else $addParams='';
01060
01061 // If most recent translation should be delivered, send this:
01062 if ($recentTranslations) {
01063 $addParams.='&tx_extrep[transl]=1';
01064 }
01065
01066 // If manual should be included, send this:
01067 if ($incManual) {
01068 $addParams.='&tx_extrep[inc_manual]=1';
01069 }
01070
01071 $repositoryUrl=$this->repositoryUrl.
01072 $this->repTransferParams().
01073 $addParams.
01074 '&tx_extrep[cmd]=importExtension'.
01075 '&tx_extrep[uid]='.$extRepUid;
01076
01077 // Fetch extension from TER:
01078 $fetchData = $this->fetchServerData($repositoryUrl);
01079 }
01080
01081 // At this point the extension data should be present; so we want to write it to disc:
01082 if ($this->importAsType($loc)) {
01083 if (is_array($fetchData)) { // There was some data successfully transferred
01084 if ($fetchData[0]['extKey'] && is_array($fetchData[0]['FILES'])) {
01085 $extKey = $fetchData[0]['extKey'];
01086 $EM_CONF = $fetchData[0]['EM_CONF'];
01087 if (!$EM_CONF['lockType'] || !strcmp($EM_CONF['lockType'],$loc)) {
01088 $res = $this->clearAndMakeExtensionDir($fetchData[0],$loc);
01089 if (is_array($res)) {
01090 $extDirPath = trim($res[0]);
01091 if ($extDirPath && @is_dir($extDirPath) && substr($extDirPath,-1)=='/') {
01092
01093 $emConfFile = $this->construct_ext_emconf_file($extKey,$EM_CONF);
01094 $dirs = $this->extractDirsFromFileList(array_keys($fetchData[0]['FILES']));
01095
01096 $res = $this->createDirsInPath($dirs,$extDirPath);
01097 if (!$res) {
01098 $writeFiles = $fetchData[0]['FILES'];
01099 $writeFiles['ext_emconf.php']['content'] = $emConfFile;
01100 $writeFiles['ext_emconf.php']['content_md5'] = md5($emConfFile);
01101
01102 // Write files:
01103 foreach($writeFiles as $theFile => $fileData) {
01104 t3lib_div::writeFile($extDirPath.$theFile,$fileData['content']);
01105 if (!@is_file($extDirPath.$theFile)) {
01106 $content.='Error: File "'.$extDirPath.$theFile.'" could not be created!!!<br />';
01107 } elseif (md5(t3lib_div::getUrl($extDirPath.$theFile)) != $fileData['content_md5']) {
01108 $content.='Error: File "'.$extDirPath.$theFile.'" MD5 was different from the original files MD5 - so the file is corrupted!<br />';
01109 } elseif (TYPO3_OS!='WIN') {
01110 #chmod ($extDirPath.$theFile, 0755); # SHOULD NOT do that here since writing the file should already have set adequate permissions!
01111 }
01112 }
01113
01114 // No content, no errors. Create success output here:
01115 if (!$content) {
01116 $content='SUCCESS: '.$extDirPath.'<br />';
01117
01118 // Fix TYPO3_MOD_PATH for backend modules in extension:
01119 $modules = t3lib_div::trimExplode(',',$EM_CONF['module'],1);
01120 if (count($modules)) {
01121 foreach($modules as $mD) {
01122 $confFileName = $extDirPath.$mD.'/conf.php';
01123 if (@is_file($confFileName)) {
01124 $content.= $this->writeTYPO3_MOD_PATH($confFileName,$loc,$extKey.'/'.$mD.'/').'<br />';
01125 } else $content.='Error: Couldn\'t find "'.$confFileName.'"<br />';
01126 }
01127 }
01128 // NOTICE: I used two hours trying to find out why a script, ext_emconf.php, written twice and in between included by PHP did not update correct the second time. Probably something with PHP-A cache and mtime-stamps.
01129 // But this order of the code works.... (using the empty Array with type, EMCONF and files hereunder).
01130
01131 // Writing to ext_emconf.php:
01132 $sEMD5A = $this->serverExtensionMD5Array($extKey,array(
01133 'type' => $loc,
01134 'EM_CONF' => array(),
01135 'files' => array()
01136 ));
01137 $EM_CONF['_md5_values_when_last_written'] = serialize($sEMD5A);
01138 $emConfFile = $this->construct_ext_emconf_file($extKey,$EM_CONF);
01139 t3lib_div::writeFile($extDirPath.'ext_emconf.php',$emConfFile);
01140
01141 $content.='ext_emconf.php: '.$extDirPath.'ext_emconf.php<br />';
01142 $content.='Type: '.$loc.'<br />';
01143
01144 // Remove cache files:
01145 if (t3lib_extMgm::isLoaded($extKey)) {
01146 if ($this->removeCacheFiles()) {
01147 $content.='Cache-files are removed and will be re-written upon next hit<br />';
01148 }
01149
01150 list($new_list)=$this->getInstalledExtensions();
01151 $content.=$this->updatesForm($extKey,$new_list[$extKey],1,'index.php?CMD[showExt]='.$extKey.'&SET[singleDetails]=info');
01152 }
01153
01154 // Show any messages:
01155 if (is_array($fetchData[0]['_MESSAGES'])) {
01156 $content.='<hr /><strong>Messages from repository:</strong><br /><br />'.implode('<br />',$fetchData[0]['_MESSAGES']);
01157 }
01158
01159 // Install / Uninstall:
01160 $content.='<h3>Install / Uninstall Extension:</h3>';
01161 $content.=
01162 $new_list[$extKey] ?
01163 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->removeButton().' Uninstall extension</a>' :
01164 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1&CMD[clrCmd]=1&SET[singleDetails]=info').'">'.$this->installButton().' Install extension</a>';
01165
01166 }
01167 } else $content = $res;
01168 } else $content = 'Error: The extension path "'.$extDirPath.'" was different than expected...';
01169 } else $content = $res;
01170 } else $content = 'Error: The extension can only be installed in the path '.$this->typePaths[$EM_CONF['lockType']].' (lockType='.$EM_CONF['lockType'].')';
01171 } else $content = 'Error: No extension key!!! Why? - nobody knows... (Or no files in the file-array...)';
01172 } else $content = 'Error: The datatransfer did not succeed...';
01173 } else $content = 'Error: Installation is not allowed in this path ('.$this->typePaths[$loc].')';
01174
01175 $this->content.=$this->doc->section('Extension copied to server',$content,0,1);
01176 }
|
|
|
Returns detailed info about an extension in the online repository.
Definition at line 915 of file index.php. References $content, and PATH_site. 00915 {
00916
00917 // "Go back" link
00918 $content = '<a href="index.php" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/goback.gif','width="14" height="14"').' alt="" /> Go back</a>';
00919 $this->content.= $this->doc->section('',$content);
00920 $content = '';
00921
00922 // Create connection URL:
00923 $uidParts = t3lib_div::trimExplode('-',$extRepUid);
00924 if (count($uidParts)==2) {
00925 $extRepUid = $uidParts[0];
00926 $addParams = '&tx_extrep[pKey]='.rawurlencode(trim($uidParts[1]))
00927 .'&tx_extrep[pPass]='.rawurlencode(trim($this->CMD['download_password']));
00928 $addImportParams = '&CMD[download_password]='.rawurlencode(trim($this->CMD['download_password']));
00929 } else $addParams = '';
00930
00931 $repositoryUrl = $this->repositoryUrl.
00932 $this->repTransferParams().
00933 $addParams.
00934 '&tx_extrep[cmd]=extensionInfo'.
00935 '&tx_extrep[uid]='.$extRepUid;
00936
00937 // Fetch remote data:
00938 list($fetchData) = $this->fetchServerData($repositoryUrl);
00939 if (is_array($fetchData['_other_versions'])) {
00940 $opt = array();
00941 $opt[] = '<option value=""></option>';
00942 $selectWasSet=0;
00943
00944 foreach($fetchData['_other_versions'] as $dat) {
00945 $setSel = ($dat['uid']==$extRepUid?' selected="selected"':'');
00946 if ($setSel) $selectWasSet=1;
00947 $opt[]='<option value="'.$dat['uid'].'"'.$setSel.'>'.$dat['version'].'</option>';
00948 }
00949 if (!$selectWasSet && $fetchData['emconf_private']) {
00950 $opt[]='<option value="'.$fetchData['uid'].'-'.$fetchData['private_key'].'" selected="selected">'.$fetchData['version'].' (Private)</option>';
00951 }
00952
00953 // "Select version" box:
00954 $onClick = 'document.location=\'index.php?CMD[importExtInfo]=\'+document.pageform.repUid.options[document.pageform.repUid.selectedIndex].value; return false;';
00955 $select='<select name="repUid">'.implode('',$opt).'</select> <input type="submit" value="Load details" onclick="'.htmlspecialchars($onClick).'" /> or<br /><br />';
00956 if ($this->importAtAll()) {
00957 $onClick = '
00958 document.location=\'index.php?CMD[importExt]=\'
00959 +document.pageform.repUid.options[document.pageform.repUid.selectedIndex].value
00960 +\'&CMD[loc]=\'+document.pageform.loc.options[document.pageform.loc.selectedIndex].value
00961 +\'&CMD[transl]=\'+(document.pageform.transl.checked?1:0)
00962 +\'&CMD[inc_manual]=\'+(document.pageform.inc_manual.checked?1:0)
00963 +\''.$addImportParams.'\'; return false;';
00964 $select.='
00965 <input type="submit" value="Import/Update" onclick="'.htmlspecialchars($onClick).'"> to:
00966 <select name="loc">'.
00967 ($this->importAsType('G',$fetchData['emconf_lockType'])?'<option value="G">Global: '.$this->typePaths['G'].$fetchData['extension_key'].'/'.(@is_dir(PATH_site.$this->typePaths['G'].$fetchData['extension_key'])?' (OVERWRITE)':' (empty)').'</option>':'').
00968 ($this->importAsType('L',$fetchData['emconf_lockType'])?'<option value="L">Local: '.$this->typePaths['L'].$fetchData['extension_key'].'/'.(@is_dir(PATH_site.$this->typePaths['L'].$fetchData['extension_key'])?' (OVERWRITE)':' (empty)').'</option>':'').
00969 ($this->importAsType('S',$fetchData['emconf_lockType'])?'<option value="S">System: '.$this->typePaths['S'].$fetchData['extension_key'].'/'.(@is_dir(PATH_site.$this->typePaths['S'].$fetchData['extension_key'])?' (OVERWRITE)':' (empty)').'</option>':'').
00970 #'<option value="fileadmin">'.htmlspecialchars('TEST: fileadmin/_temp_/[extension key name + date]').'</option>'.
00971 '</select>
00972 <br /><input type="checkbox" name="transl" value="1" />Include most recent translations
00973 <br /><input type="checkbox" name="inc_manual" value="1"'.($this->getDocManual($fetchData['extension_key'],@is_dir(PATH_site.$this->typePaths['G'].$fetchData['extension_key'])?'G':'L')?' checked="checked"':'').' />Include "doc/manual.sxw", if any
00974 ';
00975 } else $select.= $this->noImportMsg();
00976 $content.= $select;
00977 $this->content.= $this->doc->section('Select command',$content,0,1);
00978 }
00979
00980 // Details:
00981 $extKey = $fetchData['extension_key'];
00982 list($xList) = $this->getImportExtList(array($fetchData));
00983 $eInfo = $xList[$extKey];
00984 $eInfo['_TECH_INFO'] = unserialize($fetchData['techinfo']);
00985 $tempFiles = unserialize($fetchData['files']);
00986
00987 if (is_array($tempFiles)) {
00988 reset($tempFiles);
00989 while(list($fk)=each($tempFiles)) {
00990 if (!strstr($fk,'/')) $eInfo['files'][]=$fk;
00991 }
00992 }
00993
00994 $content='<strong>'.$fetchData['_ICON'].' '.$eInfo['EM_CONF']['title'].'</strong><br /><br />';
00995 $content.=$this->extInformationArray($extKey,$eInfo,1);
00996 $this->content.=$this->doc->spacer(10);
00997 $this->content.=$this->doc->section('Remote Extension Details:',$content,0,1);
00998
00999 if (is_array($fetchData['_MESSAGES'])) {
01000 $content = implode('<hr />',$fetchData['_MESSAGES']);
01001 $this->content.=$this->doc->section('Messages from repository server:',$content,0,1,1);
01002 }
01003 }
|
|
|
Standard init function of a module.
Reimplemented from t3lib_SCbase. Definition at line 341 of file index.php. References $TYPO3_CONF_VARS, menuConfig(), and TYPO3_mainDir. 00341 {
00342 global $BE_USER,$LANG,$BACK_PATH,$TYPO3_CONF_VARS;
00343
00344 // Setting paths of install scopes:
00345 $this->typePaths = Array (
00346 'S' => TYPO3_mainDir.'sysext/',
00347 'G' => TYPO3_mainDir.'ext/',
00348 'L' => 'typo3conf/ext/'
00349 );
00350 $this->typeBackPaths = Array (
00351 'S' => '../../../',
00352 'G' => '../../../',
00353 'L' => '../../../../'.TYPO3_mainDir
00354 );
00355
00356 // Setting module configuration:
00357 $this->MCONF = $GLOBALS['MCONF'];
00358
00359 // Setting GPvars:
00360 $this->CMD = t3lib_div::_GP('CMD');
00361 $this->listRemote = t3lib_div::_GP('ter_connect');
00362 $this->listRemote_search = t3lib_div::_GP('ter_search');
00363
00364
00365 // Configure menu
00366 $this->menuConfig();
00367
00368 // Setting internal static:
00369 $this->gzcompress = function_exists('gzcompress');
00370 if ($TYPO3_CONF_VARS['EXT']['em_devVerUpdate']) $this->versionDiffFactor = 1;
00371 if ($TYPO3_CONF_VARS['EXT']['em_systemInstall']) $this->systemInstall = 1;
00372 $this->repositoryUrl = $TYPO3_CONF_VARS['EXT']['em_TERurls'][0];
00373 $this->requiredExt = t3lib_div::trimExplode(',',$TYPO3_CONF_VARS['EXT']['requiredExt'],1);
00374
00375 // Initialize Document Template object:
00376 $this->doc = t3lib_div::makeInstance('noDoc');
00377 $this->doc->backPath = $BACK_PATH;
00378 $this->doc->docType = 'xhtml_trans';
00379
00380 // JavaScript
00381 $this->doc->JScode = $this->doc->wrapScriptTags('
00382 script_ended = 0;
00383 function jumpToUrl(URL) { //
00384 document.location = URL;
00385 }
00386 ');
00387 $this->doc->form = '<form action="" method="post" name="pageform">';
00388
00389 // Descriptions:
00390 $this->descrTable = '_MOD_'.$this->MCONF['name'];
00391 if ($BE_USER->uc['edit_showFieldHelp']) {
00392 $LANG->loadSingleTableDescription($this->descrTable);
00393 }
00394
00395 // Setting username/password etc. for upload-user:
00396 $this->fe_user['username'] = $this->MOD_SETTINGS['fe_u'];
00397 $this->fe_user['password'] = $this->MOD_SETTINGS['fe_p'];
00398 $this->fe_user['uploadPass'] = $this->MOD_SETTINGS['fe_up'];
00399 parent::init();
00400 $this->handleExternalFunctionValue('singleDetails');
00401 }
|
|
|
Returns image for "install".
Definition at line 2253 of file index.php. 02253 {
02254 return '<img src="install.gif" width="16" height="16" title="Install extension..." align="top" alt="" />';
02255 }
|
|
|
Returns title and style attribute for mouseover help text.
Definition at line 2217 of file index.php. 02217 {
02218 return ' title="'.htmlspecialchars($str).'" style="cursor:help;"';
02219 }
|
|
|
Main function for Extension Manager module.
Definition at line 500 of file index.php. References $LANG, t3lib_BEfunc::getFuncCheck(), t3lib_BEfunc::getFuncMenu(), menu(), and rfw(). 00500 {
00501 global $BE_USER,$LANG;
00502
00503 // Starting page:
00504 $this->content.=$this->doc->startPage('Extension Manager');
00505 $this->content.=$this->doc->header('Extension Manager');
00506 $this->content.=$this->doc->spacer(5);
00507
00508
00509 // Commands given which is executed regardless of main menu setting:
00510 if ($this->CMD['showExt']) { // Show details for a single extension
00511 $this->showExtDetails($this->CMD['showExt']);
00512 } elseif ($this->CMD['importExt'] || $this->CMD['uploadExt']) { // Imports an extension from online rep.
00513 $err = $this->importExtFromRep($this->CMD['importExt'],$this->CMD['loc'],$this->CMD['uploadExt'],'',$this->CMD['transl'],$this->CMD['inc_manual']);
00514 if ($err) {
00515 $this->content.=$this->doc->section('',$GLOBALS['TBE_TEMPLATE']->rfw($err));
00516 }
00517 } elseif ($this->CMD['importExtInfo']) { // Gets detailed information of an extension from online rep.
00518 $this->importExtInfo($this->CMD['importExtInfo']);
00519 } else { // No command - we show what the menu setting tells us:
00520
00521 $menu = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.menu').' '.
00522 t3lib_BEfunc::getFuncMenu(0,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function']);
00523
00524 if (t3lib_div::inList('0,1,2',$this->MOD_SETTINGS['function'])) {
00525 $menu.=' Order by: '.t3lib_BEfunc::getFuncMenu(0,'SET[listOrder]',$this->MOD_SETTINGS['listOrder'],$this->MOD_MENU['listOrder']).
00526 ' Show: '.t3lib_BEfunc::getFuncMenu(0,'SET[display_details]',$this->MOD_SETTINGS['display_details'],$this->MOD_MENU['display_details']).
00527 '<br />Display shy extensions: '.t3lib_BEfunc::getFuncCheck(0,'SET[display_shy]',$this->MOD_SETTINGS['display_shy']);
00528 }
00529
00530 if ($this->MOD_SETTINGS['function']==2) {
00531 $menu.=' Get own/member/selected extensions only: '.
00532 t3lib_BEfunc::getFuncCheck(0,'SET[own_member_only]',$this->MOD_SETTINGS['own_member_only']);
00533 }
00534
00535 $this->content.=$this->doc->section('','<span class="nobr">'.$menu.'</span>');
00536 $this->content.=$this->doc->spacer(10);
00537
00538 switch((string)$this->MOD_SETTINGS['function']) {
00539 case '0':
00540 // Lists loaded (installed) extensions
00541 $this->extensionList_loaded();
00542 break;
00543 case '1':
00544 // Lists the installed (available) extensions
00545 $this->extensionList_installed();
00546 break;
00547 case '2':
00548 // Lists the extensions available from online rep.
00549 $this->extensionList_import();
00550 break;
00551 case '3':
00552 // Lists the extensions available from online rep.
00553 $this->alterSettings();
00554 break;
00555 default:
00556 $this->extObjContent();
00557 break;
00558 }
00559 }
00560
00561 // Shortcuts:
00562 if ($BE_USER->mayMakeShortcut()) {
00563 $this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('CMD','function',$this->MCONF['name']));
00564 }
00565 }
|
|
||||||||||||||||
|
Perform a detailed, technical analysis of the available extension on server! Includes all kinds of verifications Takes some time to process, therfore use with care, in particular in listings.
Definition at line 2462 of file index.php. References $content, t3lib_extMgm::isLoaded(), PATH_site, table(), and TYPO3_MOD_PATH. 02462 {
02463
02464 // Get absolute path of the extension
02465 $absPath = $this->getExtPath($extKey,$extInfo['type']);
02466
02467 $infoArray = array();
02468
02469 $table_class_prefix = substr($extKey,0,5)=='user_' ? 'user_' : 'tx_'.str_replace('_','',$extKey).'_';
02470 $module_prefix = substr($extKey,0,5)=='user_' ? 'u' : 'tx'.str_replace('_','',$extKey);
02471
02472 // Database status:
02473 $dbInfo = $this->checkDBupdates($extKey,$extInfo,1);
02474
02475 // Database structure required:
02476 if (is_array($dbInfo['structure']['tables_fields'])) {
02477 $modify_tables = t3lib_div::trimExplode(',',$extInfo['EM_CONF']['modify_tables'],1);
02478 $infoArray['dump_tf'] = array();
02479
02480 foreach($dbInfo['structure']['tables_fields'] as $tN => $d) {
02481 if (in_array($tN,$modify_tables)) {
02482 $infoArray['fields'][] = $tN.': <i>'.
02483 (is_array($d['fields']) ? implode(', ',array_keys($d['fields'])) : '').
02484 (is_array($d['keys']) ? ' + '.count($d['keys']).' keys' : '').
02485 '</i>';
02486 if (is_array($d['fields'])) {
02487 reset($d['fields']);
02488 while(list($fN) = each($d['fields'])) {
02489 $infoArray['dump_tf'][] = $tN.'.'.$fN;
02490 if (!t3lib_div::isFirstPartOfStr($fN,$table_class_prefix)) {
02491 $infoArray['NSerrors']['fields'][$fN] = $fN;
02492 } else {
02493 $infoArray['NSok']['fields'][$fN] = $fN;
02494 }
02495 }
02496 }
02497 if (is_array($d['keys'])) {
02498 reset($d['keys']);
02499 while(list($fN)=each($d['keys'])) {
02500 $infoArray['dump_tf'][] = $tN.'.KEY:'.$fN;
02501 }
02502 }
02503 } else {
02504 $infoArray['dump_tf'][] = $tN;
02505 $infoArray['tables'][] = $tN;
02506 if (!t3lib_div::isFirstPartOfStr($tN,$table_class_prefix)) {
02507 $infoArray['NSerrors']['tables'][$tN] = $tN;
02508 } else $infoArray['NSok']['tables'][$tN] = $tN;
02509 }
02510 }
02511 if (count($dbInfo['structure']['diff']['diff']) || count($dbInfo['structure']['diff']['extra'])) {
02512 $msg = array();
02513 if (count($dbInfo['structure']['diff']['diff'])) $msg[] = 'missing';
02514 if (count($dbInfo['structure']['diff']['extra'])) $msg[] = 'of wrong type';
02515 $infoArray['tables_error'] = 1;
02516 if (t3lib_extMgm::isLoaded($extKey)) $infoArray['errors'][] = 'Some tables or fields are '.implode(' and ',$msg).'!';
02517 }
02518 }
02519
02520 // Static tables?
02521 if (is_array($dbInfo['static'])) {
02522 $infoArray['static'] = array_keys($dbInfo['static']);
02523
02524 foreach($dbInfo['static'] as $tN => $d) {
02525 if (!$d['exists']) {
02526 $infoArray['static_error'] = 1;
02527 if (t3lib_extMgm::isLoaded($extKey)) $infoArray['errors'][] = 'Static table(s) missing!';
02528 if (!t3lib_div::isFirstPartOfStr($tN,$table_class_prefix)) {
02529 $infoArray['NSerrors']['tables'][$tN] = $tN;
02530 } else $infoArray['NSok']['tables'][$tN] = $tN;
02531 }
02532 }
02533 }
02534
02535 // Backend Module-check:
02536 $knownModuleList = t3lib_div::trimExplode(',',$extInfo['EM_CONF']['module'],1);
02537 foreach($knownModuleList as $mod) {
02538 if (@is_dir($absPath.$mod)) {
02539 if (@is_file($absPath.$mod.'/conf.php')) {
02540 $confFileInfo = $this->modConfFileAnalysis($absPath.$mod.'/conf.php');
02541 if (is_array($confFileInfo['TYPO3_MOD_PATH'])) {
02542 $shouldBePath = $this->typeRelPaths[$extInfo['type']].$extKey.'/'.$mod.'/';
02543 if (strcmp($confFileInfo['TYPO3_MOD_PATH'][1][1],$shouldBePath)) {
02544 $infoArray['errors'][] = 'Configured TYPO3_MOD_PATH "'.$confFileInfo['TYPO3_MOD_PATH'][1][1].'" different from "'.$shouldBePath.'"';
02545 }
02546 } else $infoArray['errors'][] = 'No definition of TYPO3_MOD_PATH constant found inside!';
02547 if (is_array($confFileInfo['MCONF_name'])) {
02548 $mName = $confFileInfo['MCONF_name'][1][1];
02549 $mNameParts = explode('_',$mName);
02550 $infoArray['moduleNames'][] = $mName;
02551 if (!t3lib_div::isFirstPartOfStr($mNameParts[0],$module_prefix) &&
02552 (!$mNameParts[1] || !t3lib_div::isFirstPartOfStr($mNameParts[1],$module_prefix))) {
02553 $infoArray['NSerrors']['modname'][] = $mName;
02554 } else $infoArray['NSok']['modname'][] = $mName;
02555 } else $infoArray['errors'][] = 'No definition of MCONF[name] variable found inside!';
02556 } else $infoArray['errors'][] = 'Backend module conf file "'.$mod.'/conf.php" should exist but does not!';
02557 } else $infoArray['errors'][] = 'Backend module folder "'.$mod.'/" should exist but does not!';
02558 }
02559 $dirs = t3lib_div::get_dirs($absPath);
02560 if (is_array($dirs)) {
02561 reset($dirs);
02562 while(list(,$mod) = each($dirs)) {
02563 if (!in_array($mod,$knownModuleList) && @is_file($absPath.$mod.'/conf.php')) {
02564 $confFileInfo = $this->modConfFileAnalysis($absPath.$mod.'/conf.php');
02565 if (is_array($confFileInfo)) {
02566 $infoArray['errors'][] = 'It seems like there is a backend module in "'.$mod.'/conf.php" which is not configured in ext_emconf.php';
02567 }
02568 }
02569 }
02570 }
02571
02572 // ext_tables.php:
02573 if (@is_file($absPath.'ext_tables.php')) {
02574 $content = t3lib_div::getUrl($absPath.'ext_tables.php');
02575 if (eregi('t3lib_extMgm::addModule',$content)) $infoArray['flags'][] = 'Module';
02576 if (eregi('t3lib_extMgm::insertModuleFunction',$content)) $infoArray['flags'][] = 'Module+';
02577 if (stristr($content,'t3lib_div::loadTCA')) $infoArray['flags'][] = 'loadTCA';
02578 if (stristr($content,'$TCA[')) $infoArray['flags'][] = 'TCA';
02579 if (eregi('t3lib_extMgm::addPlugin',$content)) $infoArray['flags'][] = 'Plugin';
02580 }
02581
02582 // ext_localconf.php:
02583 if (@is_file($absPath.'ext_localconf.php')) {
02584 $content = t3lib_div::getUrl($absPath.'ext_localconf.php');
02585 if (eregi('t3lib_extMgm::addPItoST43',$content)) $infoArray['flags'][]='Plugin/ST43';
02586 if (eregi('t3lib_extMgm::addPageTSConfig',$content)) $infoArray['flags'][]='Page-TSconfig';
02587 if (eregi('t3lib_extMgm::addUserTSConfig',$content)) $infoArray['flags'][]='User-TSconfig';
02588 if (eregi('t3lib_extMgm::addTypoScriptSetup',$content)) $infoArray['flags'][]='TS/Setup';
02589 if (eregi('t3lib_extMgm::addTypoScriptConstants',$content)) $infoArray['flags'][]='TS/Constants';
02590 }
02591
02592 if (@is_file($absPath.'ext_typoscript_constants.txt')) {
02593 $infoArray['TSfiles'][] = 'Constants';
02594 }
02595 if (@is_file($absPath.'ext_typoscript_setup.txt')) {
02596 $infoArray['TSfiles'][] = 'Setup';
02597 }
02598 if (@is_file($absPath.'ext_conf_template.txt')) {
02599 $infoArray['conf'] = 1;
02600 }
02601
02602 // Classes:
02603 if ($validity) {
02604 $filesInside = $this->getClassIndexLocallangFiles($absPath,$table_class_prefix,$extKey);
02605 if (is_array($filesInside['errors'])) $infoArray['errors'] = array_merge((array)$infoArray['errors'],$filesInside['errors']);
02606 if (is_array($filesInside['NSerrors'])) $infoArray['NSerrors'] = array_merge((array)$infoArray['NSerrors'],$filesInside['NSerrors']);
02607 if (is_array($filesInside['NSok'])) $infoArray['NSok'] = array_merge((array)$infoArray['NSok'],$filesInside['NSok']);
02608 $infoArray['locallang'] = $filesInside['locallang'];
02609 $infoArray['classes'] = $filesInside['classes'];
02610 }
02611
02612 // Upload folders
02613 if ($extInfo['EM_CONF']['uploadfolder']) {
02614 $infoArray['uploadfolder'] = $this->ulFolder($extKey);
02615 if (!@is_dir(PATH_site.$infoArray['uploadfolder'])) {
02616 $infoArray['errors'][] = 'Error: Upload folder "'.$infoArray['uploadfolder'].'" did not exist!';
02617 $infoArray['uploadfolder'] = '';
02618 }
02619 }
02620
02621 // Create directories:
02622 if ($extInfo['EM_CONF']['createDirs']) {
02623 $infoArray['createDirs'] = array_unique(t3lib_div::trimExplode(',',$extInfo['EM_CONF']['createDirs'],1));
02624 foreach($infoArray['createDirs'] as $crDir) {
02625 if (!@is_dir(PATH_site.$crDir)) {
02626 $infoArray['errors'][]='Error: Upload folder "'.$crDir.'" did not exist!';
02627 }
02628 }
02629 }
02630
02631 // Return result array:
02632 return $infoArray;
02633 }
|
|
|
Configuration of which mod-menu items can be used.
Reimplemented from t3lib_SCbase. Definition at line 428 of file index.php. References t3lib_BEfunc::getModuleData(). Referenced by init(). 00428 {
00429 global $BE_USER;
00430
00431 // MENU-ITEMS:
00432 $this->MOD_MENU = array(
00433 'function' => array(
00434 0 => 'Loaded extensions',
00435 1 => 'Available extensions to install',
00436 2 => 'Import extensions from online repository',
00437 3 => 'Settings',
00438 ),
00439 'listOrder' => array(
00440 'cat' => 'Category',
00441 'author_company' => 'Author',
00442 'state' => 'State',
00443 'private' => 'Private',
00444 'type' => 'Type',
00445 'dep' => 'Dependencies',
00446 ),
00447 'display_details' => array(
00448 1 => 'Details',
00449 0 => 'Description',
00450 2 => 'More details',
00451
00452 3 => 'Technical (takes time!)',
00453 4 => 'Validating (takes time!)',
00454 5 => 'Changed? (takes time!)',
00455 ),
00456 'display_shy' => '',
00457 'own_member_only' => '',
00458 'singleDetails' => array(
00459 'info' => 'Information',
00460 'edit' => 'Edit files',
00461 'backup' => 'Backup/Delete',
00462 'dump' => 'Dump DB',
00463 'upload' => 'Upload',
00464 'updateModule' => 'UPDATE!',
00465 ),
00466 'fe_u' => '',
00467 'fe_p' => '',
00468 'fe_up' => '',
00469 );
00470
00471 $this->MOD_MENU['singleDetails'] = $this->mergeExternalItems($this->MCONF['name'],'singleDetails',$this->MOD_MENU['singleDetails']);
00472
00473 // page/be_user TSconfig settings and blinding of menu-items
00474 if (!$BE_USER->getTSConfigVal('mod.'.$this->MCONF['name'].'.allowTVlisting')) {
00475 unset($this->MOD_MENU['display_details'][3]);
00476 unset($this->MOD_MENU['display_details'][4]);
00477 unset($this->MOD_MENU['display_details'][5]);
00478 }
00479
00480 // CLEANSE SETTINGS
00481 $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
00482
00483 if ($this->MOD_SETTINGS['function']==2) {
00484 // If listing from online repository, certain items are removed though:
00485 unset($this->MOD_MENU['listOrder']['type']);
00486 unset($this->MOD_MENU['listOrder']['private']);
00487 unset($this->MOD_MENU['display_details'][3]);
00488 unset($this->MOD_MENU['display_details'][4]);
00489 unset($this->MOD_MENU['display_details'][5]);
00490 $this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
00491 }
00492 parent::menuConfig();
00493 }
|
|
|
Warning ( + text string) message about the impossibility to import extensions (both local and global locations are disabled...).
Definition at line 2262 of file index.php. 02262 {
02263 return '<img src="'.$this->doc->backPath.'gfx/icon_warning2.gif" width="18" height="16" align="top" alt="" /><strong>Import to both local and global path is disabled in TYPO3_CONF_VARS!</strong>';
02264 }
|
|
|
Print module content. Called as last thing in the global scope.
Definition at line 572 of file index.php. 00572 {
00573 global $SOBE;
00574
00575 $this->content.= $this->doc->endPage();
00576 echo $this->content;
00577 }
|
|
|
Returns image tag for "uninstall".
Definition at line 2244 of file index.php. 02244 {
02245 return '<img src="uninstall.gif" width="16" height="16" title="Remove extension" align="top" alt="" />';
02246 }
|
|
||||||||||||||||
|
Set category array entries for extension.
Definition at line 2400 of file index.php. 02400 {
02401
02402 // Getting extension title:
02403 $extTitle = $listArrayPart['EM_CONF']['title'];
02404
02405 // Category index:
02406 $index = $listArrayPart['EM_CONF']['category'];
02407 $cat['cat'][$index][$extKey] = $extTitle;
02408
02409 // Author index:
02410 $index = $listArrayPart['EM_CONF']['author'].($listArrayPart['EM_CONF']['author_company']?', '.$listArrayPart['EM_CONF']['author_company']:'');
02411 $cat['author_company'][$index][$extKey] = $extTitle;
02412
02413 // State index:
02414 $index = $listArrayPart['EM_CONF']['state'];
02415 $cat['state'][$index][$extKey] = $extTitle;
02416
02417 // Private index:
02418 $index = $listArrayPart['EM_CONF']['private'] ? 1 : 0;
02419 $cat['private'][$index][$extKey] = $extTitle;
02420
02421 // Type index:
02422 $index = $listArrayPart['type'];
02423 $cat['type'][$index][$extKey] = $extTitle;
02424
02425 // Dependencies:
02426 if ($list[$extKey]['EM_CONF']['dependencies']) {
02427 $depItems = t3lib_div::trimExplode(',', $list[$extKey]['EM_CONF']['dependencies'], 1);
02428 foreach($depItems as $depKey) {
02429 $cat['dep'][$depKey][$extKey] = $extTitle;
02430 }
02431 }
02432
02433 // Return categories:
02434 return $cat;
02435 }
|
|
|
Display extensions details.
Definition at line 1184 of file index.php. References $content, t3lib_BEfunc::cshItem(), error(), t3lib_BEfunc::getFuncMenu(), header(), t3lib_extMgm::isLoaded(), t3lib_extMgm::isLocalconfWritable(), PATH_site, and table(). 01184 {
01185 global $TYPO3_LOADED_EXT;
01186
01187 list($list,$cat)=$this->getInstalledExtensions();
01188 $absPath = $this->getExtPath($extKey,$list[$extKey]['type']);
01189
01190 // Check updateModule:
01191 if (@is_file($absPath.'class.ext_update.php')) {
01192 require_once($absPath.'class.ext_update.php');
01193 $updateObj = new ext_update;
01194 if (!$updateObj->access()) {
01195 unset($this->MOD_MENU['singleDetails']['updateModule']);
01196 }
01197 } else {
01198 unset($this->MOD_MENU['singleDetails']['updateModule']);
01199 }
01200
01201 // Function menu here:
01202 $content = '
01203 <table border="0" cellpadding="0" cellspacing="0" width="100%">
01204 <tr>
01205 <td nowrap="nowrap">Extension: <strong>'.$this->extensionTitleIconHeader($extKey,$list[$extKey]).'</strong> ('.$extKey.')</td>
01206 <td align="right" nowrap="nowrap">'.
01207 t3lib_BEfunc::getFuncMenu(0,'SET[singleDetails]',$this->MOD_SETTINGS['singleDetails'],$this->MOD_MENU['singleDetails'],'','&CMD[showExt]='.$extKey).' '.
01208 '<a href="index.php" class="typo3-goBack"><img'.t3lib_iconWorks::skinImg($this->doc->backPath,'gfx/goback.gif','width="14" height="14"').' class="absmiddle" alt="" /> Go back</a></td>
01209 </tr>
01210 </table>';
01211 $this->content.=$this->doc->section('',$content);
01212
01213 // Show extension details:
01214 if ($list[$extKey]) {
01215
01216 // Checking if a command for install/uninstall is executed:
01217 if (($this->CMD['remove'] || $this->CMD['load']) && !in_array($extKey,$this->requiredExt)) {
01218
01219 // Install / Uninstall extension here:
01220 if (t3lib_extMgm::isLocalconfWritable()) {
01221 if ($this->CMD['remove']) {
01222 $newExtList = $this->removeExtFromList($extKey,$list);
01223 } else {
01224 $newExtList = $this->addExtToList($extKey,$list);
01225 }
01226
01227 // Success-installation:
01228 if ($newExtList!=-1) {
01229 $updates = '';
01230 if ($this->CMD['load']) {
01231 $updates = $this->updatesForm($extKey,$list[$extKey],1,'','<input type="hidden" name="_do_install" value="1" /><input type="hidden" name="_clrCmd" value="'.$this->CMD['clrCmd'].'" />');
01232 if ($updates) {
01233 $updates = 'Before the extension can be installed the database needs to be updated with new tables or fields. Please select which operations to perform:'.$updates;
01234 $this->content.=$this->doc->section('Installing '.$this->extensionTitleIconHeader($extKey,$list[$extKey]).strtoupper(': Database needs to be updated'),$updates,1,1,1,1);
01235 }
01236 # $updates.=$this->checkDBupdates($extKey,$list[$extKey]);
01237 # $updates.= $this->checkClearCache($extKey,$list[$extKey]);
01238 # $updates.= $this->checkUploadFolder($extKey,$list[$extKey]);
01239 /* if ($updates) {
01240 $updates='
01241 Before the extension can be installed the database needs to be updated with new tables or fields. Please select which operations to perform:
01242 </form><form action="'.t3lib_div::linkThisScript().'" method="post">'.$updates.'
01243 <br /><input type="submit" name="write" value="Update database and install extension" />
01244 <input type="hidden" name="_do_install" value="1" />
01245 ';
01246 $this->content.=$this->doc->section('Installing '.$this->extensionTitleIconHeader($extKey,$list[$extKey]).strtoupper(': Database needs to be updated'),$updates,1,1,1);
01247 }
01248 */ } elseif ($this->CMD['remove']) {
01249 $updates.= $this->checkClearCache($extKey,$list[$extKey]);
01250 if ($updates) {
01251 $updates = '
01252 </form><form action="'.t3lib_div::linkThisScript().'" method="post">'.$updates.'
01253 <br /><input type="submit" name="write" value="Remove extension" />
01254 <input type="hidden" name="_do_install" value="1" />
01255 <input type="hidden" name="_clrCmd" value="'.$this->CMD['clrCmd'].'" />
01256 ';
01257 $this->content.=$this->doc->section('Installing '.$this->extensionTitleIconHeader($extKey,$list[$extKey]).strtoupper(': Database needs to be updated'),$updates,1,1,1,1);
01258 }
01259 }
01260 if (!$updates || t3lib_div::_GP('_do_install')) {
01261 $this->writeNewExtensionList($newExtList);
01262
01263
01264 /*
01265 $content = $newExtList;
01266 $this->content.=$this->doc->section('Active status',"
01267 <strong>Extension list is written to localconf.php!</strong><br />
01268 It may be necessary to reload TYPO3 depending on the change.<br />
01269
01270 <em>(".$content.")</em>",0,1);
01271 */
01272 if ($this->CMD['clrCmd'] || t3lib_div::_GP('_clrCmd')) {
01273 $vA = array('CMD'=>'');
01274 } else {
01275 $vA = array('CMD'=>Array('showExt'=>$extKey));
01276 }
01277 header('Location: '.t3lib_div::linkThisScript($vA));
01278 }
01279 }
01280 } else {
01281 $this->content.=$this->doc->section('Installing '.$this->extensionTitleIconHeader($extKey,$list[$extKey]).strtoupper(': Write access error'),'typo3conf/localconf.php seems not to be writable, so the extension cannot be installed automatically!',1,1,2,1);
01282 }
01283
01284 } elseif ($this->CMD['downloadFile'] && !in_array($extKey,$this->requiredExt)) {
01285
01286 // Link for downloading extension has been clicked - deliver content stream:
01287 $dlFile = $this->CMD['downloadFile'];
01288 if (t3lib_div::isFirstPartOfStr($dlFile,PATH_site) && t3lib_div::isFirstPartOfStr($dlFile,$absPath) && @is_file($dlFile)) {
01289 $mimeType = 'application/octet-stream';
01290 Header('Content-Type: '.$mimeType);
01291 Header('Content-Disposition: attachment; filename='.basename($dlFile));
01292 echo t3lib_div::getUrl($dlFile);
01293 exit;
01294 } else die('error....');
01295
01296 } elseif ($this->CMD['editFile'] && !in_array($extKey,$this->requiredExt)) {
01297
01298 // Editing extension file:
01299 $editFile = $this->CMD['editFile'];
01300 if (t3lib_div::isFirstPartOfStr($editFile,PATH_site) && t3lib_div::isFirstPartOfStr($editFile,$absPath)) { // Paranoia...
01301
01302 $fI = t3lib_div::split_fileref($editFile);
01303 if (@is_file($editFile) && t3lib_div::inList($this->editTextExtensions,$fI['fileext'])) {
01304 if (filesize($editFile)<($this->kbMax*1024)) {
01305 $outCode = '';
01306 $info = '';
01307 $submittedContent = t3lib_div::_POST('edit');
01308 $saveFlag = 0;
01309
01310 if(isset($submittedContent['file'])) { // Check referer here?
01311 $info.= $GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>File saved.</strong>').'<br />';
01312 $oldFileContent = t3lib_div::getUrl($editFile);
01313 $info.= 'MD5: <b>'.md5(str_replace(chr(13),'',$oldFileContent)).'</b> (Previous File)<br />';
01314 if (!$GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit']) {
01315 t3lib_div::writeFile($editFile,$submittedContent['file']);
01316 $saveFlag = 1;
01317 } else die('Saving disabled!!!');
01318 }
01319
01320 $fileContent = t3lib_div::getUrl($editFile);
01321 $numberOfRows = 35;
01322
01323 $outCode.= 'File: <b>'.substr($editFile,strlen($absPath)).'</b> ('.t3lib_div::formatSize(filesize($editFile)).')<br />';
01324 $info.= 'MD5: <b>'.md5(str_replace(chr(13),'',$fileContent)).'</b> (File)<br />';
01325 if($saveFlag) $info.= 'MD5: <b>'.md5(str_replace(chr(13),'',$submittedContent['file'])).'</b> (Saved)<br />';
01326 $outCode.= '<textarea name="edit[file]" rows="'.$numberOfRows.'" wrap="off"'.$this->doc->formWidthText(48,'width:98%;height:70%','off').'>'.t3lib_div::formatForTextarea($fileContent).'</textarea>';
01327 $outCode.= '<input type="hidden" name="edit[filename]" value="'.$editFile.'" />';
01328 $outCode.= '<input type="hidden" name="CMD[editFile]" value="'.htmlspecialchars($editFile).'" />';
01329 $outCode.= '<input type="hidden" name="CMD[showExt]" value="'.$extKey.'" />';
01330 $outCode.= $info;
01331
01332 if (!$GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit']) {
01333 $outCode.='<br /><input type="submit" name="save_file" value="Save file" />';
01334 } else $outCode.=$GLOBALS['TBE_TEMPLATE']->rfw('<br />[SAVING IS DISABLED - can be enabled by the TYPO3_CONF_VARS[EXT][noEdit]-flag] ');
01335
01336 $onClick = 'document.location=\'index.php?CMD[showExt]='.$extKey.'\';return false;';
01337 $outCode.='<input type="submit" name="cancel" value="Cancel" onclick="'.htmlspecialchars($onClick).'" />';
01338
01339 $theOutput.=$this->doc->spacer(15);
01340 $theOutput.=$this->doc->section('Edit file:','',0,1);
01341 $theOutput.=$this->doc->sectionEnd().$outCode;
01342 $this->content.=$theOutput;
01343 } else {
01344 $theOutput.=$this->doc->spacer(15);
01345 $theOutput.=$this->doc->section('Filesize exceeded '.$this->kbMax.' Kbytes','Files larger than '.$this->kbMax.' KBytes are not allowed to be edited.');
01346 }
01347 }
01348 } else die('Fatal Edit error: File "'.$editFile.'" was not inside the correct path of the TYPO3 Extension!');
01349 } else {
01350
01351 // MAIN:
01352 switch((string)$this->MOD_SETTINGS['singleDetails']) {
01353 case 'info':
01354 // Loaded / Not loaded:
01355 if (!in_array($extKey,$this->requiredExt)) {
01356 if ($TYPO3_LOADED_EXT[$extKey]) {
01357 $content = '<strong>The extension is installed (loaded and running)!</strong><br />'.
01358 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[remove]=1').'">Click here to remove the extension: '.$this->removeButton().'</a>';
01359 } else {
01360 $content = 'The extension is <strong>not</strong> installed yet.<br />'.
01361 '<a href="'.htmlspecialchars('index.php?CMD[showExt]='.$extKey.'&CMD[load]=1').'">Click here to install the extension: '.$this->installButton().'</a>';
01362 }
01363 } else {
01364 $content = 'This extension is entered in the TYPO3_CONF_VARS[SYS][requiredExt] list and is therefore always loaded.';
01365 }
01366 $this->content.=$this->doc->spacer(10);
01367 $this->content.=$this->doc->section('Active status:',$content,0,1);
01368
01369 if (t3lib_extMgm::isLoaded($extKey)) {
01370 $updates=$this->updatesForm($extKey,$list[$extKey]);
01371 if ($updates) {
01372 $this->content.=$this->doc->spacer(10);
01373 $this->content.=$this->doc->section('Update needed:',$updates.'<br /><br />Notice: "Static data" may not <em>need</em> to be updated. You will only have to import static data each time you upgrade the extension.',0,1);
01374 }
01375 }
01376
01377 // Config:
01378 if (@is_file($absPath.'ext_conf_template.txt')) {
01379 $this->content.=$this->doc->spacer(10);
01380 $this->content.=$this->doc->section('Configuration:','(<em>Notice: You may need to clear the cache after configuration of the extension. This is required if the extension adds TypoScript depending on these settings.</em>)<br /><br />',0,1);
01381 $this->tsStyleConfigForm($extKey,$list[$extKey]);
01382 }
01383
01384 // Show details:
01385 $content = t3lib_BEfunc::cshItem('_MOD_tools_em', 'info', $GLOBALS['BACK_PATH'],'|<br/>');
01386 $content.= $this->extInformationArray($extKey,$list[$extKey]);
01387
01388 $this->content.=$this->doc->spacer(10);
01389 $this->content.=$this->doc->section('Details:',$content,0,1);
01390 break;
01391 case 'upload':
01392 $TER_CMD = t3lib_div::_GP('TER_CMD');
01393 if (is_array($TER_CMD)) {
01394 $msg = $this->processRepositoryReturnData($TER_CMD);
01395 if ($msg) {
01396 $this->content.=$this->doc->section('Local update of EM_CONF',$msg,0,1,1);
01397 $this->content.=$this->doc->spacer(10);
01398 }
01399 // Must reload this, because EM_CONF information has been updated!
01400 list($list,$cat)=$this->getInstalledExtensions();
01401 } else {
01402 // CSH:
01403 $content = t3lib_BEfunc::cshItem('_MOD_tools_em', 'upload', $GLOBALS['BACK_PATH'],'|<br/>');
01404
01405 // Upload:
01406 if (substr($extKey,0,5)!='user_') {
01407 $content.= $this->getRepositoryUploadForm($extKey,$list[$extKey]);
01408 $eC=0;
01409 } else {
01410 $content.='The extensions has an extension key prefixed "user_" which indicates that it is a user-defined extension with no official unique identification. Therefore it cannot be uploaded.<br />
01411 You are encouraged to register a unique extension key for all your TYPO3 extensions - even if the project is current not official.';
01412 $eC=2;
01413 }
01414 $this->content.=$this->doc->section('Upload extension to repository',$content,0,1,$eC);
01415 }
01416 break;
01417 case 'download':
01418 break;
01419 case 'backup':
01420 $content = t3lib_BEfunc::cshItem('_MOD_tools_em', 'backup_delete', $GLOBALS['BACK_PATH'],'|<br/>');
01421 $content.= $this->extBackup($extKey,$list[$extKey]);
01422 $this->content.=$this->doc->section('Backup',$content,0,1);
01423
01424 $content = $this->extDelete($extKey,$list[$extKey]);
01425 $this->content.=$this->doc->section('Delete',$content,0,1);
01426
01427 $content = $this->extUpdateEMCONF($extKey,$list[$extKey]);
01428 $this->content.=$this->doc->section('Update EM_CONF',$content,0,1);
01429 break;
01430 case 'dump':
01431 $this->extDumpTables($extKey,$list[$extKey]);
01432 break;
01433 case 'edit':
01434 // Files:
01435 $content = t3lib_BEfunc::cshItem('_MOD_tools_em', 'editfiles', $GLOBALS['BACK_PATH'],'|<br/>');
01436 $content.= $this->getFileListOfExtension($extKey,$list[$extKey]);
01437
01438 $this->content.=$this->doc->section('Extension files',$content,0,1);
01439 break;
01440 case 'updateModule':
01441 $this->content.=$this->doc->section('Update:',$updateObj->main(),0,1);
01442 break;
01443 default:
01444 $this->extObjContent();
01445 break;
01446 }
01447 }
01448 }
01449 }
|
|
||||||||||||||||||||||||
|
Creates a form for an extension which contains all options for configuration, updates of database, clearing of cache etc. This form is shown when
Definition at line 1477 of file index.php. 01477 {
01478 $script = $script ? $script : t3lib_div::linkThisScript();
01479 $updates.= $this->checkDBupdates($extKey,$extInfo);
01480 $uCache = $this->checkClearCache($extKey,$extInfo);
01481 if ($notSilent) $updates.= $uCache;
01482 $updates.= $this->checkUploadFolder($extKey,$extInfo);
01483
01484 $absPath = $this->getExtPath($extKey,$extInfo['type']);
01485 if ($notSilent && @is_file($absPath.'ext_conf_template.txt')) {
01486 $cForm = $this->tsStyleConfigForm($extKey,$extInfo,1,$script,$updates.$addFields.'<br />');
01487 }
01488
01489 if ($updates || $cForm) {
01490 if ($cForm) {
01491 $updates = '</form>'.$cForm.'<form>';
01492 } else {
01493 $updates = '</form><form action="'.htmlspecialchars($script).'" method="post">'.$updates.$addFields.'
01494 <br /><input type="submit" name="write" value="Make updates" />
01495 ';
01496 }
01497 }
01498 return $updates;
01499 }
|
|
||||||||||||
|
Wrapping input string in a link tag with link to email address.
Definition at line 2190 of file index.php. 02190 {
02191 if ($email) {
02192 $str = '<a href="mailto:'.htmlspecialchars($email).'">'.htmlspecialchars($str).'</a>';
02193 }
02194 return $str;
02195 }
|
|
|
Initial value: Array(
'be' => 'Backend',
'module' => 'Backend Modules',
'fe' => 'Frontend',
'plugin' => 'Frontend Plugins',
'misc' => 'Miscellaneous',
'services' => 'Services',
'templates' => 'Templates',
'example' => 'Examples',
'doc' => 'Documentation'
)
|
|
|
The value of GET/POST var, 'CMD'.
Reimplemented from t3lib_SCbase. |
|
|
Generally used for accumulating the output content of backend modules.
Reimplemented from t3lib_SCbase. |
|
|
Initial value: Array(
'cat' => Array (
'be' => array(),
'module' => array(),
'fe' => array(),
'plugin' => array(),
'misc' => array(),
'services' => array(),
'templates' => array(),
'example' => array(),
'doc' => array()
)
)
Should reflect $categories above Dynamic var. |
|
|
Initial value: Array (
0 => 2,
1 => 5,
2 => 6,
3 => 6,
4 => 4,
5 => 1
)
|
|
|
Generally used to hold an instance of the 'template' class from typo3/template.php.
Reimplemented from t3lib_SCbase. |
|
|
|
|
|
Initial value: array(
'username' => '',
'password' => '',
'uploadPass' => '',
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Loaded with the global array $MCONF which holds some module configuration from the conf.php file of backend modules.
Reimplemented from t3lib_SCbase. |
|
|
The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
Reimplemented from t3lib_SCbase. |
|
|
Current settings for the keys of the MOD_MENU array.
Reimplemented from t3lib_SCbase. |
|
|
|
|
|
|
|
|
Initial value: Array (
'all' => '',
'owner' => 'Owner',
'selected' => 'Selected',
'member' => 'Member',
)
|
|
|
|
|
|
|
|
|
Initial value: Array (
'alpha' => 'Alpha',
'beta' => 'Beta',
'stable' => 'Stable',
'experimental' => 'Experimental',
'test' => 'Test',
'obsolete' => 'Obsolete',
)
|
|
|
|
|
|
|
|
|
Initial value: Array (
'S' => 'System extension (typo3/sysext/) - Always distributed with source code (Static).',
'G' => 'Global extensions (typo3/ext/) - Available for shared source on server (Dynamic).',
'L' => 'Local extensions (typo3conf/ext/) - Local for this TYPO3 installation only (Dynamic).',
)
|
|
|
Initial value: Array (
'S' => 'System',
'G' => 'Global',
'L' => 'Local',
)
|
|
|
|
|
|
Initial value: Array (
'S' => 'sysext/',
'G' => 'ext/',
'L' => '../typo3conf/ext/',
)
|
|
|
|
1.3.8-20040913