phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: developer_tools/inc class.solangfile.inc.php,1.


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: developer_tools/inc class.solangfile.inc.php,1.9.2.4.2.9,1.9.2.4.2.10
Date: Sat, 24 May 2003 12:33:59 -0400

Update of /cvsroot/phpgroupware/developer_tools/inc
In directory subversions:/tmp/cvs-serv30170

Modified Files:
      Tag: Version-0_9_16-branch
        class.solangfile.inc.php 
Log Message:
[find new phrases] now findes the phrases in the following (hook)files (which 
are not wrapped in lang-calls)
- hook_{admin|preferences|sidebox_menu}
- hook_acl_manager


Index: class.solangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.solangfile.inc.php,v
retrieving revision 1.9.2.4.2.9
retrieving revision 1.9.2.4.2.10
diff -C2 -r1.9.2.4.2.9 -r1.9.2.4.2.10
*** class.solangfile.inc.php    17 May 2003 17:12:02 -0000      1.9.2.4.2.9
--- class.solangfile.inc.php    24 May 2003 16:33:57 -0000      1.9.2.4.2.10
***************
*** 33,36 ****
--- 33,42 ----
                        'create_password_box' => array(1,3)
                );
+               var $files = array(
+                       'hook_admin.inc.php' => 'file',
+                       'hook_preferences.inc.php' => 'file',
+                       'hook_sidebox_menu.inc.php' => 'file',
+                       'hook_acl_manager.inc.php' => 'acl_manager'
+               );
  
                var $public_functions = array(
***************
*** 43,51 ****
                }
  
!               function parse_php_app($fd,$plist)
                {
                        $reg_expr = 
'('.implode('|',array_keys($this->functions)).")[ \t]*\([ \t]*(.*)$";
                        define('SEP',filesystem_separator());
-                       list($app) = explode(SEP,$fd);
                        $d=dir($fd);
                        while ($fn=$d->read())
--- 49,123 ----
                }
  
!               function fetch_keys($app,$arr)
!               {
!                       if (!is_array($arr))
!                       {
!                               return;
!                       }
!                       foreach($arr as $key => $val)
!                       {
!                               $this->plist[$key] = $app;
!                       }
!               }
! 
!               function special_file($app,$fname,$langs_in)
!               {
!                       //echo 
"<p>solangfile::special_file(app='$app',fname='$fname',langs_in='$langs_in')</p>\n";
!                       if (!function_exists('display_sidebox'))
!                       {
!                               function 
display_sidebox($appname,$menu_title,$file)    // hook_sidebox_menu
!                               {
!                                       $GLOBALS['file'] += $file;
!                               }
!                               function 
display_section($appname,$file,$file2='')              // hook_preferences, 
hook_admin
!                               {
!                                       if (is_array($file2))
!                                       {
!                                               $file = $file2;
!                                       }
!                                       $GLOBALS['file'] += $file;
!                               }
!                       }
!                       $GLOBALS['file'] = array();
!                       unset($GLOBALS['acl_manager']);
!                       include($fname);
!                       
!                       if (isset($GLOBALS['acl_manager']))     // 
hook_acl_manager
!                       {
!                               foreach($GLOBALS['acl_manager'] as $app => 
$data)
!                               {
!                                       foreach ($data as $item => $arr)
!                                       {
!                                               foreach ($arr as $key => $val)
!                                               {
!                                                       switch ($key)
!                                                       {
!                                                               case 'name':
!                                                                       
$this->plist[$val] = $app;
!                                                                       break;
!                                                               case 'rights':
!                                                                       
foreach($val as $lang => $right)
!                                                                       {
!                                                                               
$this->plist[$lang] = $app;
!                                                                       }
!                                                                       break;
!                                                       }
!                                               }
!                                       }
!                               }
!                       }
!                       if (count($GLOBALS['file']))    // 
hook_{admin|preferences|sidebox_menu}
!                       {
!                               foreach ($GLOBALS['file'] as $lang => $link)
!                               {
!                                       $this->plist[$lang] = $app;
!                               }
!                       }
!               }
! 
!               function parse_php_app($app,$fd)
                {
                        $reg_expr = 
'('.implode('|',array_keys($this->functions)).")[ \t]*\([ \t]*(.*)$";
                        define('SEP',filesystem_separator());
                        $d=dir($fd);
                        while ($fn=$d->read())
***************
*** 55,64 ****
                                        if 
(($fn!='.')&&($fn!='..')&&($fn!='CVS'))
                                        {
!                                               
$plist=$this->parse_php_app($fd.$fn.SEP,$plist);
                                        }
                                }
                                elseif ((strpos($fn,'.php')>1) && 
(is_readable($fd.$fn)))
                                {
!                                       $lines = file($fd.SEP.$fn);
  
                                        foreach($lines as $n => $line)
--- 127,140 ----
                                        if 
(($fn!='.')&&($fn!='..')&&($fn!='CVS'))
                                        {
!                                               
$this->parse_php_app($app,$fd.$fn.SEP);
                                        }
                                }
                                elseif ((strpos($fn,'.php')>1) && 
(is_readable($fd.$fn)))
                                {
!                                       if (isset($this->files[$fn]))
!                                       {
!                                               
$this->special_file($app,$fd.$fn,$this->files[$fn]);
!                                       }
!                                       $lines = file($fd.$fn);
  
                                        foreach($lines as $n => $line)
***************
*** 93,98 ****
                                                                        if 
($args[0] == $i)
                                                                        {
!                                                                               
//if (!isset($plist[$phrase])) echo ">>>$phrase<<<<br>\n";
!                                                                               
$plist[$phrase] = $app;
                                                                                
array_shift($args);
                                                                                
if (!count($args))
--- 169,174 ----
                                                                        if 
($args[0] == $i)
                                                                        {
!                                                                               
//if (!isset($this->plist[$phrase])) echo ">>>$phrase<<<<br>\n";
!                                                                               
$this->plist[$phrase] = $app;
                                                                                
array_shift($args);
                                                                                
if (!count($args))
***************
*** 115,119 ****
                        }
                        $d->close();
-                       return ($plist);
                }
  
--- 191,194 ----
***************
*** 123,130 ****
                        define('SEP',filesystem_separator());
                        $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP;
!                       $plist=array();
!                       $plist = $this->parse_php_app($fd,$plist);
!                       reset($plist);
!                       return($plist);
                }
  
--- 198,205 ----
                        define('SEP',filesystem_separator());
                        $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP;
!                       $this->plist = array();
!                       $this->parse_php_app($app,$fd);
!                       reset($this->plist);
!                       return($this->plist);
                }
  





reply via email to

[Prev in Thread] Current Thread [Next in Thread]