Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

CVS: etemplate/inc class.solangfile.inc.php,NONE,1.1 class.editor.inc.php,1: msg#00614

web.phpgroupware.cvs

Subject: CVS: etemplate/inc class.solangfile.inc.php,NONE,1.1 class.editor.inc.php,1.31,1.32 class.soetemplate.inc.php,1.22,1.23

Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv14103

Modified Files:
class.editor.inc.php class.soetemplate.inc.php
Added Files:
class.solangfile.inc.php
Log Message:
1) only the newest version of a tpl is used for creating the lang-file
2) added the possebility to select multiple tpls from the search-list to delete
them
3) added the developer_tools solangfile class to etemplate to be able to write
lang-files, even if the developer-tools are not installed

***** Error reading new file: [Errno 2] No such file or directory:
'class.solangfile.inc.php'
Index: class.editor.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.editor.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** class.editor.inc.php 20 Oct 2002 15:02:20 -0000 1.31
--- class.editor.inc.php 28 Oct 2002 01:17:31 -0000 1.32
***************
*** 31,35 ****
'exported' => "eTemplate '%s' written to '%s'",
'newer_version' => "newer version '%s' exists !!!",
! 'need_name' => 'Application name needed to write a
langfile or dump the eTemplates !!!'
);
var $aligns = array(
--- 31,36 ----
'exported' => "eTemplate '%s' written to '%s'",
'newer_version' => "newer version '%s' exists !!!",
! 'need_name' => 'Application name needed to write a
langfile or dump the eTemplates !!!',
! 'x_deleted' => '%d eTemplates deleted'
);
var $aligns = array(
***************
*** 674,679 ****
{
list($delete) = each($cont['delete']);
! $read = $result[$delete-1];
!
$this->etemplate->read($read['et_name'],$read['et_template'],$read['et_lang'],$read['group'],$read['et_version']);
unset($cont['delete']);
unset($cont['result']);
--- 675,679 ----
{
list($delete) = each($cont['delete']);
! $this->etemplate->read($result[$delete-1]);
unset($cont['delete']);
unset($cont['result']);
***************
*** 681,689 ****
return;
}
if (isset($cont['read']))
{
list($read) = each($cont['read']);
! $read = $result[$read-1];
!
$this->etemplate->read($read['et_name'],$read['et_template'],$read['et_lang'],$read['group'],$read['et_version']);
$this->edit();
return;
--- 681,707 ----
return;
}
+ if (isset($cont['delete_selected']))
+ {
+ while (list($row,$sel) =
each($cont['selected']))
+ {
+ if ($sel)
+ {
+
$this->etemplate->read($result[$row-1]);
+ $this->etemplate->delete();
+ ++$n;
+ }
+ }
+ if ($n)
+ {
+ $msg =
sprintf($this->messages['x_deleted'],$n);
+ }
+ unset($cont['selected']);
+ unset($cont['delete_selected']);
+ $result = $this->etemplate->search($cont);
+ }
if (isset($cont['read']))
{
list($read) = each($cont['read']);
! $this->etemplate->read($result[$read-1]);
$this->edit();
return;

Index: class.soetemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.soetemplate.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** class.soetemplate.inc.php 14 Oct 2002 00:36:36 -0000 1.22
--- class.soetemplate.inc.php 28 Oct 2002 01:17:31 -0000 1.23
***************
*** 362,373 ****
$sql .= " ORDER BY et_name DESC,et_lang
DESC,et_template DESC,et_version DESC";

! $this->db->query($sql,__LINE__,__FILE__);

$result = array();
! while ($this->db->next_record())
{
! if ($this->db->f('et_lang') != '##') //
exclude or import-time-stamps
{
! $result[] = $this->db->Record;
}
}
--- 362,376 ----
$sql .= " ORDER BY et_name DESC,et_lang
DESC,et_template DESC,et_version DESC";

! $tpl = new soetemplate;
! $tpl->db->query($sql,__LINE__,__FILE__);

$result = array();
! while ($tpl->db->next_record())
{
! if ($tpl->db->f('et_lang') != '##') //
exclude or import-time-stamps
{
! $tpl->db2obj();
!
! $result[] = $tpl->as_array();
}
}
***************
*** 386,389 ****
--- 389,393 ----
}
$this->data = unserialize(stripslashes($this->data));
+ if (!is_array($this->data)) $this->data = array();

if ($this->name[0] != '.')
***************
*** 640,647 ****
$to_trans = array();

- if (stristr($this->name,'test')) // dont write
all test-tpls
- {
- return $to_trans;
- }
reset($this->data); each($this->data); // skip width
while (list($row,$cols) = each($this->data))
--- 644,647 ----
***************
*** 673,683 ****
$to_trans = array();

! $tmpl = new soetemplate; // to not alter our own
data
! $tmpl->db->query("SELECT * FROM $this->db_name WHERE
et_name LIKE '$app.%'");

! for ($n = 0; $tmpl->db->next_record(); ++$n)
! {
! $tmpl->db2obj();
! $to_trans += $tmpl->getToTranslate();
}
return $to_trans;
--- 673,690 ----
$to_trans = array();

! $tpls = $this->search($app);

! $tpl = new soetemplate; // to not alter our own data
!
! while (list(,$keys) = each($tpls))
! {
! if (($keys['name'] != $last['name'] ||
// write only newest version
! $keys['template'] !=
$last['template']) &&
! !strstr($keys['name'],'test'))
! {
! $tpl->read($keys);
! $to_trans += $tpl->getToTranslate();
! $last = $keys;
! }
}
return $to_trans;
***************
*** 703,710 ****
if
(!file_exists(PHPGW_SERVER_ROOT.'/developer_tools/inc/class.solangfile.inc.php'))
{
! return 'Error: app developer-tools not
installed !!!';
}
- $solangfile =
CreateObject('developer_tools.solangfile');
-
$langarr = $solangfile->load_app($app,$lang);
if (!is_array($langarr))
--- 710,719 ----
if
(!file_exists(PHPGW_SERVER_ROOT.'/developer_tools/inc/class.solangfile.inc.php'))
{
! $solangfile =
CreateObject('etemplate.solangfile');
! }
! else
! {
! $solangfile =
CreateObject('developer_tools.solangfile');
}
$langarr = $solangfile->load_app($app,$lang);
if (!is_array($langarr))


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe