]> git.mjollnir.org Git - s9y.git/commitdiff
* Fix a problem where spartacus did not properly assign configured
authorgarvinhicking <garvinhicking>
Fri, 3 Nov 2006 20:04:12 +0000 (20:04 +0000)
committergarvinhicking <garvinhicking>
Fri, 3 Nov 2006 20:04:12 +0000 (20:04 +0000)
      permissions to downloaded directories, thanks to danilo from
      the forums!

docs/NEWS
plugins/serendipity_event_spartacus/serendipity_event_spartacus.php

index 6f3013d7b9a2aceaae52ef79c3ae38076284eb67..0ec6fde8c21a90baf40eb257bc838a7820e726d9 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 1.1 ()
 ------------------------------------------------------------------------
 
+    * Fix a problem where spartacus did not properly assign configured
+      permissions to downloaded directories, thanks to danilo from
+      the forums!
+
     * Move trackback sending logic to the end when saving an entry.
       Should get rid of event plugins not operating when trackbacks
       painfully fail. Thanks to isotopp (garvinhicking)
index d42b278c373c7a22854a9b014a636b488fcaaf43..6d387e83bf0685385697efdc3fb92780cd728f5a 100644 (file)
@@ -34,7 +34,7 @@ class serendipity_event_spartacus extends serendipity_event
         $propbag->add('description',   PLUGIN_EVENT_SPARTACUS_DESC);
         $propbag->add('stackable',     false);
         $propbag->add('author',        'Garvin Hicking');
-        $propbag->add('version',       '2.7');
+        $propbag->add('version',       '2.8');
         $propbag->add('requirements',  array(
             'serendipity' => '0.9',
             'smarty'      => '2.6.7',
@@ -45,7 +45,10 @@ class serendipity_event_spartacus extends serendipity_event
             'backend_plugins_fetchplugin'        => true,
 
             'backend_templates_fetchlist'        => true,
-            'backend_templates_fetchtemplate'    => true
+            'backend_templates_fetchtemplate'    => true,
+            
+            'backend_pluginlisting_header'         => true,
+            'backend_pluginlisting_header_upgrade' => true
         ));
         $propbag->add('groups', array('BACKEND_FEATURES'));
         $propbag->add('configuration', array('mirror_xml', 'mirror_files', 'chown', 'chmod_files', 'chmod_dir'));
@@ -259,6 +262,7 @@ class serendipity_event_spartacus extends serendipity_event
             require_once S9Y_PEAR_PATH . 'HTTP/Request.php';
             $options = array();
             serendipity_plugin_api::hook_event('backend_http_request', $options, 'spartacus');
+            serendipity_request_start();
             $req = &new HTTP_Request($url, $options);
 
             if (PEAR::isError($req->sendRequest()) || $req->getResponseCode() != '200') {
@@ -303,6 +307,7 @@ class serendipity_event_spartacus extends serendipity_event
                 echo '<br />';
                 $this->purgeCache = true;
             }
+            serendipity_request_end();
         }
 
         return $data;
@@ -721,6 +726,7 @@ class serendipity_event_spartacus extends serendipity_event
             $url    = $mirror . '/' . $sfloc . '/' . $file . '?rev=1.9999';
             $target = $pdir . $file;
             @mkdir($pdir . $plugin_to_install);
+            $this->fileperm($pdir . $plugin_to_install, true);
             $this->fetchfile($url, $target);
             if (!isset($baseDir)) {
                 $baseDirs = explode('/', $file);
@@ -740,6 +746,21 @@ class serendipity_event_spartacus extends serendipity_event
 
         if (isset($hooks[$event])) {
             switch($event) {
+                case 'backend_pluginlisting_header':
+                    echo '<br /><div id="upgrade_notice" class="serendipityAdminMsgSuccess">';
+                    echo '<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew&amp;serendipity[only_group]=UPGRADE" class="serendipityIconLink upgrade_sidebar"><img src="' . serendipity_getTemplateFile('admin/img/upgrade_now.png') . '" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" />' . PLUGIN_EVENT_SPARTACUS_CHECK_SIDEBAR . '</a> &nbsp; ';
+                    echo '<a href="?serendipity[adminModule]=plugins&amp;serendipity[adminAction]=addnew&amp;serendipity[only_group]=UPGRADE&amp;serendipity[type]=event" class="serendipityIconLink upgrade_event"><img src="' . serendipity_getTemplateFile('admin/img/upgrade_now.png') . '" style="border: 0px none ; vertical-align: middle; display: inline;" alt="" />' . PLUGIN_EVENT_SPARTACUS_CHECK_EVENT . '</a> ';
+                    echo '</div>';
+
+                    return true;
+                    break;
+
+                case 'backend_pluginlisting_header_upgrade':
+                    echo '<em>' . PLUGIN_EVENT_SPARTACUS_CHECK_HINT . '</em><br />';
+
+                    return true;
+                    break;
+
                 case 'backend_templates_fetchlist':
                     $eventData = $this->buildTemplateList($this->fetchOnline('template', true), 'template');