r1488 + implement and use dynamic_title_rspool()
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 11 Jan 2008 15:09:10 +0000 (15:09 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 11 Jan 2008 15:09:10 +0000 (15:09 +0000)
inc/navigation.php
inc/pagetitles.php

index 7a5e69ce0f03b7bf42681b1609bbef026be8ac2e..4f101e26d1fd0fa65aa6b4f24f7032efa6bc19a0 100644 (file)
@@ -160,7 +160,7 @@ $tab['vservice']['configs'] = '[VS Configuration]';
 $tab['vservice']['rspools'] = '[RS pools]';
 $tabhandler['vservice']['default'] = 'renderVirtualService';
 
-$page['rspool']['title'] = 'RS pool';
+$page['rspool']['title_handler'] = 'dynamic_title_rspool';
 $page['rspool']['parent'] = 'ipv4space';
 $page['rspool']['bypass'] = 'id';
 $page['rspool']['bypass_type'] = 'uint';
index f0b9870a9034b5154cd83ab533d98080d2becfa7..411a68db16c166378e9b592554a9cbdec8798994 100644 (file)
@@ -108,6 +108,24 @@ function dynamic_title_vservice ()
        return $ret;
 }
 
+function dynamic_title_rspool ()
+{
+       global $pageno;
+       $ret = array();
+       switch ($pageno)
+       {
+               case 'rspool':
+                       assertUIntArg ('id');
+                       $poolInfo = getRSPoolInfo ($_REQUEST['id']);
+                       $ret['name'] = 'RS pool' . (empty ($poolInfo['name']) ? '' : ' "' . $poolInfo['name'] . '"');
+                       $ret['params']['id'] = $_REQUEST['id'];
+                       break;
+               default:
+                       return NULL;
+       }
+       return $ret;
+}
+
 function dynamic_title_search ()
 {
        if (isset ($_REQUEST['q']))