Commit 42812154229442fc16470c8f6656b9d72a67a954
1 parent
522b7c1c
Merged in from DEV trunk...
KTS-3077 "Error dialogs are not displayed correctly" Fixed. Fixed text overlapping the bottom of the block. Fixed holes in the side of the block. Committed By: Jonathan Byrne Reviewed By: Megan Watson KTS-3056 "Create a script to check if Open Office is running (SUP-614)" Fixed. Added the script to the scheduled tasks. Committed by: Megan Watson Reviewed by: Conrad Vermeulen KTS-3083 "Import from Server Location, you get a Fatal Error" Fixed. Added document object error checking. Committed By: Kevin Fourie Reviewed By: Jonnathan Byrne git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@8139 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
6 changed files
with
101 additions
and
4 deletions
bin/checkopenoffice.php
0 → 100644
| 1 | +<?php | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * | |
| 5 | + * $Id: | |
| 6 | + * | |
| 7 | + * KnowledgeTree Open Source Edition | |
| 8 | + * Document Management Made Simple | |
| 9 | + * Copyright (C) 2004 - 2008 The Jam Warehouse Software (Pty) Limited | |
| 10 | + * | |
| 11 | + * This program is free software; you can redistribute it and/or modify it under | |
| 12 | + * the terms of the GNU General Public License version 3 as published by the | |
| 13 | + * Free Software Foundation. | |
| 14 | + * | |
| 15 | + * This program is distributed in the hope that it will be useful, but WITHOUT | |
| 16 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
| 17 | + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
| 18 | + * details. | |
| 19 | + * | |
| 20 | + * You should have received a copy of the GNU General Public License | |
| 21 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
| 22 | + * | |
| 23 | + * You can contact The Jam Warehouse Software (Pty) Limited, Unit 1, Tramber Place, | |
| 24 | + * Blake Street, Observatory, 7925 South Africa. or email info@knowledgetree.com. | |
| 25 | + * | |
| 26 | + * The interactive user interfaces in modified source and object code versions | |
| 27 | + * of this program must display Appropriate Legal Notices, as required under | |
| 28 | + * Section 5 of the GNU General Public License version 3. | |
| 29 | + * | |
| 30 | + * In accordance with Section 7(b) of the GNU General Public License version 3, | |
| 31 | + * these Appropriate Legal Notices must retain the display of the "Powered by | |
| 32 | + * KnowledgeTree" logo and retain the original copyright notice. If the display of the | |
| 33 | + * logo is not reasonably feasible for technical reasons, the Appropriate Legal Notices | |
| 34 | + * must display the words "Powered by KnowledgeTree" and retain the original | |
| 35 | + * copyright notice. | |
| 36 | + * Contributor( s): ______________________________________ | |
| 37 | + */ | |
| 38 | + | |
| 39 | +chdir(realpath(dirname(__FILE__))); | |
| 40 | +require_once('../config/dmsDefaults.php'); | |
| 41 | + | |
| 42 | +// Check if open office is running | |
| 43 | +$sCheckOO = SearchHelper::checkOpenOfficeAvailablity(); | |
| 44 | + | |
| 45 | + | |
| 46 | +// If it is running - exit, we don't need to do anything otherwise start it | |
| 47 | +if(!empty($sCheckOO)){ | |
| 48 | + | |
| 49 | + $default->log->debug('Check Open Office Task: Open office service is not running... trying to start it.'); | |
| 50 | + | |
| 51 | + if(OS_WINDOWS){ | |
| 52 | + | |
| 53 | + // Check the path first | |
| 54 | + $sPath = realpath('../../winserv.exe'); | |
| 55 | + | |
| 56 | + if(file_exists($sPath)){ | |
| 57 | + $sCmd = "\"$sPath\" start kt_openoffice"; | |
| 58 | + KTUtil::pexec($sCmd); | |
| 59 | + exit; | |
| 60 | + } | |
| 61 | + // If that doesn't work, check for the all start | |
| 62 | + $sPath = realpath('../../bin/allctl.bat'); | |
| 63 | + if(file_exists($sPath)){ | |
| 64 | + $sCmd = "\"$sPath\" start"; | |
| 65 | + KTUtil::pexec($sCmd); | |
| 66 | + exit; | |
| 67 | + } | |
| 68 | + // Might be a source install ... ??? | |
| 69 | + $default->log->debug('Check Open Office Task: Can\'t start Open office, this may be a source install.'); | |
| 70 | + exit; | |
| 71 | + }else{ | |
| 72 | + $sPath = realpath('../../dmsctl.sh'); | |
| 73 | + if(file_exists($sPath)){ | |
| 74 | + $sCmd = "\"$sPath\" start"; | |
| 75 | + KTUtil::pexec($sCmd); | |
| 76 | + exit; | |
| 77 | + } | |
| 78 | + // might be a source install | |
| 79 | + $default->log->debug('Check Open Office Task: Can\'t start Open office, this may be a source install.'); | |
| 80 | + exit; | |
| 81 | + } | |
| 82 | +} | |
| 83 | + | |
| 84 | +exit; | |
| 85 | +?> | |
| 0 | 86 | \ No newline at end of file | ... | ... |
lib/documentmanagement/documentutil.inc.php
| ... | ... | @@ -695,6 +695,10 @@ class KTDocumentUtil { |
| 695 | 695 | if (is_null($aOptions)) { |
| 696 | 696 | $aOptions = array(); |
| 697 | 697 | } |
| 698 | + if (PEAR::isError($oDocument)) { | |
| 699 | + return PEAR::raiseError(sprintf(_kt("Couldn't store contents: %s"), $oDocument->getMessage())); | |
| 700 | + } | |
| 701 | + | |
| 698 | 702 | $bCanMove = KTUtil::arrayGet($aOptions, 'move'); |
| 699 | 703 | $oStorage =& KTStorageManagerUtil::getSingleton(); |
| 700 | 704 | ... | ... |
resources/css/kt-framing.css
| ... | ... | @@ -1022,7 +1022,7 @@ a.main_nav_item { |
| 1022 | 1022 | |
| 1023 | 1023 | /* block level. */ |
| 1024 | 1024 | .ktError { |
| 1025 | - padding: 0.1em 1em; | |
| 1025 | + padding: 0.1em 1em 1em 1em; | |
| 1026 | 1026 | margin: 1em 0 0 0.5em; |
| 1027 | 1027 | } |
| 1028 | 1028 | |
| ... | ... | @@ -1034,7 +1034,7 @@ a.main_nav_item { |
| 1034 | 1034 | |
| 1035 | 1035 | /* block level. */ |
| 1036 | 1036 | .ktInfo { |
| 1037 | - padding: 0.1em 1em; | |
| 1037 | + padding: 0.1em 1em 1em 1em; | |
| 1038 | 1038 | margin: 1em 0 0 0.5em; |
| 1039 | 1039 | } |
| 1040 | 1040 | ... | ... |
sql/mysql/install/data.sql
| ... | ... | @@ -808,7 +808,8 @@ INSERT INTO `scheduler_tasks` VALUES |
| 808 | 808 | (2,'Index Migration','search2/indexing/bin/cronMigration.php','',0,'5mins','2007-10-01',NULL,0,'system'), |
| 809 | 809 | (3,'Index Optimisation','search2/indexing/bin/optimise.php','',0,'weekly','2007-10-01',NULL,0,'system'), |
| 810 | 810 | (4,'Periodic Document Expunge','bin/expungeall.php','',0,'weekly','2007-10-01',NULL,0,'disabled'), |
| 811 | -(5,'Database Maintenance','bin/dbmaint.php','optimize',0,'monthly','2007-10-01',NULL,0,'disabled'); | |
| 811 | +(5,'Database Maintenance','bin/dbmaint.php','optimize',0,'monthly','2007-10-01',NULL,0,'disabled'), | |
| 812 | +(6,'Open Office test','bin/checkopenoffice.php','',0,'1min','2007-10-01',NULL,0,'enabled'); | |
| 812 | 813 | /*!40000 ALTER TABLE `scheduler_tasks` ENABLE KEYS */; |
| 813 | 814 | UNLOCK TABLES; |
| 814 | 815 | |
| ... | ... | @@ -1720,7 +1721,7 @@ UNLOCK TABLES; |
| 1720 | 1721 | |
| 1721 | 1722 | LOCK TABLES `zseq_scheduler_tasks` WRITE; |
| 1722 | 1723 | /*!40000 ALTER TABLE `zseq_scheduler_tasks` DISABLE KEYS */; |
| 1723 | -INSERT INTO `zseq_scheduler_tasks` VALUES (5); | |
| 1724 | +INSERT INTO `zseq_scheduler_tasks` VALUES (6); | |
| 1724 | 1725 | /*!40000 ALTER TABLE `zseq_scheduler_tasks` ENABLE KEYS */; |
| 1725 | 1726 | UNLOCK TABLES; |
| 1726 | 1727 | ... | ... |
sql/mysql/upgrade/3.5.2/scheduler_tasks.sql
| ... | ... | @@ -8,4 +8,7 @@ INSERT INTO `scheduler_tasks` VALUES (@id,'Periodic Document Expunge','bin/expun |
| 8 | 8 | select @id:=max(id)+1 from scheduler_tasks; |
| 9 | 9 | INSERT INTO `scheduler_tasks` VALUES (@id,'Database Maintenance','bin/dbmaint.php','optimize',0,'monthly','2007-10-01',NULL,0,'disabled'); |
| 10 | 10 | |
| 11 | +select @id:=max(id)+1 from scheduler_tasks; | |
| 12 | +INSERT INTO `scheduler_tasks` VALUES (@id,'Open Office Test','bin/checkopenoffice.php','',0,'1min','2007-10-01',NULL,0,'enabled'); | |
| 13 | + | |
| 11 | 14 | UPDATE zseq_scheduler_tasks set id=@id; |
| 12 | 15 | \ No newline at end of file | ... | ... |
templates/kt3/standard_page.smarty
| ... | ... | @@ -252,6 +252,8 @@ |
| 252 | 252 | <!-- any status / error messages get added here. --> |
| 253 | 253 | {if (!empty($page->errStack))} |
| 254 | 254 | <div class="ktError"> |
| 255 | + <div class="error_dashlet_rightrepeat_top"></div> | |
| 256 | + <div class="error_dashlet_leftrepeat_top"></div> | |
| 255 | 257 | <div class="error_dashlet_rightrepeat_bottom"></div> |
| 256 | 258 | <div class="error_dashlet_leftrepeat_bottom"></div> |
| 257 | 259 | {foreach item=sError from=$page->errStack} |
| ... | ... | @@ -275,6 +277,8 @@ |
| 275 | 277 | |
| 276 | 278 | {if (!empty($page->infoStack))} |
| 277 | 279 | <div class="ktInfo"> |
| 280 | + <div class="info_dashlet_rightrepeat_top"></div> | |
| 281 | + <div class="info_dashlet_leftrepeat_top"></div> | |
| 278 | 282 | <div class="info_dashlet_rightrepeat_bottom"></div> |
| 279 | 283 | <div class="info_dashlet_leftrepeat_bottom"></div> |
| 280 | 284 | {foreach item=sInfo from=$page->infoStack} | ... | ... |