gruffen commited on 2011-03-23 16:59:19
Showing 3 changed files, with 31 additions and 24 deletions.
... | ... |
@@ -441,6 +441,27 @@ $rows[] = array( |
441 | 441 |
), |
442 | 442 |
'keys' => array('task'), |
443 | 443 |
); |
444 |
+// Another row we might want to add is package server. Except we may have to remove a pre-existing plugins one, because the version may be wrong. |
|
445 |
+$query = $smcFunc['db_query']('', ' |
|
446 |
+ DELETE FROM {db_prefix}package_servers |
|
447 |
+ WHERE url LIKE {string:plugins}', |
|
448 |
+ array( |
|
449 |
+ 'plugins' => 'http://www.simpledesk.net/downloads/plugins/%', |
|
450 |
+ ) |
|
451 |
+); |
|
452 |
+$rows[] = array( |
|
453 |
+ 'method' => 'insert', |
|
454 |
+ 'table_name' => '{db_prefix}package_servers', |
|
455 |
+ 'columns' => array( |
|
456 |
+ 'name' => 'string', |
|
457 |
+ 'url' => 'string', |
|
458 |
+ ), |
|
459 |
+ 'data' => array( |
|
460 |
+ 'SimpleDesk Plugins', // !!! Does this need to be multi-lingual? |
|
461 |
+ 'http://www.simpledesk.net/downloads/plugins/1.1/', // !!! This should be updated in later releases! |
|
462 |
+ ), |
|
463 |
+ 'keys' => array('id_server'), |
|
464 |
+); |
|
444 | 465 |
|
445 | 466 |
// Now we can add a new column to an existing table |
446 | 467 |
$columns = array(); |
... | ... |
@@ -1,48 +1,25 @@ |
1 |
-Copyright (c) 2010, SimpleDesk Team |
|
2 |
- |
|
1 |
+Copyright (c) 2010-11, SimpleDesk Team |
|
3 | 2 |
All rights reserved. |
4 | 3 |
|
5 |
- |
|
6 |
- |
|
7 | 4 |
Redistribution and use in source and binary forms, with or without |
8 |
- |
|
9 | 5 |
modification, are permitted provided that the following conditions are met: |
10 | 6 |
|
11 |
- |
|
12 | 7 |
* Redistributions of source code must retain the above copyright |
13 |
- |
|
14 | 8 |
notice, this list of conditions and the following disclaimer. |
15 |
- |
|
16 | 9 |
* Redistributions in binary form must reproduce the above copyright |
17 |
- |
|
18 | 10 |
notice, this list of conditions and the following disclaimer in the |
19 |
- |
|
20 | 11 |
documentation and/or other materials provided with the distribution. |
21 |
- |
|
22 | 12 |
* Neither the name of SimpleDesk nor the |
23 |
- |
|
24 | 13 |
names of its contributors may be used to endorse or promote products |
25 |
- |
|
26 | 14 |
derived from this software without specific prior written permission. |
27 | 15 |
|
28 |
- |
|
29 |
- |
|
30 | 16 |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
31 |
- |
|
32 | 17 |
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
33 |
- |
|
34 | 18 |
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
35 |
- |
|
36 | 19 |
DISCLAIMED. IN NO EVENT SHALL SIMPLEDESK TEAM BE LIABLE FOR ANY |
37 |
- |
|
38 | 20 |
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
39 |
- |
|
40 | 21 |
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
41 |
- |
|
42 | 22 |
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
43 |
- |
|
44 | 23 |
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
45 |
- |
|
46 | 24 |
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
47 |
- |
|
48 | 25 |
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
49 | 26 |
\ No newline at end of file |
... | ... |
@@ -148,6 +148,15 @@ $smcFunc['db_query']('', ' |
148 | 148 |
) |
149 | 149 |
); |
150 | 150 |
|
151 |
+// Also remove the plugins package server. |
|
152 |
+$query = $smcFunc['db_query']('', ' |
|
153 |
+ DELETE FROM {db_prefix}package_servers |
|
154 |
+ WHERE url LIKE {string:plugins}', |
|
155 |
+ array( |
|
156 |
+ 'plugins' => 'http://www.simpledesk.net/downloads/plugins/%', |
|
157 |
+ ) |
|
158 |
+); |
|
159 |
+ |
|
151 | 160 |
// And tell SMF we've updated $modSettings |
152 | 161 |
updateSettings(array( |
153 | 162 |
'settings_updated' => time(), |
154 | 163 |