diff -r d6c7b310295d -r a86a69394a95 plugins/SpecialAdmin.php
--- a/plugins/SpecialAdmin.php Sun Mar 22 00:46:44 2009 -0400
+++ b/plugins/SpecialAdmin.php Sun Mar 22 00:55:06 2009 -0400
@@ -2458,14 +2458,41 @@
}
else
{
+ if ( isset($_GET['update_order']) )
+ {
+ header('Content-type: text/javascript');
+ $order = @$_POST['order'];
+ try
+ {
+ $order = enano_json_decode($order);
+ }
+ catch ( Zend_Json_Exception $e )
+ {
+ return print enano_json_encode(array(
+ 'mode' => 'error',
+ 'error' => 'bad order'
+ ));
+ }
+
+ foreach ( $order as $sidebar_id => $blocks )
+ {
+ foreach ( $blocks as $order => $block_id )
+ {
+ $sbid = intval($sidebar_id);
+ $order = intval($order);
+ $block_id = intval($block_id);
+ $q = $db->sql_query('UPDATE ' . table_prefix . "sidebar SET sidebar_id = $sbid, item_order = $order WHERE item_id = $block_id;");
+ if ( !$q )
+ $db->die_json();
+ }
+ }
+
+ return print enano_json_encode(array(
+ 'mode' => 'success'
+ ));
+ }
- $template->add_header('');
- $template->add_header('');
$template->add_header('');
- $template->add_header('');
-
- $template->load_theme('oxygen', 'bleu');
- $template->init_vars();
$template->header();
@@ -2624,27 +2651,21 @@
-
- get('sbedit_field_plugin'); ?>
-
+ get('sbedit_field_plugin'); ?>