Changeset 170
- Timestamp:
- 01/22/06 19:39:43 (3 years ago)
- Files:
-
- devel/units/templates/template_actions.php (modified) (1 diff)
- devel/upgrade.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/units/templates/template_actions.php
r165 r170 89 89 if (sizeof($elements) > 0) { 90 90 foreach($elements as $element) { 91 db_query("insert into template_elements set name = '". $element->name."', content = '".$element->content."', template_id = '".$new_template_id."'");91 db_query("insert into template_elements set name = '".addslashes($element->name)."', content = '".addslashes($element->content)."', template_id = '".$new_template_id."'"); 92 92 } 93 93 } devel/upgrade.php
r168 r170 14 14 // Display message 15 15 echo "<h1>" . gettext("Upgrading ...") . "</h1>"; 16 17 // Alter file repository to remove path information 18 echo "<h2>" . gettext("Adjusting file repository information") . "</h2>"; 19 20 // Get all files with path in the location 21 $files = db_query("select ident, location from files where location like \"".path."%\""); 22 23 // If we have any... 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 // Publish RSS 37 echo "<h2>" . gettext("Publishing RSS") . "</h2>"; 16 38 17 39 // Get all users
