Commit fc0932d3af328d2cf16b0fae139e1401bdc0c68f

Authored by Jarrett Jordaan
2 parents e86fda21 97a7127f

Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge

bin/system_info.php
... ... @@ -49,6 +49,7 @@ require_once('../config/dmsDefaults.php');
49 49  
50 50 global $default;
51 51 $default->log->debug('System information collection script starting...');
  52 +$cache_file = $default->cacheDirectory . '/system_info';
52 53  
53 54 // Get installation guid
54 55 function getGuid()
... ... @@ -166,11 +167,44 @@ function sendForm($data)
166 167 curl_close($ch);
167 168 }
168 169  
  170 +// Check the last time the call home executed
  171 +function checkRunTime($cache_file)
  172 +{
  173 + if(!file_exists($cache_file)){
  174 + return true;
  175 + }
  176 +
  177 + $run_time = trim(file_get_contents($cache_file));
  178 + $now = time();
  179 +
  180 + if($run_time < $now){
  181 + return true;
  182 + }
  183 +
  184 + return false;
  185 +}
  186 +
  187 +// update the time of the last call home execution
  188 +function updateRunTime($cache_file)
  189 +{
  190 + // Generate the time for the next call
  191 + $now = time();
  192 + $period = rand(12, 36);
  193 + $next = $now + (60*60*$period);
  194 +
  195 + file_put_contents($cache_file, $next);
  196 +}
  197 +
  198 +if(!checkRunTime($cache_file)){
  199 + exit(0);
  200 +}
  201 +
169 202 $post_str = getGuid() .'|'. getUserCnt() .'|'. getDocCnt() .'|'. getKTVersion() .'|'. getKTEdition() .'|'. getOSInfo();
170 203 $data['system_info'] = $post_str;
171 204  
172 205 sendForm($data);
  206 +updateRunTime($cache_file);
173 207  
174 208 $default->log->debug('System information collection script finishing.');
175 209 exit(0);
176 210 -?>
  211 +?>
