Source for file xt_globalscope.class.php
Documentation is available at xt_globalscope.class.php
*@=@=@=@ START LICENSE @=@=@=@*
Copyright or © or Copr. Stéphane TRICHET and Nicolas SOTRON
stephane.t@simpliciweb.net and nicolas.s@simpliciweb.net
This software is a computer program whose purpose is to make a
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
*@=@=@=@ END LICENSE @=@=@=@*
* @version $Id: xt_globalscope.class.php 606 2007-07-19 10:14:30Z stephanet $
* Include 'internal_components/common/cache_class/object_cached.class.php'
require_once('internal_components/common/cache_class/object_cached.class.php');
* @version $Id: xt_globalscope.class.php 606 2007-07-19 10:14:30Z stephanet $
var $req_delete =
"delete from t_globalscope where gsc_type='%s';";
var $req_select =
"select gsc_object from t_globalscope where gsc_type='%s';";
var $req_insert =
"insert into t_globalscope (gsc_type, gsc_object) values('%s','%s');";
* Database Connexion object
* Already loaded informations
* Constructor, init the requests and objects
$this->m_types['array_import_errors'] =
"a_i_e";
$this->m_types['array_import_default'] =
"a_i_d";
$this->m_types['array_weight_format'] =
"a_w_f";
$this->m_types['array_price_format'] =
"a_p_f";
$this->m_types['array_date_format'] =
"a_d_f";
$this->m_types['msg_no_deliverycosts_find'] =
"m_ndf";
$this->m_types['array_mail_settings'] =
"a_m_s";
$this->m_types['default_lang_id'] =
"d_l_i";
$this->m_types['number_product_pagefo'] =
"n_p_p";
$this->m_types['array_html_editor_format'] =
"a_h_f";
$this->m_types['rss_updated_page_suffix'] =
"u_p_s";
$this->m_types['array_web_site_width_informationprice_format']
* @param string $p_gsc_type
* @return bool TRUE on error
return !isset
($this->m_types[$p_gsc_type]);
* @param string $p_gsc_type
* @param mixed $p_gsc_object
* @return bool TRUE on error
$there_is_an_error =
$this->xDelete($p_gsc_type);
if ($there_is_an_error) {
$there_is_an_error =
$this->xInsert($p_gsc_type, $p_gsc_object);
if ($there_is_an_error) {
* @param string $p_gsc_type
* @param mixed $p_gsc_object
* @return bool TRUE on error
function xInsert($p_gsc_type, $p_gsc_object) {
$p_gsc_type =
$this->m_types[$p_gsc_type];
$parameters[sizeof($parameters)] =
$p_gsc_type;
$parameters[sizeof($parameters)] =
$p_gsc_object;
* @param string $p_gsc_type
* @return bool TRUE on error
$p_gsc_type =
$this->m_types[$p_gsc_type];
$parameters[sizeof($parameters)] =
$p_gsc_type;
* @param string $p_gsc_type
* @param mixed $r_gsc_object
* @param string $p_database_selected
* @return bool TRUE on error
function xGet($p_gsc_type, &$r_gsc_object, $p_database_selected=
"") {
$p_gsc_type =
$this->m_types[$p_gsc_type];
if ($this->xIsRemembered($p_gsc_type.
$p_database_selected, $r_remembered_object)) {
$r_gsc_object =
$r_remembered_object;
$parameters[sizeof($parameters)] =
$p_gsc_type;
$this->xRemember($p_gsc_type.
$p_database_selected, $r_gsc_object);
* Set array errors from import
* @param array $p_array_errors
* @return bool TRUE on error
return $this->xNewGlobal('array_import_errors', $p_object);
* Destroy array erros from import
* @return bool TRUE on error
return $this->xDelete('array_import_errors');
* Get from array errors from import
* @param array $r_array_errors
* @return bool TRUE on error
return $this->xGet('array_import_errors', $r_array_errors);
Documentation generated on Tue, 25 Mar 2008 15:37:34 +0100 by phpDocumentor 1.3.2