]> git.mjollnir.org Git - s9y.git/commitdiff
empty authorname, detected by omid mottaghi
authorgarvinhicking <garvinhicking>
Mon, 21 Nov 2005 09:56:37 +0000 (09:56 +0000)
committergarvinhicking <garvinhicking>
Mon, 21 Nov 2005 09:56:37 +0000 (09:56 +0000)
include/admin/plugins.inc.php

index 20f116f548c98dd9322425da05b62ca57149a988..d12a729af949879d5263b900d50ad8a296be3360 100644 (file)
@@ -193,7 +193,7 @@ function ownership($authorid, $name, $is_plugin_owner = false) {
 </select>
 <?php
     } else {
-        echo (empty($username) ? ALL_AUTHORS : $username);
+        echo (empty($realname) ? ALL_AUTHORS : $realname);
     }
 }
 
@@ -280,9 +280,9 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
             $cbag = new serendipity_property_bag;
             if ($plugin->introspect_config_item($config_item, $cbag)) {
                 $value    = $_POST['serendipity']['plugin'][$config_item];
-                
+
                 $validate = $plugin->validate($config_item, $cbag, $value);
-                 
+
                 if ($validate === true) {
 //                    echo $config_item . " validated: $validate<br />\n";
                     $plugin->set_config($config_item, $value);
@@ -298,7 +298,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
 
 <?php if ( isset($save_errors) && is_array($save_errors) && count($save_errors) > 0 ) { ?>
     <div class="serendipityAdminMsgError">
-    <?php 
+    <?php
     echo ERROR . ":<br />\n";
     echo "<ul>\n";
     foreach($save_errors AS $save_error) {
@@ -536,7 +536,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
     if (isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
         $ev = array('nuggets' => $htmlnugget, 'skip_nuggets' => false);
         serendipity_plugin_api::hook_event('backend_wysiwyg_nuggets', $ev);
-        
+
         if ($ev['skip_nuggets'] === false) {
 ?>
     <script type="text/javascript">
@@ -596,7 +596,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
         } else {
             $props = false;
         }
-        
+
         if (is_array($props)) {
             if (version_compare($props['version'], $props['upgrade_version'], '<')) {
                 $props['upgradable']      = true;
@@ -612,7 +612,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
             $errorstack[] = $class_data['true_name'];
         }
     }
-    
+
     usort($pluginstack, 'serendipity_pluginListSort');
     $pluggroups     = array();
     $pluggroups[''] = array();
@@ -645,7 +645,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
                 <input type="hidden" name="serendipity[adminAction]" value="addnew" />
                 <input type="hidden" name="serendipity[type]" value="<?php echo htmlspecialchars($serendipity['GET']['type']); ?>" />
                 <?php echo FILTERS; ?>: <select name="serendipity[only_group]">
-            <?php foreach((array)$available_groups AS $available_group) { 
+            <?php foreach((array)$available_groups AS $available_group) {
                     ?>
                     <option value="<?php echo $available_group; ?>" <?php echo ($serendipity['GET']['only_group'] == $available_group ? 'selected="selected"' : ''); ?>><?php echo serendipity_groupname($available_group); ?>
             <?php } ?>
@@ -676,46 +676,46 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
         foreach ($groupstack as $plug) {
             $jsLine = " onmouseout=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='';\"";
             $jsLine .= " onmouseover=\"document.getElementById('serendipity_plugin_". $plug['class_name'] ."').className='serendipity_admin_list_item_uneven';\"";
-    
+
             $pluginInfo = $notice = array();
             if (!empty($plug['author'])) {
                 $pluginInfo[] = AUTHOR  . ': ' . $plug['author'];
             }
-    
+
             if (!empty($plug['version'])) {
                 $pluginInfo[] = VERSION  . ': ' . $plug['version'];
             }
-    
+
             if (!empty($plug['upgrade_version']) && $plug['upgrade_version'] != $plug['version']) {
                 $pluginInfo[] = sprintf(UPGRADE_TO_VERSION, $plug['upgrade_version']);
             }
-            
+
             if (!empty($plug['pluginlocation']) && $plug['pluginlocation'] != 'local') {
                 $pluginInfo[] = '(' . htmlspecialchars($plug['pluginlocation']) . ')';
                 $installimage = serendipity_getTemplateFile('admin/img/install_now_' . strtolower($plug['pluginlocation']) . '.png');
             } else {
                 $installimage = serendipity_getTemplateFile('admin/img/install_now.png');
             }
-    
+
             if (!isset($plug['customURI'])) {
                 $plug['customURI'] = '';
             }
-    
+
             if ( !empty($plug['requirements']['serendipity']) && version_compare($plug['requirements']['serendipity'], serendipity_getCoreVersion($serendipity['version']), '>') ) {
                 $notice['requirements_failures'][] = 's9y ' . $plug['requirements']['serendipity'];
             }
-    
+
             if ( !empty($plug['requirements']['php']) && version_compare($plug['requirements']['php'], phpversion(), '>') ) {
                 $notice['requirements_failures'][] = 'PHP ' . $plug['requirements']['php'];
             }
-    
+
             /* Enable after Smarty 2.6.7 upgrade.
              * TODO: How can we get current Smarty version here? $smarty is not created!
             if ( !empty($plug['requirements']['smarty']) && version_compare($plug['requirements']['smarty'], '2.6.7', '>') ) {
                 $notice['requirements_failures'][] = 'Smarty: ' . $plug['requirements']['smarty'];
             }
             */
-    
+
             if (count($notice['requirements_failures']) > 0) {
                 $plug['requirements_fail'] = true;
             }
@@ -809,10 +809,10 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
     }
 
     if (isset($_POST['REMOVE']) && serendipity_checkFormToken()) {
-        if (is_array($_POST['serendipity']['plugin_to_remove'])) { 
+        if (is_array($_POST['serendipity']['plugin_to_remove'])) {
             foreach ($_POST['serendipity']['plugin_to_remove'] as $key) {
                 $plugin =& serendipity_plugin_api::load_plugin($key);
-    
+
                 if ($plugin->serendipity_owner == '0' || $plugin->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers')) {
                     serendipity_plugin_api::remove_plugin_instance($key);
                 }