177 212 \ No newline at end of file
... ...
plugins/ktcore/KTWidgets.php
... ... @@ -944,8 +944,17 @@ class KTCoreTextAreaWidget extends KTWidget {
944 944 $global_required_default = true;
945 945 $this->bRequired = (KTUtil::arrayGet($aOptions, 'required', $global_required_default, false) == true);
946 946  
947   - $this->aOptions['cols'] = KTUtil::arrayGet($aOptions, 'cols', 60);
948   - $this->aOptions['rows'] = KTUtil::arrayGet($aOptions, 'rows', 3);
  947 + // Part of the space on the mce editor is taken up by the toolbars, so make the plain text field slightly smaller (if using the default size)
  948 + $default_rows = 20;
  949 + if(isset($this->aOptions['field'])){
  950 + $oField = $this->aOptions['field'];
  951 + if(!$oField->getIsHTML()){
  952 + $default_rows = 15;
  953 + }
  954 + }
  955 +
  956 + $this->aOptions['cols'] = KTUtil::arrayGet($aOptions, 'cols', 80);
  957 + $this->aOptions['rows'] = KTUtil::arrayGet($aOptions, 'rows', $default_rows);
949 958 $this->aOptions['field'] = KTUtil::arrayGet($aOptions, 'field');
950 959 }
951 960  
... ...
plugins/multiselect/js/hidelink.js
1 1 //To hide the link for existing bulk upload link
2   -JQ(document).ready(function(){
3   - var elems = JQ("ul.actionlist").find("a");
  2 +jQuery(document).ready(function(){
  3 + var elems = jQuery("ul.actionlist").find("a");
4 4 for (i = 0; i < elems.length; i++) {
5 5 if(elems[i].href.search("kt_path_info=ktcore.actions.folder.bulkUpload") > -1 || elems[i].href.search("kt_path_info=inetfoldermetadata.actions.folder.bulkUpload") > -1)
6 6 {
7   - JQ(elems[i]).parent("li").hide();
  7 + jQuery(elems[i]).parent("li").hide();
8 8 }
9 9 }
10 10 });
11 11 // added by SL:2009-03-04
12   -JQ(document).ready(function(){
13   - var elems = JQ("ul.actionlist").find("a");
  12 +jQuery(document).ready(function(){
  13 + var elems = jQuery("ul.actionlist").find("a");
14 14 for (i = 0; i < elems.length; i++) {
15 15 if(elems[i].href.search("kt_path_info=ktcore.actions.folder.bulkImport") > -1 || elems[i].href.search("kt_path_info=inetfoldermetadata.actions.folder.bulkUpload") > -1)
16 16 {
17   - JQ(elems[i]).parent("li").hide();
  17 + jQuery(elems[i]).parent("li").hide();
18 18 }
19 19 }
20   -});
21 20 \ No newline at end of file
  21 +});
... ...
sql/mysql/upgrade/3.7.0/call_home_task.sql
1   -INSERT INTO `scheduler_tasks` (task, script_url, frequency, run_time, status)
2   -VALUES ('Call Home','bin/system_info.php','daily','2009-10-01','system');
3 1 \ No newline at end of file
  2 +INSERT INTO `scheduler_tasks` (task, script_url, is_complete, frequency, run_time, status)
  3 +VALUES ('Call Home','bin/system_info.php', 1, 'half_hourly','2009-10-01','system');
4 4 \ No newline at end of file
... ...
templates/ktcore/principals/about.smarty
... ... @@ -10,15 +10,15 @@
10 10 <br>
11 11 {if ($smallVersion == 'Community Edition')}
12 12 {i18n}This program is free software and published under the <a href=" http://www.gnu.org/licenses/">GNU General Public License version 3</a>{/i18n}<br><br>
13   - {i18n}KnowledgeTree Community Edition is supplied with <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no support</a>,
14   - <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no maintenance</a>,
  13 + {i18n}KnowledgeTree Community Edition is supplied with <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no support</a>,
  14 + <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no maintenance</a>,
15 15 and <a href="http://www.knowledgetree.com/commercial_support" target="_blank">no warranty</a>.{/i18n}<br>
16 16 {i18n}Please contact the <a href="mailto:sales@knowledgetree.com">KnowledgeTree Sales team</a> should you wish to learn more about commercially supported editions of KnowledgeTree.{/i18n}<br>
17 17 {else}
18 18 <br>
19 19 {i18n}This is a professionally supported edition of KnowledgeTree.{/i18n} <br>
20 20 {i18n}Please refer to the documentation provided to you at subscription to learn more about how to access KnowledgeTree's professional support team.{/i18n}<br>
21   -
  21 +
22 22 {/if}
23 23 </p>
24 24 <br>
... ... @@ -28,7 +28,7 @@
28 28 <li><a href="http://forums.knowledgetree.com/">Forums</a>: Discuss KnowledgeTree with expert community users and developers</li>
29 29 <li><a href="http://wiki.knowledgetree.com/">Wiki</a>: Search the knowledge base of user and developer topics</li>
30 30 <li><a href="http://issues.knowledgetree.com/">Issues</a>: Log a bug or suggest a new feature</li>
31   - <li><a href="http://people.knowledgetree.com/">Blogs</a>: See what the KnowledgeTree team have to say</li>
  31 + <li><a href="http://www.knowledgetree.com/blog">Blogs</a>: See what the KnowledgeTree team have to say</li>
32 32 </ul>
33 33 </p>
34 34 <p>
... ... @@ -63,12 +63,12 @@
63 63 </li>
64 64 <li>
65 65 Kenny Horan
66   - </li>
  66 + </li>
67 67 <li>
68 68 Artur Kiwa
69 69 </li>
70 70 <li>
71   - Michael Knight
  71 + Michael Knight
72 72 </li>
73 73 <li>
74 74 Jeongkyu Kim
... ... @@ -77,7 +77,7 @@
77 77 Rogerio Kohler
78 78 </li>
79 79 <li>
80   - Piotr Krawiecki
  80 + Piotr Krawiecki
81 81 </li>
82 82 <li>
83 83 Ola Larsson
... ... @@ -86,7 +86,7 @@
86 86 Pavel Lastovicka
87 87 </li>
88 88 <li>
89   - Michel Loiseleur
  89 + Michel Loiseleur
90 90 </li>
91 91 <li>
92 92 Renat Lumpau
... ... @@ -143,13 +143,13 @@
143 143 Phillip Steinbachs
144 144 </li>
145 145 <li>
146   - Tahir Tahang
  146 + Tahir Tahang
147 147 </li>
148 148 <li>
149 149 Paul Trgina
150 150 </li>
151 151 <li>
152   - Harry Tsio
  152 + Harry Tsio
153 153 </li>
154 154 <li>
155 155 Bjarte Kalstveit Vebj&oslash;rnsen
... ... @@ -161,13 +161,19 @@
161 161 Jaime Zarate
162 162 </li>
163 163 <li>
  164 + <a href='http://www.ratp.com'>RATP</a>
  165 + </li>
  166 + <li>
  167 + <a href='http://nxc.no'>NXC</a>
  168 + </li>
  169 + <li>
164 170 And all the KnowledgeTree staff that <a href="http://en.wikipedia.org/wiki/Eat_one's_own_dog_food">"dogfood"</a> KnowledgeTree every day.
165 171 </li>
166   -
  172 +
167 173 </ul>
168 174  
169 175 <p><small>[If you feel you should be here too, please let us know at <a href="mailto:contributions@knowledgetree.com">contributions@knowledgetree.com</a>]</small></p>
170 176  
171 177  
172   -<p>This software utilizes third-party software from <a set="yes" linkindex="11" href="http://pear.php.net/">Pear</a>, <a set="yes" linkindex="12" href="http://phpmailer.sourceforge.net/">PHPMailer</a>, <a set="yes" linkindex="13" href="http://smarty.php.net/">Smarty Template Engine</a>, <a set="yes" linkindex="14" href="http://sourceforge.net/projects/jscalendar">JSCalendar</a>, <a set="yes" linkindex="15" href="http://mochikit.com/">Mochikit</a>, <a set="yes" linkindex="16" href="http://tinymce.moxiecode.com/">Moxiecode Systems</a>, <a set="yes" linkindex="17" href="http://developer.yahoo.com/yui/">Yahoo Developer Network</a>.</p>
173   -
  178 +<p>This software utilizes third-party software from <a set="yes" linkindex="11" href="http://pear.php.net/">Pear</a>, <a set="yes" linkindex="12" href="http://phpmailer.sourceforge.net/">PHPMailer</a>, <a set="yes" linkindex="13" href="http://smarty.php.net/">Smarty Template Engine</a>, <a set="yes" linkindex="17" href="http://lucene.apache.org/tika/">Apache Tika</a>, <a set="yes" linkindex="15" href="http://mochikit.com/">Mochikit</a>, <a set="yes" linkindex="16" href="http://tinymce.moxiecode.com/">Moxiecode Systems</a>, <a set="yes" linkindex="17" href="http://extjs.com">ExtJS</a>, <a set="yes" linkindex="17" href="http://developer.yahoo.com/yui/">Yahoo Developer Network</a>.</p>
  179 +
... ...