phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: etemplate/doc/et_media/inc class.et_media.inc.ph


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate/doc/et_media/inc class.et_media.inc.php, 1.4, 1.5
Date: Fri, 08 Aug 2003 12:29:36 -0400

Update of /cvsroot/phpgroupware/etemplate/doc/et_media/inc
In directory subversions:/tmp/cvs-serv30142

Modified Files:
        class.et_media.inc.php 
Log Message:
1) partialy undoing gugux changes (label use '%s' if they want to place the 
widget within the label!)
2) useing a regular lang()-call with parameters instead of a message array, 
which got translated by the constructor


Index: class.et_media.inc.php
===================================================================
RCS file: 
/cvsroot/phpgroupware/etemplate/doc/et_media/inc/class.et_media.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.et_media.inc.php      26 May 2003 21:03:14 -0000      1.4
--- class.et_media.inc.php      8 Aug 2003 16:29:34 -0000       1.5
***************
*** 18,27 ****
        class et_media extends so_sql
        {
-               var $messages = array(
-                       'nothing_found' => 'Nothing matched search criteria 
!!!',
-                       'anz_found' => '%1 matches on search criteria',
-                       'saved' => 'Entry saved',
-                       'error_writeing' => 'Error: writeing !!!'
-               );
                var $types = array(
                        '' => 'Select one ...',
--- 18,21 ----
***************
*** 32,36 ****
                );
  
!               function et_media($lang_on_messages = True)
                {
                        $this->tmpl = 
CreateObject('etemplate.etemplate','et_media.edit');
--- 26,30 ----
                );
  
!               function et_media()
                {
                        $this->tmpl = 
CreateObject('etemplate.etemplate','et_media.edit');
***************
*** 43,53 ****
                                'writeLangFile' => True
                        );
- 
-                       if ($lang_on_messages)
-                       {
-                               reset($this->messages);
-                               while (list($key,$msg) = each($this->messages))
-                                       $this->messages[$key] = lang($msg);
-                       }
                }
  
--- 37,40 ----
***************
*** 66,70 ****
                                if (isset($content['save']))
                                {
!                                       $msg .= $this->messages[!$this->save() 
? 'saved' : 'error_writeing'];
                                }
                                elseif (isset($content['read']))
--- 53,57 ----
                                if (isset($content['save']))
                                {
!                                       $msg .= !$this->save() ? lang('Entry 
saved') : lang('Error: writeing !!!');
                                }
                                elseif (isset($content['read']))
***************
*** 75,79 ****
                                        if (!$found)
                                        {
!                                               $msg .= 
$this->messages['nothing_found'];
                                        }
                                        elseif (count($found) == 1)
--- 62,66 ----
                                        if (!$found)
                                        {
!                                               $msg .= lang('Nothing matched 
search criteria !!!');
                                        }
                                        elseif (count($found) == 1)
***************
*** 135,139 ****
                        }
                        $content = array(
!                               'msg' => 
sprintf($this->messages['anz_found'],count($found)),
                                'entry' => $entry
                        );
--- 122,126 ----
                        }
                        $content = array(
!                               'msg' => lang('%1 matches on search 
criteria',count($found)),
                                'entry' => $entry
                        );
***************
*** 145,149 ****
                /*!
                @function writeLangFile
!               @abstract writes langfile with all templates and messages 
registered here
                @discussion can be called via [write Langfile] in the eTemplate 
editor or
                @discussion 
http://domain/phpgroupware/index.php?et_media.et_media.writeLangFile
--- 132,136 ----
                /*!
                @function writeLangFile
!               @abstract writes langfile with all templates and types here
                @discussion can be called via [write Langfile] in the eTemplate 
editor or
                @discussion 
http://domain/phpgroupware/index.php?et_media.et_media.writeLangFile
***************
*** 151,157 ****
                function writeLangFile()
                {
!                       $etm = new et_media(False);     // no lang on messages
! 
!                       return 
$this->tmpl->writeLangFile('et_media','en',$etm->messages+$etm->types);
                }
        };
--- 138,142 ----
                function writeLangFile()
                {
!                       return 
$this->tmpl->writeLangFile('et_media','en',$this->types);
                }
        };





reply via email to

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