owp-cvs Mailing List for OWP (Page 2)
Status: Inactive
Brought to you by:
scader
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: <owp...@li...> - 2006-04-14 00:49:55
|
Update of /cvsroot/owp/owp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16187 Added Files: config.php Log Message: added config routines --- NEW FILE: config.php --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Configuration routines * @author Artem Sidorenko <sc...@us...> * @version $Id: config.php,v 1.1 2006/04/14 00:49:42 scader Exp $ * @package owp * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ //some constants /**dir with config files*/ define('dirs_config','config'); /**include configs dir, in the config dir*/ define('dirs_config_includes','includes'); /**extension of config files*/ define('files_ext_config','ini'); /**name of main config file*/ define('files_main_config','config'); /**default separator in paths and other things*/ define('separator',':'); #processing our config files //making list of config files $config_files[]=dirs_config."/".files_main_config.".".files_ext_config;//main config $path_config_includes = dirs_config."/".dirs_config_includes."/";//path to the includes dir //reading dir $dir_config_includes_descr = opendir($path_config_includes); //looking for config files while($element = readdir($dir_config_includes_descr)){ $path = $path_config_includes.$element; if(!is_file($path)) continue; $data = pathinfo($path); if(files_ext_config!=$data['extension']) continue; $config_files[]=$path;//adding to the list of config files unset($data,$path);//cleaning }//\\while closedir($dir_config_includes_descr);//closing dir //cleaning unset($path_config_includes,$dir_config_includes_descr,$element); //processing our config files foreach($config_files as $v){ $config_file = parse_ini_file($v,true); //processing php settings if(isset($config_file['php'])){ foreach($config_file['php'] as $key=>$value){ switch($key){ case 'include_path'://adding new include paths //old paths $old = ini_get('include_path'); //splitting to array $t_array = split(PATH_SEPARATOR,$old); //converting to realpaths and cleaning foreach($t_array as $t_k=>$t_v){ if(trim($t_v)==''){ unset($t_array[$t_k]); continue; }//\\if $t_v = realpath($t_v); if(trim($t_v)=='') unset($t_array[$t_k]); else $t_array[$t_k]=$t_v; }//\\foreach //splitting new paths $t_arrayn = split(separator,$value); //converting to realpaths and cleaning foreach($t_arrayn as $t_k=>$t_v){ if(trim($t_v)==''){ unset($t_arrayn[$t_k]); continue; }//\\if $t_v = realpath($t_v); if(trim($t_v)=='') unset($t_arrayn[$t_k]); else $t_arrayn[$t_k]=$t_v; }//\\foreach //joining paths $t_arrayr = array_merge($t_array,$t_arrayn); //converting to string $new = join(PATH_SEPARATOR,$t_arrayr); //setting new var ini_set($key,$new); //cleaning temp vars unset($t_array,$t_arrayn,$t_arrayr,$old,$new,$t_k,$t_v); break; default: ini_set($key,$value); break; }//\\switch }//\\foreach unset($config_file['php']);//deleting our php part }//\\if(processing php settings) //processing our settings foreach($config_file as $part=>$options) foreach($options as $key=>$value) /** @ignore*/ define($part."_".$key,$value); unset($config_file);//cleaning }//\\foreach //cleaning unset($v,$config_files); //defining some standard settings /**dir with template sources*/ @ define('dirs_templates','tpl/templates'); /**dir for compiled templates*/ @ define('dirs_templates_compiled','tpl/compiled'); ?> |
From: <owp...@li...> - 2006-04-14 00:45:17
|
Update of /cvsroot/owp/owp/inc/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12938/inc/functions Added Files: path_functions.inc Log Message: functions for working with paths added --- NEW FILE: path_functions.inc --- <?php /* Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /**Functions for working with paths * @author Artem Sidorenko <sc...@us...> * @version $Id: path_functions.inc,v 1.1 2006/04/14 00:44:59 scader Exp $ * @package functions * @copyright (c) 2004-2006 2realities Group (www.2realities.com) */ /**Builds a path from the arguments passed to the function * Path will be anyway correct and without the end slash * @return string path */ function build_path(){ //init $rpath = false; //arguments passed to the function $args = func_get_args(); //checking if only a one argument and if it is slash if(count($args)==1&&correct_path($args[0]=='/')) return '/'; $first = true;//we are going to process the first element foreach($args as $v){ $v = correct_path($v); if(@($v[strlen($v)-1]=='/')) $v = substr($v,0,strlen($v)-1);;//removing end slash if(!$first){//if not first element if(@($v[0]=='/')) $v = substr($v,1);;//removing leading slash if(empty($v)) continue; $rpath = "$rpath/$v"; }//\\if else $rpath = $v;//first element, we don't need double slashes;) $first = false; }//\\foreach return $rpath; }//\\build_path /**make a correct path * @param string $path input path * @return string correct path */ function correct_path($path){ return strtr(trim($path),"\\","/");; }//\\correct_path ?> |
From: <owp...@li...> - 2006-04-14 00:43:57
|
Update of /cvsroot/owp/owp/inc/startup In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12138/inc/startup Log Message: Directory /cvsroot/owp/owp/inc/startup added to the repository |
From: <owp...@li...> - 2006-04-14 00:43:43
|
Update of /cvsroot/owp/owp/inc/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12007/inc/functions Log Message: Directory /cvsroot/owp/owp/inc/functions added to the repository |
From: <owp...@li...> - 2006-04-14 00:43:29
|
Update of /cvsroot/owp/owp/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11899/inc Log Message: Directory /cvsroot/owp/owp/inc added to the repository |
From: <owp...@li...> - 2006-04-14 00:42:53
|
Update of /cvsroot/owp/owp/tpl/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11342/tpl/templates Log Message: Directory /cvsroot/owp/owp/tpl/templates added to the repository |
From: <owp...@li...> - 2006-04-14 00:42:47
|
Update of /cvsroot/owp/owp/tpl/compiled In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11249/tpl/compiled Log Message: Directory /cvsroot/owp/owp/tpl/compiled added to the repository |
From: <owp...@li...> - 2006-04-14 00:42:35
|
Update of /cvsroot/owp/owp/tpl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11123/tpl Log Message: Directory /cvsroot/owp/owp/tpl added to the repository |
From: <owp...@li...> - 2006-04-14 00:41:20
|
Update of /cvsroot/owp/owp/config/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10322/config/includes Log Message: Directory /cvsroot/owp/owp/config/includes added to the repository |
From: <owp...@li...> - 2006-04-14 00:41:17
|
Update of /cvsroot/owp/owp/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10227/config Log Message: Directory /cvsroot/owp/owp/config added to the repository |
From: <owp...@li...> - 2006-04-13 01:12:58
|
Update of /cvsroot/owp/owp/thirdparty/smarty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5268/thirdparty/smarty Log Message: Directory /cvsroot/owp/owp/thirdparty/smarty added to the repository |
From: <owp...@li...> - 2006-04-13 01:12:44
|
Update of /cvsroot/owp/owp/thirdparty In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5129/thirdparty Log Message: Directory /cvsroot/owp/owp/thirdparty added to the repository |
From: <owp...@li...> - 2006-04-07 23:08:06
|
Update of /cvsroot/owp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17416 Added Files: LICENSE Log Message: licensing to a BSD license --- NEW FILE: LICENSE --- Copyright (c) 2006, 2realities Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the 2realities Group nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |