public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
Fixed editing photo/audio feathers, and allow #controls as another ID for 
admin_bar. [#148 state:resolved]
vito (author)
Tue Jul 08 15:59:50 -0700 2008
commit  529af47db8e261419a3bff2e79b68570bb77edc7
tree    4456cee25c1db35033e7f3ac359dc579b400265e
parent  846b2de34bfc7dad8497347a39ed2935fee43359
...
36
37
38
 
 
39
40
41
...
45
46
47
48
49
50
51
...
36
37
38
39
40
41
42
43
...
47
48
49
 
50
51
52
0
@@ -36,6 +36,8 @@
0
                        Post::check_url($_POST['slug']));
0
     }
0
     public function update() {
0
+      $post = new Post($_POST['id']);
0
+
0
       if (isset($_FILES['audio']) and $_FILES['audio']['error'] == 0) {
0
         $this->delete_file($post);
0
         $filename = upload($_FILES['audio'], "mp3");
0
@@ -45,7 +47,6 @@
0
       } else
0
         $filename = $post->filename;
0
 
0
-      $post = new Post($_POST['id']);
0
       $post->update(array("filename" => $filename,
0
                           "description" => $_POST['description']));
0
     }
...
36
37
38
 
 
39
40
41
...
45
46
47
48
49
50
51
...
36
37
38
39
40
41
42
43
...
47
48
49
 
50
51
52
0
@@ -36,6 +36,8 @@
0
                        Post::check_url($_POST['slug']));
0
     }
0
     public function update() {
0
+      $post = new Post($_POST['id']);
0
+
0
       if (isset($_FILES['photo']) and $_FILES['photo']['error'] == 0) {
0
         $this->delete_file($post);
0
         $filename = upload($_FILES['photo'], array("jpg", "jpeg", "png", "gif", "tiff", "bmp"));
0
@@ -45,7 +47,6 @@
0
       } else
0
         $filename = $post->filename;
0
 
0
-      $post = new Post($_POST['id']);
0
       $post->update(array("filename" => $filename,
0
                           "caption" => $_POST['caption']));
0
     }
...
18
19
20
21
22
 
 
23
24
25
 
26
27
28
...
18
19
20
 
 
21
22
23
24
 
25
26
27
28
0
@@ -18,11 +18,11 @@ $(function(){
0
   })
0
 
0
   $(".toggle_admin").click(function(){
0
-    if (!$("#admin_bar:visible").size()) {
0
-      $("#admin_bar").slideDown()
0
+    if (!$("#admin_bar:visible, #controls:visible").size()) {
0
+      $("#admin_bar, #controls").slideDown()
0
       Cookie.destroy("chyrp_hide_admin")
0
     } else {
0
-      $("#admin_bar").slideUp()
0
+      $("#admin_bar, #controls").slideUp()
0
       Cookie.set("chyrp_hide_admin", "true", 30)
0
     }
0
     return false

Comments