Code

Fixed local printer assignement. It had double mac address requestors.
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Jul 2006 06:14:11 +0000 (06:14 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Jul 2006 06:14:11 +0000 (06:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4345 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc
plugins/admin/systems/printer.tpl

index 3c2e84c7178611e5962910596dbf2e4e26e71fef..301a9d21bdb0e24560d7a66b3e3355064583ffa5 100644 (file)
@@ -508,7 +508,11 @@ class printgeneric extends plugin
     $smarty->assign("AdminMember"    ,$this->AdminMember);
     $smarty->assign("AdminMembers"   ,$adminlist);
     $smarty->assign("AdminMemberKeys",array_flip($adminlist));
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    if($this->BelongsTo == "Printer"){
+      $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    } else {
+      $smarty->assign("netconfig", "");
+    }
 
     return($display.$smarty->fetch (get_template_path('printer.tpl', TRUE)));
   }
@@ -577,7 +581,9 @@ class printgeneric extends plugin
   {
     /* Call common method to give check the hook */
     $message= plugin::check();
-    $message= array_merge($message, $this->netConfigDNS->check());
+    if ($this->BelongsTo == 'printer'){
+      $message= array_merge($message, $this->netConfigDNS->check());
+    }
 
     /* Don't display check messages if this is a template object */
     if(isset($this->parent->by_object['workgeneric'])){
index 876ae22baf1153f4c942217f9f641d47c43cc73a..49ed25737938119ecad36e3769801ca2e2ace6b6 100644 (file)
        </tr>
 </table>
 
-
+{if $netconfig ne ''}
 <p class="plugbottom" style="margin-bottom:0px; padding:0px;">&nbsp;</p>
 {$netconfig}
+{/if}
 
 <!-- Place cursor -->
 <script language="JavaScript" type="text/javascript">