diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-10-26 15:17:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-10-26 15:17:26 +0000 |
commit | 8d103a08984ac2de72d756eb5c5c8d23061ab028 (patch) | |
tree | e8cb8b9b2f071a9b7bd2e222d8183e5c27ad6683 /includes/common.inc | |
parent | 2ec14f35ac7d5600e6d03b5cf79f717f43d1cfab (diff) | |
download | brdo-8d103a08984ac2de72d756eb5c5c8d23061ab028.tar.gz brdo-8d103a08984ac2de72d756eb5c5c8d23061ab028.tar.bz2 |
- Committed Marco's block rewrite:
+ Blocks are not longer called if not rendered: major performance
improvement.
+ Fixed some bugs (preview option was broken, path option was broken).
+ Removed "ascii"-type blocks.
+ Added permission to for "PHP blocks"
+ ...
NOTES:
+ You'll want to run "update.php":
ALTER TABLE blocks DROP remove;
ALTER TABLE blocks DROP name;
+ You'll want to update your custom modules as well as the modules in
the contrib repository. Block function should now read:
function *_block($op = "list", $delta = 0) {
if ($op == "list") {
return array of block infos
}
else {
return subject and content of $delta block
}
}
Diffstat (limited to 'includes/common.inc')
-rw-r--r-- | includes/common.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc index 3e3460597..dc1e5027a 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -619,6 +619,14 @@ function form_submit($value) { return "<input type=\"submit\" name=\"op\" value=\"". check_form($value) ."\" />\n"; } +function form_weight($title = NULL, $name = "weight", $value = 0, $delta = 10, $description = 0, $extra = 0) { + for ($n = (-1*$delta); $n <= $delta; $n++) { + $weights[$n] = $n; + } + + return form_select($title, $name, $value, $weights, $description, $extra); +} + /** * Build an URL; use this functions when you must write an URL * for example in a form or a redirect. |