|
Revision 170, 1.6 kB
(checked in by ben, 3 years ago)
|
Template creation now works, upgrade.php altered to handle files with incorrect paths
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
// Display errors |
|---|
| 6 |
error_reporting(E_ERROR | E_WARNING | E_PARSE); |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
@set_time_limit (1200); |
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
@require("includes.php"); |
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
echo "<h1>" . gettext("Upgrading ...") . "</h1>"; |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
echo "<h2>" . gettext("Adjusting file repository information") . "</h2>"; |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
$files = db_query("select ident, location from files where location like \"".path."%\""); |
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
if ($files != false && sizeof($files) > 0) { |
|---|
| 25 |
foreach ($files as $file) { |
|---|
| 26 |
|
|---|
| 27 |
$ident = $file->ident; |
|---|
| 28 |
$filename = str_replace(path, "", $file->location); |
|---|
| 29 |
|
|---|
| 30 |
db_query("update files set location = '$filename' where ident = $ident"); |
|---|
| 31 |
echo "<p>" . sprintf(gettext("Updating file %d: %s"),$ident,$filename) . "</p>"; |
|---|
| 32 |
|
|---|
| 33 |
} |
|---|
| 34 |
} |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
echo "<h2>" . gettext("Publishing RSS") . "</h2>"; |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$users = db_query("select ident from users"); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
foreach($users as $user) { |
|---|
| 46 |
|
|---|
| 47 |
$ident = $user->ident; |
|---|
| 48 |
|
|---|
| 49 |
echo "<p>" . sprintf(gettext("Publishing RSS for user %d"),$ident) . "</p>"; |
|---|
| 50 |
|
|---|
| 51 |
$rssresult = run("weblogs:rss:publish", array($ident, false)); |
|---|
| 52 |
$rssresult = run("files:rss:publish", array($ident, false)); |
|---|
| 53 |
$rssresult = run("profile:rss:publish", array($ident, false)); |
|---|
| 54 |
|
|---|
| 55 |
} |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
|
|---|
| 59 |
echo "<hr />"; |
|---|
| 60 |
echo "<p>" . gettext("Done. You must now delete upgrade.php from your root Elgg folder.") . "</p>"; |
|---|
| 61 |
|
|---|
| 62 |
?> |
|---|