[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6475] merge 6495:6474 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6475] merge 6495:6474 from trunk |
Date: |
Mon, 11 Oct 2010 21:51:58 +0000 |
Revision: 6475
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6475
Author: sigurdne
Date: 2010-10-11 21:51:58 +0000 (Mon, 11 Oct 2010)
Log Message:
-----------
merge 6495:6474 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/catch/inc/class.soconfig.inc.php
branches/Version-1_0-branch/catch/setup/setup.inc.php
branches/Version-1_0-branch/catch/setup/tables_current.inc.php
branches/Version-1_0-branch/catch/setup/tables_update.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc_mysql.inc.php
branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
branches/Version-1_0-branch/phpgwapi/setup/phpgw_en.lang
branches/Version-1_0-branch/phpgwapi/setup/phpgw_no.lang
branches/Version-1_0-branch/phpgwapi/templates/base/login.tpl
Added Paths:
-----------
branches/Version-1_0-branch/phpgwapi/inc/combine.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468
+ /trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474
Modified: branches/Version-1_0-branch/catch/inc/class.soconfig.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/inc/class.soconfig.inc.php
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/catch/inc/class.soconfig.inc.php
2010-10-11 21:51:58 UTC (rev 6475)
@@ -107,7 +107,7 @@
'id' => $this->db->f('id'),
'name' => $this->db->f('name', true),
'descr' => $this->db->f('descr', true),
- 'schema' =>
$this->db->f('schema')
+ 'schema' =>
$this->db->f('schema_')
);
}
@@ -129,7 +129,7 @@
'id' => $id,
'name' => $this->db->f('name',
true),
'descr' =>
$this->db->f('descr', true),
- 'schema' =>
$this->db->f('schema')
+ 'schema' =>
$this->db->f('schema_')
);
}
return $values;
@@ -172,7 +172,7 @@
);
$insert_values =
$this->db->validate_insert($insert_values);
- $this->db->query("INSERT INTO fm_catch_config_type
(id,name,descr,schema) "
+ $this->db->query("INSERT INTO fm_catch_config_type
(id,name,descr,schema_) "
. "VALUES ($insert_values)",__LINE__,__FILE__);
$receipt['message'][]=array('msg'=>lang('config type
has been saved'));
Modified: branches/Version-1_0-branch/catch/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/setup.inc.php 2010-10-11
21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/catch/setup/setup.inc.php 2010-10-11
21:51:58 UTC (rev 6475)
@@ -27,7 +27,7 @@
*/
$setup_info['catch']['name'] = 'catch';
- $setup_info['catch']['version'] = '0.9.17.508';
+ $setup_info['catch']['version'] = '0.9.17.509';
$setup_info['catch']['app_order'] = 20;
$setup_info['catch']['enable'] = 1;
$setup_info['catch']['globals_checked'] = True;
Modified: branches/Version-1_0-branch/catch/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/catch/setup/tables_current.inc.php
2010-10-11 21:51:58 UTC (rev 6475)
@@ -96,7 +96,7 @@
'id' => array('type' => 'int','precision' =>
4,'nullable' => False),
'name' => array('type' => 'varchar',
'precision' => 50,'nullable' => False),
'descr' => array('type' => 'varchar',
'precision' => 200,'nullable' => true),
- 'schema' => array('type' => 'varchar',
'precision' => 10,'nullable' => false)
+ 'schema_' => array('type' => 'varchar',
'precision' => 10,'nullable' => false)
),
'pk' => array('id'),
'fk' => array(),
Modified: branches/Version-1_0-branch/catch/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/catch/setup/tables_update.inc.php
2010-10-11 21:51:58 UTC (rev 6475)
@@ -285,3 +285,22 @@
return $GLOBALS['setup_info']['catch']['currentver'];
}
}
+ /**
+ * Update property version from 0.9.17.508 to 0.9.17.509
+ * Rename reserved fieldname to allow MySQL
+ *
+ */
+
+ $test[] = '0.9.17.508';
+ function catch_upgrade0_9_17_508()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->RenameColumn('fm_catch_config_type','schema','schema_');
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['catch']['currentver'] =
'0.9.17.509';
+ return $GLOBALS['setup_info']['catch']['currentver'];
+ }
+ }
Modified: branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php 2010-10-11
21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.js.inc.php 2010-10-11
21:51:58 UTC (rev 6475)
@@ -118,30 +118,35 @@
*/
public function get_script_links()
{
- $links = '';
- if( is_array($this->files) && count($this->files) )
+ $links = "<!--JS Imports from phpGW javascript class
-->\n";
+ $jsfiles = array();
+ if (is_array($this->files) && count($this->files))
{
- $links = "<!--JS Imports from phpGW javascript
class -->\n";
- foreach($this->files as $app => $packages)
+ foreach ($this->files as $app => $packages)
{
- if( is_array($packages) &&
count($packages) )
+ if (is_array($packages) &&
count($packages))
{
- foreach($packages as $pkg =>
$files)
+ foreach ($packages as $pkg =>
$files)
{
- if( is_array($files) &&
count($files) )
+ if (is_array($files) &&
count($files))
{
- foreach($files
as $file => $ignored)
+ foreach ($files
as $file => $ignored)
{
- //echo
"file:
{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/js/{$pkg}/{$file}.js
<br>";
- $links
.= '<script type="text/javascript" '
- .
"src=\"{$GLOBALS['phpgw_info']['server']['webserver_url']}/{$app}/js/{$pkg}/{$file}.js\">"
- .
"</script>\n";
+ // Add
file path to array and replace path separator with "--" for URL-friendlyness
+
$jsfiles[] = str_replace('/', '--', "{$app}/js/{$pkg}/{$file}.js");
}
}
}
}
}
}
+ $cachedir =
urlencode($GLOBALS['phpgw_info']['server']['temp_dir']);
+ $jsfiles = implode(',', $jsfiles);
+ $links .= '<script type="text/javascript" '
+ .
"src=\"{$GLOBALS['phpgw_info']['server']['webserver_url']}/phpgwapi/inc/combine.php?cachedir={$cachedir}&type=javascript&files={$jsfiles}\">"
+ . "</script>\n";
+ unset($jsfiles);
+
return $links;
}
Modified:
branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc_mysql.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc_mysql.inc.php
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.schema_proc_mysql.inc.php
2010-10-11 21:51:58 UTC (rev 6475)
@@ -144,7 +144,14 @@
case 'current_date':
case 'current_timestamp':
return 'now()';
-
+ break;
+ case 'true':
+ case 'True':
+ return 1;
+ break;
+ case 'false':
+ case 'False':
+ return 0;
}
return "'" . $sDefault . "'";
}
Copied: branches/Version-1_0-branch/phpgwapi/inc/combine.php (from rev 6474,
trunk/phpgwapi/inc/combine.php)
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/combine.php
(rev 0)
+++ branches/Version-1_0-branch/phpgwapi/inc/combine.php 2010-10-11
21:51:58 UTC (rev 6475)
@@ -0,0 +1,167 @@
+<?php
+
+ /* *
**********************************************************************
+ * CSS and Javascript Combinator 0.5
+ * Copyright 2006 by Niels Leenheer
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+ $cache = true;
+ $cachedir = urldecode($_GET['cachedir']);//dirname(__FILE__) .
'/../cache';
+ $cssdir = dirname(__FILE__) . '/../../';
+ $jsdir = dirname(__FILE__) . '/../../';
+
+// Determine the directory and type we should use
+ switch ($_GET['type'])
+ {
+ case 'css':
+ $base = realpath($cssdir);
+ break;
+ case 'javascript':
+ $base = realpath($jsdir);
+ break;
+ default:
+ header("HTTP/1.0 503 Not Implemented");
+ exit;
+ };
+
+ $type = $_GET['type'];
+ $elements = explode(',', $_GET['files']);
+
+// Determine last modification date of the files
+ $lastmodified = 0;
+ while (list(, $element) = each($elements))
+ {
+ $path = realpath($base . '/' . str_replace('--', '/',
$element));
+
+ if (($type == 'javascript' && substr($path, -3) != '.js') ||
+ ($type == 'css' && substr($path, -4) != '.css'))
+ {
+ header("HTTP/1.0 403 Forbidden");
+ exit;
+ }
+
+ if (substr($path, 0, strlen($base)) != $base ||
!file_exists($path))
+ {
+ header("HTTP/1.0 404 Not Found");
+ exit;
+ }
+
+ $lastmodified = max($lastmodified, filemtime($path));
+ }
+
+// Send Etag hash
+ $hash = $lastmodified . '-' . md5($_GET['files']);
+ header("Etag: \"" . $hash . "\"");
+
+ if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
+ stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) == '"' .
$hash . '"')
+ {
+ // Return visit and no modifications, so do not send anything
+ header("HTTP/1.0 304 Not Modified");
+ header('Content-Length: 0');
+ }
+ else
+ {
+ // First time visit or files were modified
+ if ($cache)
+ {
+ // Determine supported compression method
+ $gzip = strstr($_SERVER['HTTP_ACCEPT_ENCODING'],
'gzip');
+ $deflate = strstr($_SERVER['HTTP_ACCEPT_ENCODING'],
'deflate');
+
+ // Determine used compression method
+ $encoding = $gzip ? 'gzip' : ($deflate ? 'deflate' :
'none');
+
+ // Check for buggy versions of Internet Explorer
+ if (!strstr($_SERVER['HTTP_USER_AGENT'], 'Opera') &&
+ preg_match('/^Mozilla\/4\.0
\(compatible; MSIE ([0-9]\.[0-9])/i', $_SERVER['HTTP_USER_AGENT'], $matches))
+ {
+ $version = floatval($matches[1]);
+
+ if ($version < 6)
+ $encoding = 'none';
+
+ if ($version == 6 &&
!strstr($_SERVER['HTTP_USER_AGENT'], 'EV1'))
+ $encoding = 'none';
+ }
+
+ // Try the cache first to see if the combined files
were already generated
+ $cachefile = 'cache-' . $hash . '.' . $type .
($encoding != 'none' ? '.' . $encoding : '');
+
+ if (file_exists($cachedir . '/' . $cachefile))
+ {
+ if ($fp = fopen($cachedir . '/' . $cachefile,
'rb'))
+ {
+
+ if ($encoding != 'none')
+ {
+ header("Content-Encoding: " .
$encoding);
+ }
+
+ header("Content-Type: text/" . $type);
+ header("Content-Length: " .
filesize($cachedir . '/' . $cachefile));
+
+ fpassthru($fp);
+ fclose($fp);
+ exit;
+ }
+ }
+ }
+
+ // Get contents of the files
+ $contents = '';
+ reset($elements);
+ while (list(, $element) = each($elements))
+ {
+ $path = realpath($base . '/' . str_replace('--', '/',
$element));
+ $contents .= "\n\n" . file_get_contents($path);
+ }
+
+ // Send Content-Type
+ header("Content-Type: text/" . $type);
+
+ if (isset($encoding) && $encoding != 'none')
+ {
+ // Send compressed contents
+ $contents = gzencode($contents, 9, $gzip ? FORCE_GZIP :
FORCE_DEFLATE);
+ header("Content-Encoding: " . $encoding);
+ header('Content-Length: ' . strlen($contents));
+ echo $contents;
+ }
+ else
+ {
+ // Send regular contents
+ header('Content-Length: ' . strlen($contents));
+ echo $contents;
+ }
+
+ // Store cache
+ if ($cache)
+ {
+ if ($fp = fopen($cachedir . '/' . $cachefile, 'wb'))
+ {
+ fwrite($fp, $contents);
+ fclose($fp);
+ }
+ }
+ }
Modified: branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/inc/sso/include_login.inc.php
2010-10-11 21:51:58 UTC (rev 6475)
@@ -398,10 +398,12 @@
$cd = (int) $_GET['cd'];
}
+ $system_name =
isset($GLOBALS['phpgw_info']['server']['system_name']) ?
$GLOBALS['phpgw_info']['server']['system_name'] : 'Portico Estate';
$this->tmpl->set_var('login_url',
$GLOBALS['phpgw_info']['server']['webserver_url'] .
'/'.$variables['partial_url'].'?' . http_build_query($extra_vars) );
$this->tmpl->set_var('registration_url',$GLOBALS['phpgw_info']['server']['webserver_url']
. '/registration/');
- $this->tmpl->set_var('system',
isset($GLOBALS['phpgw_info']['server']['system_name']) ?
$GLOBALS['phpgw_info']['server']['system_name'] : 'phpGroupWare');
+ $this->tmpl->set_var('system', $system_name);
$this->tmpl->set_var('version',
isset($GLOBALS['phpgw_info']['server']['versions']['system']) ?
$GLOBALS['phpgw_info']['server']['versions']['system'] :
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']);
+ $this->tmpl->set_var('instruction', lang('use a valid
username and password to gain access to %1', $system_name));
$this->tmpl->set_var('cd', $this->check_logoutcode($cd)
);
$this->tmpl->set_var('last_loginid', $last_loginid);
Modified: branches/Version-1_0-branch/phpgwapi/setup/phpgw_en.lang
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/phpgw_en.lang 2010-10-11
21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/setup/phpgw_en.lang 2010-10-11
21:51:58 UTC (rev 6475)
@@ -499,6 +499,7 @@
update common en Update
url common en URL
uruguay common en URUGUAY
+use a valid username and password to gain access to %1 login en Use a
valid username and password to gain access to %1
use button to search for common en use Button to search for
use button to search for address common en use Button to search
for Address
use button to search for calendarevent common en use Button to search
for Calendarevent
Modified: branches/Version-1_0-branch/phpgwapi/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/phpgwapi/setup/phpgw_no.lang 2010-10-11
21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/setup/phpgw_no.lang 2010-10-11
21:51:58 UTC (rev 6475)
@@ -124,5 +124,6 @@
todays date, eg. %1 common no Dagens dato, %1
use cookies login no use cookies
username login no Brukernavn
+use a valid username and password to gain access to %1 login no Angi et
gyldig brukernavn og passord for få tilgang til %1
version common no versjon
you have been successfully logged out login no Du har nå logget ut
Modified: branches/Version-1_0-branch/phpgwapi/templates/base/login.tpl
===================================================================
--- branches/Version-1_0-branch/phpgwapi/templates/base/login.tpl
2010-10-11 21:45:16 UTC (rev 6474)
+++ branches/Version-1_0-branch/phpgwapi/templates/base/login.tpl
2010-10-11 21:51:58 UTC (rev 6475)
@@ -124,7 +124,7 @@
<div
class="button_holder">
<div class="button1">
<div class="next">
-
<a onclick="login.submit();">Login</a>
+
<a onclick="login.submit();">{lang_login}</a>
</div>
</div>
</div>
@@ -149,7 +149,7 @@
</div>
</div>
- <p>Use a valid username and password to
gain access to {system}.</p>
+ <p>{instruction}</p>
<div id="lock"></div>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6475] merge 6495:6474 from trunk,
Sigurd Nes <=