You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(361) |
Oct
(65) |
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(798) |
Feb
(694) |
Mar
(586) |
Apr
(145) |
May
(24) |
Jun
(24) |
Jul
(56) |
Aug
(11) |
Sep
(138) |
Oct
(107) |
Nov
(58) |
Dec
(39) |
| 2004 |
Jan
(157) |
Feb
(24) |
Mar
(13) |
Apr
(14) |
May
(73) |
Jun
(106) |
Jul
(217) |
Aug
(91) |
Sep
(116) |
Oct
(357) |
Nov
(27) |
Dec
(272) |
| 2005 |
Jan
(97) |
Feb
(40) |
Mar
(167) |
Apr
(365) |
May
(344) |
Jun
(357) |
Jul
(407) |
Aug
(529) |
Sep
(204) |
Oct
(52) |
Nov
(80) |
Dec
(1) |
| 2006 |
Jan
(2) |
Feb
(1) |
Mar
(11) |
Apr
(112) |
May
(121) |
Jun
(86) |
Jul
(51) |
Aug
(48) |
Sep
(107) |
Oct
(20) |
Nov
(50) |
Dec
(11) |
| 2007 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(11) |
May
(2) |
Jun
(25) |
Jul
(67) |
Aug
(134) |
Sep
(54) |
Oct
(69) |
Nov
(10) |
Dec
(74) |
| 2008 |
Jan
(73) |
Feb
(81) |
Mar
(64) |
Apr
(98) |
May
(157) |
Jun
(68) |
Jul
(80) |
Aug
(108) |
Sep
(176) |
Oct
(107) |
Nov
(265) |
Dec
(60) |
| 2009 |
Jan
(149) |
Feb
(140) |
Mar
(195) |
Apr
(141) |
May
(53) |
Jun
(45) |
Jul
(98) |
Aug
(153) |
Sep
(160) |
Oct
(138) |
Nov
(139) |
Dec
(104) |
| 2010 |
Jan
(188) |
Feb
(259) |
Mar
(133) |
Apr
(104) |
May
(42) |
Jun
(121) |
Jul
(38) |
Aug
(223) |
Sep
(259) |
Oct
(255) |
Nov
(106) |
Dec
(157) |
| 2011 |
Jan
(202) |
Feb
(110) |
Mar
(261) |
Apr
(272) |
May
(218) |
Jun
(108) |
Jul
(141) |
Aug
(205) |
Sep
(326) |
Oct
(279) |
Nov
(368) |
Dec
(238) |
| 2012 |
Jan
(239) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
(3) |
Aug
(6) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(1) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
(3) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(1) |
| 2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
|
2
|
3
|
4
|
5
(2) |
6
(7) |
|
7
|
8
(4) |
9
(3) |
10
(5) |
11
(9) |
12
(7) |
13
(16) |
|
14
(8) |
15
(3) |
16
|
17
(2) |
18
|
19
(7) |
20
(17) |
|
21
(3) |
22
|
23
(1) |
24
(6) |
25
(2) |
26
(9) |
27
(5) |
|
28
(1) |
29
|
30
(4) |
31
|
|
|
|
|
From: <sk...@us...> - 2006-05-30 22:02:47
|
Revision: 517 Author: skalpa Date: 2006-05-30 15:02:42 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=517&view=rev Log Message: ----------- Fixed the getDirListAsArray() that was breaking the system/admin.php page. 1) The parameter is checked and a trailing slash is added to it if necessary 2) 'CVS' has been replaced by 'cvs' in the ignore list, as the comparison is made using strtolower() 3) ALL folders that start with a dot are ignored (they are hidden folders under Unix systems, and shouldn't be shown anyway) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php 2006-05-30 19:55:42 UTC (rev 516) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php 2006-05-30 22:02:42 UTC (rev 517) @@ -60,21 +60,24 @@ /* * gets list of name of directories inside a directory */ - function getDirListAsArray($dirname) - { - $ignores = array('.', '..', '.svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr'); - $dirlist = array(); - if (is_dir($dirname) && $handle = opendir($dirname)) { - while (false !== ($file = readdir($handle))) { - if (!in_array(strtolower($file), $ignores) && is_dir($dirname.$file) ) { - $dirlist[$file] = $file; + function getDirListAsArray( $dirname ) { + $ignored = array( 'cvs', '_darcs' ); + $list = array(); + if ( substr( $dirname, -1 ) != '/' ) { + $dirname .= '/'; + } + if ( $handle = opendir( $dirname ) ) { + while ( $file = readdir( $handle ) ) { + if ( substr( $file, 0, 1 ) == '.' || in_array( strtolower( $file ), $ignored ) ) continue; + if ( is_dir( $dirname . $file ) ) { + $list[$file] = $file; } } - closedir($handle); - asort($dirlist); - reset($dirlist); + closedir( $handle ); + asort( $list ); + reset( $list ); } - return $dirlist; + return $list; } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-30 19:55:55
|
Revision: 516 Author: skalpa Date: 2006-05-30 12:55:42 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=516&view=rev Log Message: ----------- Fixed bug #1495178: Sanitizer treats internal links as external ones Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt XoopsCore/branches/2.0.x/2.0.14/htdocs/class/module.textsanitizer.php Modified: XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-30 07:14:16 UTC (rev 515) +++ XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-30 19:55:42 UTC (rev 516) @@ -7,9 +7,9 @@ - Re-implemented ignore list to Xoops directory list (ignore list from patch #1488216) (phppp/epaulin) +- Fixed bug #1495178: Sanitizer treats internal links as external ones (skalpa/dugris) - ============================ 2006/05/26: Version 2.0.14-RC1 ============================ Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/module.textsanitizer.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/module.textsanitizer.php 2006-05-30 07:14:16 UTC (rev 515) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/module.textsanitizer.php 2006-05-30 19:55:42 UTC (rev 516) @@ -152,7 +152,7 @@ // RMV: added new markup for intrasite url (allows easier site moves) // TODO: automatically convert other URLs to this format if XOOPS_URL matches?? $patterns[] = "/\[siteurl=(['\"]?)([^\"'<>]*)\\1](.*)\[\/siteurl\]/sU"; - $replacements[] = '<a href="'.XOOPS_URL.'/\\2" target="_blank">\\3</a>'; + $replacements[] = '<a href="'.XOOPS_URL.'/\\2">\\3</a>'; $patterns[] = "/\[url=(['\"]?)(http[s]?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; $replacements[] = '<a href="\\2" target="_blank">\\3</a>'; $patterns[] = "/\[url=(['\"]?)(ftp?:\/\/[^\"'<>]*)\\1](.*)\[\/url\]/sU"; @@ -200,7 +200,7 @@ $text = str_replace( "\x00", "", $text ); $c = "[\x01-\x1f]*"; $patterns[] = "/j{$c}a{$c}v{$c}a{$c}s{$c}c{$c}r{$c}i{$c}p{$c}t{$c}:/si"; - $replacements[] = "(tammairanslip)"; + $replacements[] = "(script removed)"; $patterns[] = "/a{$c}b{$c}o{$c}u{$c}t{$c}:/si"; $replacements[] = "about :"; $text = preg_replace($patterns, $replacements, $text); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-30 07:14:22
|
Revision: 515 Author: skalpa Date: 2006-05-30 00:14:16 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=515&view=rev Log Message: ----------- Fixed bug #1496691: Center bottom blocks don't show in group admin Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopsblock.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopsblock.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopsblock.php 2006-05-30 07:13:45 UTC (rev 514) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopsblock.php 2006-05-30 07:14:16 UTC (rev 515) @@ -316,7 +316,7 @@ if ( $side == XOOPS_SIDEBLOCK_BOTH ) { $side = "(b.side=0 OR b.side=1)"; } elseif ( $side == XOOPS_CENTERBLOCK_ALL ) { - $side = "(b.side=3 OR b.side=4 OR b.side=5)"; + $side = "(b.side=3 OR b.side=4 OR b.side=5 OR b.side=7 OR b.side=8 OR b.side=9 )"; } else { $side = "b.side=".$side; } @@ -352,7 +352,7 @@ if ( $side == 2 ) { $side = "(side=0 OR side=1)"; } elseif ( $side == 6 ) { - $side = "(side=3 OR side=4 OR side=5)"; + $side = "(side=3 OR side=4 OR side=5 OR side=7 OR side=8 OR side=9)"; } else { $side = "side=".$side; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-30 07:13:56
|
Revision: 514 Author: skalpa Date: 2006-05-30 00:13:45 -0700 (Tue, 30 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=514&view=rev Log Message: ----------- Refs fixes Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/kernel/member.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/kernel/member.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/kernel/member.php 2006-05-28 13:52:48 UTC (rev 513) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/kernel/member.php 2006-05-30 07:13:45 UTC (rev 514) @@ -210,7 +210,7 @@ */ function getGroupList($criteria = null) { - $groups =& $this->_gHandler->getObjects($criteria, true); + $groups = $this->_gHandler->getObjects($criteria, true); $ret = array(); foreach (array_keys($groups) as $i) { $ret[$i] = $groups[$i]->getVar('name'); @@ -226,7 +226,7 @@ */ function getUserList($criteria = null) { - $users =& $this->_uHandler->getObjects($criteria, true); + $users = $this->_uHandler->getObjects($criteria, true); $ret = array(); foreach (array_keys($users) as $i) { $ret[$i] = $users[$i]->getVar('uname'); @@ -280,7 +280,7 @@ */ function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0) { - $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start); + $user_ids = $this->_mHandler->getUsersByGroup($group_id, $limit, $start); if (!$asobject) { return $user_ids; } else { @@ -305,7 +305,7 @@ */ function getGroupsByUser($user_id, $asobject = false) { - $group_ids =& $this->_mHandler->getGroupsByUser($user_id); + $group_ids = $this->_mHandler->getGroupsByUser($user_id); if (!$asobject) { return $group_ids; } else { @@ -327,7 +327,7 @@ { $criteria = new CriteriaCompo(new Criteria('uname', $uname)); $criteria->add(new Criteria('pass', md5($pwd))); - $user =& $this->_uHandler->getObjects($criteria, false); + $user = $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { $user = false; return $user; @@ -346,7 +346,7 @@ { $criteria = new CriteriaCompo(new Criteria('uname', $uname)); $criteria->add(new Criteria('pass', $md5pwd)); - $user =& $this->_uHandler->getObjects($criteria, false); + $user = $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { $user = false; return $user; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ph...@us...> - 2006-05-28 13:53:27
|
Revision: 513 Author: phppp Date: 2006-05-28 06:52:48 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=513&view=rev Log Message: ----------- Re-implemented ignore list to Xoops directory list (ignore list from patch #1488216); directory detections are now using XoopsList methods Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/groups/groupform.php XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin.php Modified: XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-28 13:52:48 UTC (rev 513) @@ -2,6 +2,15 @@ XOOPS v2.0.x Changelog ============================ +2006/**/**: Version 2.0.14-RC2 +============================ + + +- Re-implemented ignore list to Xoops directory list (ignore list from patch #1488216) (phppp/epaulin) + + + +============================ 2006/05/26: Version 2.0.14-RC1 ============================ Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/xoopslists.php 2006-05-28 13:52:48 UTC (rev 513) @@ -62,13 +62,12 @@ */ function getDirListAsArray($dirname) { + $ignores = array('.', '..', '.svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr'); $dirlist = array(); if (is_dir($dirname) && $handle = opendir($dirname)) { while (false !== ($file = readdir($handle))) { - if ( !preg_match("/^[\.]{1,2}$/",$file) ) { - if (!in_array(strtolower($file), array('cvs', '.svn')) && is_dir($dirname.$file) ) { - $dirlist[$file]=$file; - } + if (!in_array(strtolower($file), $ignores) && is_dir($dirname.$file) ) { + $dirlist[$file] = $file; } } closedir($handle); @@ -91,7 +90,7 @@ while (false !== ($file = readdir($handle))) { if (!preg_match("/^[\.]{1,2}$/",$file) && is_file($dirname.'/'.$file)) { $file = $prefix.$file; - $filelist[$file]=$file; + $filelist[$file] = $file; } } closedir($handle); @@ -109,9 +108,9 @@ $filelist = array(); if ($handle = opendir($dirname)) { while (false !== ($file = readdir($handle))) { - if ( preg_match("/(\.gif|\.jpg|\.png)$/i",$file) ) { + if ( preg_match("/(\.gif|\.jpg|\.png)$/i", $file) ) { $file = $prefix.$file; - $filelist[$file]=$file; + $filelist[$file] = $file; } } closedir($handle); Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php 2006-05-28 13:52:48 UTC (rev 513) @@ -1262,20 +1262,8 @@ */ function getDirList($dirname) { - $dirlist = array(); - if (is_dir($dirname) && $handle = opendir($dirname)) { - while (false !== ($file = readdir($handle))) { - if ( !preg_match("/^[.]{1,2}$/",$file) ) { - if (strtolower($file) != 'cvs' && is_dir($dirname.$file) ) { - $dirlist[$file]=$file; - } - } - } - closedir($handle); - asort($dirlist); - reset($dirlist); - } - return $dirlist; + require_once dirname(dirname(__FILE__))."/class/xoopslists.php"; + return XoopsLists::getDirListAsArray($dirname); } /* @@ -1283,18 +1271,8 @@ */ function getImageFileList($dirname) { - $filelist = array(); - if (is_dir($dirname) && $handle = opendir($dirname)) { - while (false !== ($file = readdir($handle))) { - if (!preg_match("/^[.]{1,2}$/",$file) && preg_match("/[.gif|.jpg|.png]$/i",$file) ) { - $filelist[$file]=$file; - } - } - closedir($handle); - asort($filelist); - reset($filelist); - } - return $filelist; + require_once dirname(dirname(__FILE__))."/class/xoopslists.php"; + return XoopsLists::getImgListAsArray($dirname); } function &xoops_module_gettemplate($dirname, $template, $block=false) Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/groups/groupform.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/groups/groupform.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/groups/groupform.php 2006-05-28 13:52:48 UTC (rev 513) @@ -39,16 +39,17 @@ // $s_cat_checkbox->setExtra('checked="checked" disabled="disabled"'); //} include_once(XOOPS_ROOT_PATH.'/modules/system/constants.php'); -$handle = opendir(XOOPS_ROOT_PATH.'/modules/system/admin'); -while (false != $file = readdir($handle)) { - if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir(XOOPS_ROOT_PATH.'/modules/system/admin/'.$file)) { - include XOOPS_ROOT_PATH.'/modules/system/admin/'.$file.'/xoops_version.php'; - if (!empty($modversion['category'])) { - $s_cat_checkbox->addOption($modversion['category'], $modversion['name']); - } - unset($modversion); +require_once XOOPS_ROOT_PATH."/class/xoopslists.php"; +$admin_dir = XOOPS_ROOT_PATH."/modules/system/admin/"; +$dirlist = XoopsLists::getDirListAsArray($admin_dir); +foreach($dirlist as $file){ + include XOOPS_ROOT_PATH.'/modules/system/admin/'.$file.'/xoops_version.php'; + if (!empty($modversion['category'])) { + $s_cat_checkbox->addOption($modversion['category'], $modversion['name']); } + unset($modversion); } +unset($dirlist); $a_mod_checkbox = new XoopsFormCheckBox(_AM_ACTIVERIGHTS, "admin_mids[]", $a_mod_value); $module_handler =& xoops_gethandler('module'); Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/modulesadmin/modulesadmin.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/modulesadmin/modulesadmin.php 2006-05-28 13:52:48 UTC (rev 513) @@ -35,8 +35,7 @@ function xoops_module_list() { - xoops_cp_header(); - //OpenTable(); + xoops_cp_header(); echo " <h4 style='text-align:left'>"._MD_AM_MODADMIN."</h4> <form action='admin.php' method='post' name='moduleadmin' id='moduleadmin'> @@ -96,36 +95,33 @@ <table width='100%' border='0' class='outer' cellpadding='4' cellspacing='1'> <tr align='center'><th>"._MD_AM_MODULE."</th><th>"._MD_AM_VERSION."</th><th>"._MD_AM_ACTION."</th></tr> "; - $modules_dir = XOOPS_ROOT_PATH."/modules"; - $handle = opendir($modules_dir); + require_once XOOPS_ROOT_PATH."/class/xoopslists.php"; + $dirlist = XoopsLists::getModulesList(); $count = 0; - while ($file = readdir($handle)) { + foreach($dirlist as $file){ clearstatcache(); $file = trim($file); - if ($file != '' && strtolower($file) != 'cvs' && !preg_match("/^[.]+/",$file) && is_dir($modules_dir.'/'.$file)) { - if ( !in_array($file, $listed_mods) ) { - $module =& $module_handler->create(); - $module->loadInfo($file); - if ($count % 2 == 0) { - $class = 'even'; - } else { - $class = 'odd'; - } - echo '<tr class="'.$class.'" align="center" valign="middle"> - <td align="center" valign="bottom"><img src="'.XOOPS_URL.'/modules/'.$module->getInfo('dirname').'/'.$module->getInfo('image').'" alt="'.htmlspecialchars($module->getInfo('name')).'" border="0" /></td> - <td align="center">'.round($module->getInfo('version'), 2).'</td> - <td> - <a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=install&module='.$module->getInfo('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/install.gif" alt="'._MD_AM_INSTALL.'" /></a>'; - echo " <a href='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/system/admin.php?fct=version&mid=".$module->getInfo('dirname')."\",\"Info\",300,230);'>"; - echo '<img src="'.XOOPS_URL.'/modules/system/images/info.gif" alt="'._INFO.'" /></a></td></tr> - '; - unset($module); - $count++; + if ( !in_array($file, $listed_mods) ) { + $module =& $module_handler->create(); + $module->loadInfo($file); + if ($count % 2 == 0) { + $class = 'even'; + } else { + $class = 'odd'; } + echo '<tr class="'.$class.'" align="center" valign="middle"> + <td align="center" valign="bottom"><img src="'.XOOPS_URL.'/modules/'.$module->getInfo('dirname').'/'.$module->getInfo('image').'" alt="'.htmlspecialchars($module->getInfo('name')).'" border="0" /></td> + <td align="center">'.round($module->getInfo('version'), 2).'</td> + <td> + <a href="'.XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=install&module='.$module->getInfo('dirname').'"><img src="'.XOOPS_URL.'/modules/system/images/install.gif" alt="'._MD_AM_INSTALL.'" /></a>'; + echo " <a href='javascript:openWithSelfMain(\"".XOOPS_URL."/modules/system/admin.php?fct=version&mid=".$module->getInfo('dirname')."\",\"Info\",300,230);'>"; + echo '<img src="'.XOOPS_URL.'/modules/system/images/info.gif" alt="'._INFO.'" /></a></td></tr> + '; + unset($module); + $count++; } } echo "</table>"; - //CloseTable(); xoops_cp_footer(); } Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/preferences/main.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/preferences/main.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin/preferences/main.php 2006-05-28 13:52:48 UTC (rev 513) @@ -115,14 +115,8 @@ case 'theme': case 'theme_multi': $ele = ($config[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true); - $handle = opendir(XOOPS_THEME_PATH.'/'); - $dirlist = array(); - while (false !== ($file = readdir($handle))) { - if (is_dir(XOOPS_THEME_PATH.'/'.$file) && !preg_match("/^[.]+/",$file) && strtolower($file) != 'cvs') { - $dirlist[$file]=$file; - } - } - closedir($handle); + require_once XOOPS_ROOT_PATH."/class/xoopslists.php"; + $dirlist = XoopsLists::getThemesList(); if (!empty($dirlist)) { asort($dirlist); $ele->addOptionArray($dirlist); Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin.php 2006-05-27 01:16:37 UTC (rev 512) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/admin.php 2006-05-28 13:52:48 UTC (rev 513) @@ -118,31 +118,31 @@ } else { $all_ok = true; } + require_once XOOPS_ROOT_PATH."/class/xoopslists.php"; $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; - $handle = opendir($admin_dir); + $dirlist = XoopsLists::getDirListAsArray($admin_dir); $counter = 0; $class = 'even'; - while ($file = readdir($handle)) { - if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { - include $admin_dir.'/'.$file.'/xoops_version.php'; - if ($modversion['hasAdmin']) { - $category = isset($modversion['category']) ? intval($modversion['category']) : 0; - if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { - echo "<td class='$class' align='center' valign='bottom' width='19%'>"; - echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; - echo "</td>"; - $counter++; - $class = ($class == 'even') ? 'odd' : 'even'; - } - if ( $counter > 4 ) { - $counter = 0; - echo "</tr>"; - echo "<tr>"; - } + foreach($dirlist as $file){ + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo "<td class='$class' align='center' valign='bottom' width='19%'>"; + echo "<a href='".XOOPS_URL."/modules/system/admin.php?fct=".$file."'><b>" .trim($modversion['name'])."</b></a>\n"; + echo "</td>"; + $counter++; + $class = ($class == 'even') ? 'odd' : 'even'; } - unset($modversion); + if ( $counter > 4 ) { + $counter = 0; + echo "</tr>"; + echo "<tr>"; + } } + unset($modversion); } + unset($dirlist); while ($counter < 5) { echo '<td class="'.$class.'"> </td>'; $class = ($class == 'even') ? 'odd' : 'even'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: - 2006-05-27 22:14:25
|
<html> <head> <meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 6.0"> <meta name=3D"ProgId" content=3D"FrontPage.Editor.Document"> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dbig5"> <title>=A5v=A4W=B3=CC=B1j=A1B=A5H=A4H=AC=B0=A5=BB=AA=BA=B3]=ADp</title> </head> <body> <p><font size=3D"6" color=3D"#FF0000"><b><span style=3D"font-family: =B7s=B2= =D3=A9=FA=C5=E9"> <a href=3D"http://home.graffiti.net/go4u/Rain.htm">=A5v=A4W=B3=CC=B1j=A1u=AB= B=A6=E7=A1v=A5=CD</a></font></p> <p><span style=3D"font-size: 13.5pt; font-family: =B7s=B2=D3=A9=FA=C5=E9">= =A1i=ACY=B9q=A4l=BA=F4 =B0O=AA=CC=B3=AF=A5=FD=A5=CD=A1=FE=A5x=A5_=B3=F8=BE= =C9=A1j</span></p> </body> </html> |
|
From: <sk...@us...> - 2006-05-27 01:17:12
|
Revision: 512 Author: skalpa Date: 2006-05-26 18:16:37 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=512&view=rev Log Message: ----------- Fixed the auth layer MySQL incompatibility problem, and added the auth class to the trunk as it didnt do through the previous merge Modified Paths: -------------- XoopsCore/trunk/htdocs/install/index.php XoopsCore/trunk/htdocs/install/makedata.php XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/index.php Added Paths: ----------- XoopsCore/trunk/htdocs/cache/index.html XoopsCore/trunk/htdocs/class/auth/ XoopsCore/trunk/htdocs/class/auth/auth.php XoopsCore/trunk/htdocs/class/auth/auth_ads.php XoopsCore/trunk/htdocs/class/auth/auth_ldap.php XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php XoopsCore/trunk/htdocs/class/auth/auth_xoops.php XoopsCore/trunk/htdocs/class/auth/authfactory.php XoopsCore/trunk/htdocs/class/auth/index.html Removed Paths: ------------- XoopsCore/trunk/htdocs/class/auth/auth.php XoopsCore/trunk/htdocs/class/auth/auth_ads.php XoopsCore/trunk/htdocs/class/auth/auth_ldap.php XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php XoopsCore/trunk/htdocs/class/auth/auth_xoops.php XoopsCore/trunk/htdocs/class/auth/authfactory.php XoopsCore/trunk/htdocs/class/auth/index.html Copied: XoopsCore/trunk/htdocs/cache/index.html (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html) =================================================================== --- XoopsCore/trunk/htdocs/cache/index.html (rev 0) +++ XoopsCore/trunk/htdocs/cache/index.html 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth) Deleted: XoopsCore/trunk/htdocs/class/auth/auth.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/auth.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,107 +0,0 @@ -<?php -// $Id$ -// auth.php - defines abstract authentification wrapper class -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification base class - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class XoopsAuth { - - var $_dao; - - var $_errors; - /** - * Authentication Service constructor - */ - function XoopsAuth (&$dao){ - $this->_dao = $dao; - } - - /** - * @abstract need to be write in the dervied class - */ - function authenticate() { - $authenticated = false; - - return $authenticated; - } - - /** - * add an error - * - * @param string $value error to add - * @access public - */ - function setErrors($err_no, $err_str) - { - $this->_errors[$err_no] = trim($err_str); - } - - /** - * return the errors for this object as an array - * - * @return array an array of errors - * @access public - */ - function getErrors() - { - return $this->_errors; - } - - /** - * return the errors for this object as html - * - * @return string html listing the errors - * @access public - */ - function getHtmlErrors() - { - /* - if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) { - include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php"; - } else { - include_once XOOPS_ROOT_PATH."/language/english/error.php"; - }*/ - //$ret = '<h4>'._ERRORS.'</h4>'; - $ret = '<br>'; - if (!empty($this->_errors)) { - foreach ($this->_errors as $errno => $errstr) { - // $msg = (function_exists(ldap_err2str) ? ldap_err2str ($errno) : ''); - $ret .= $errstr . '<br/>'; - } - } else { - $ret .= _NONE.'<br />'; - } - $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); - return $ret; - } -} - -?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth/auth.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/auth.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/auth.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,107 @@ +<?php +// $Id$ +// auth.php - defines abstract authentification wrapper class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification base class + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuth { + + var $_dao; + + var $_errors; + /** + * Authentication Service constructor + */ + function XoopsAuth (&$dao){ + $this->_dao = $dao; + } + + /** + * @abstract need to be write in the dervied class + */ + function authenticate() { + $authenticated = false; + + return $authenticated; + } + + /** + * add an error + * + * @param string $value error to add + * @access public + */ + function setErrors($err_no, $err_str) + { + $this->_errors[$err_no] = trim($err_str); + } + + /** + * return the errors for this object as an array + * + * @return array an array of errors + * @access public + */ + function getErrors() + { + return $this->_errors; + } + + /** + * return the errors for this object as html + * + * @return string html listing the errors + * @access public + */ + function getHtmlErrors() + { + /* + if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) { + include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php"; + } else { + include_once XOOPS_ROOT_PATH."/language/english/error.php"; + }*/ + //$ret = '<h4>'._ERRORS.'</h4>'; + $ret = '<br>'; + if (!empty($this->_errors)) { + foreach ($this->_errors as $errno => $errstr) { + // $msg = (function_exists(ldap_err2str) ? ldap_err2str ($errno) : ''); + $ret .= $errstr . '<br/>'; + } + } else { + $ret .= _NONE.'<br />'; + } + $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); + return $ret; + } +} + +?> \ No newline at end of file Deleted: XoopsCore/trunk/htdocs/class/auth/auth_ads.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/auth_ads.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,102 +0,0 @@ -<?php -// $Id$ -// auth_ads.php - Authentification class for Active Directory -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification class for Active Directory - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -include_once XOOPS_ROOT_PATH . '/class/auth/auth_ldap.php'; - -class XoopsAuthAds extends XoopsAuthLdap { - /** - * Authentication Service constructor - */ - function XoopsAuthAds (&$dao) { - parent::XoopsAuthLdap($dao); - } - - /** - * Authenticate user again LDAP directory (Bind) - * 2 options : - * Authenticate directly with uname in the DN - * Authenticate with manager, search the dn - * - * @param string $uname Username - * @param string $pwd Password - * - * @return bool - */ - function authenticate($uname, $pwd = null) { - $authenticated = false; - if (!extension_loaded('ldap')) { - $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); - return $authenticated; - } - $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); - if ($this->_ds) { - @ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); - // If the uid is not in the DN we proceed to a search - // The uid is not always in the dn - $userUPN = $this->getUPN($uname); - if (!$userUPN) return false; - // We bind as user to test the credentials - $authenticated = ldap_bind($this->_ds, $userUPN, stripslashes($pwd)); - if ($authenticated) { - // We load the Xoops User database - $dn = $this->getUserDN($uname); - return $this->loadXoopsUser($dn, $uname, $pwd); - } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userUPN . ')'); - } - else { - $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); - } - @ldap_close($this->_ds); - return $authenticated; - } - - - /** - * Return the UPN = userPrincipalName (Active Directory) - * userPrincipalName = gu...@CP... Often abbreviated to UPN, and - * looks like an email address. Very useful for logging on especially in - * a large Forest. Note UPN must be unique in the forest. - * - * @return userDN or false - */ - function getUPN($uname) { - $userDN = false; - $userDN = $uname."@".$this->ldap_domain_name; - return $userDN; - } - -} // end class - - -?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth/auth_ads.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/auth_ads.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/auth_ads.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,102 @@ +<?php +// $Id$ +// auth_ads.php - Authentification class for Active Directory +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for Active Directory + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +include_once XOOPS_ROOT_PATH . '/class/auth/auth_ldap.php'; + +class XoopsAuthAds extends XoopsAuthLdap { + /** + * Authentication Service constructor + */ + function XoopsAuthAds (&$dao) { + parent::XoopsAuthLdap($dao); + } + + /** + * Authenticate user again LDAP directory (Bind) + * 2 options : + * Authenticate directly with uname in the DN + * Authenticate with manager, search the dn + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + if (!extension_loaded('ldap')) { + $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); + return $authenticated; + } + $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); + if ($this->_ds) { + @ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); + // If the uid is not in the DN we proceed to a search + // The uid is not always in the dn + $userUPN = $this->getUPN($uname); + if (!$userUPN) return false; + // We bind as user to test the credentials + $authenticated = ldap_bind($this->_ds, $userUPN, stripslashes($pwd)); + if ($authenticated) { + // We load the Xoops User database + $dn = $this->getUserDN($uname); + return $this->loadXoopsUser($dn, $uname, $pwd); + } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userUPN . ')'); + } + else { + $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); + } + @ldap_close($this->_ds); + return $authenticated; + } + + + /** + * Return the UPN = userPrincipalName (Active Directory) + * userPrincipalName = gu...@CP... Often abbreviated to UPN, and + * looks like an email address. Very useful for logging on especially in + * a large Forest. Note UPN must be unique in the forest. + * + * @return userDN or false + */ + function getUPN($uname) { + $userDN = false; + $userDN = $uname."@".$this->ldap_domain_name; + return $userDN; + } + +} // end class + + +?> \ No newline at end of file Deleted: XoopsCore/trunk/htdocs/class/auth/auth_ldap.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/auth_ldap.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,187 +0,0 @@ -<?php -// $Id$ -// auth_ldap.php - LDAP authentification class -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification class for standard LDAP Server V2 or V3 - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; - -class XoopsAuthLdap extends XoopsAuth { - - var $ldap_server; - var $ldap_port = '389'; - var $ldap_version = '3'; - var $ldap_base_dn; - var $ldap_loginname_asdn; - var $ldap_loginldap_attr; - var $ldap_mail_attr; - var $ldap_name_attr; - var $ldap_surname_attr; - var $ldap_givenname_attr; - var $ldap_manager_dn; - var $ldap_manager_pass; - var $_ds; - - /** - * Authentication Service constructor - */ - function XoopsAuthLdap (&$dao) { - $this->_dao = $dao; - //The config handler object allows us to look at the configuration options that are stored in the database - $config_handler =& xoops_gethandler('config'); - $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); - $confcount = count($config); - foreach ($config as $key => $val) { - $this->$key = $val; - } - } - - /** - * Authenticate user again LDAP directory (Bind) - * 2 options : - * Authenticate directly with uname in the DN - * Authenticate with manager, search the dn - * - * @param string $uname Username - * @param string $pwd Password - * - * @return bool - */ - function authenticate($uname, $pwd = null) { - $authenticated = false; - if (!extension_loaded('ldap')) { - $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); - return $authenticated; - } - $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); - if ($this->_ds) { - ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); - // If the uid is not in the DN we proceed to a search - // The uid is not always in the dn - $userDN = $this->getUserDN($uname); - if (!$userDN) return false; - // We bind as user to test the credentials - $authenticated = ldap_bind($this->_ds, $userDN, stripslashes($pwd)); - if ($authenticated) { - // We load the Xoops User database - return $this->loadXoopsUser($userDN, $uname, $pwd); - } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userDN . ')'); - } - else { - $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); - } - @ldap_close($this->_ds); - return $authenticated; - } - - - /** - * Compose the user DN with the configuration. - * - * - * @return userDN or false - */ - function getUserDN($uname) { - $userDN = false; - if (!$this->ldap_loginname_asdn) { - // Bind with the manager - /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { - $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); - return false; - }*/ - $filter = $this->getFilter($uname); - $sr = ldap_search($this->_ds, $this->ldap_base_dn, $filter); - $info = ldap_get_entries($this->_ds, $sr); - if ($info["count"] > 0) { - $userDN = $info[0]['dn']; - } else $this->setErrors(0, sprintf(_AUTH_LDAP_USER_NOT_FOUND, $uname, $filter, $this->ldap_base_dn)); - } - else { - $userDN = $this->ldap_loginldap_attr."=".$uname.",".$this->ldap_base_dn; - } - return $userDN; - } - - /** - * Load user from XOOPS Database - * - * @return XoopsUser object - */ - function getFilter($uname) { - $filter = ''; - if ($this->ldap_filter_person != '') { - $filter = str_replace('@@loginname@@',$uname, $this->ldap_filter_person); - } - else { - $filter = $this->ldap_loginldap_attr . "=" . $uname; - } - return $filter; - } - - - function loadXoopsUser($userdn, $uname, $pwd = null) { - $xoopsUser = XoopsAuthProvisionning::getXoopsUser($uname); - if (!$xoopsUser) { - if ($this->ldap_provisionning) { - $newuser = $this->createXoopsUser($userdn, $uname, $pwd); - return $newuser; - } else $this->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); - } - return $xoopsUser; - } - - /** - * Create user in the XOOPS Database - * - * - * @return userDN or false - */ - function createXoopsUser($dn, $uname, $pwd = null) { - $newuser = false; - include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; - $provisHandler = XoopsAuthProvisionning::getInstance(); - // $member_handler =& xoops_gethandler('member'); - /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { - $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); - return $ret; - }*/ - $sr = ldap_read($this->_ds, $dn, '(objectclass=*)'); - $entries = ldap_get_entries($this->_ds, $sr); - if ($entries["count"] > 0) { - $newuser = $provisHandler->sync($entries[0], $uname, $pwd); - } - else $this->setErrors(0, sprintf(_AUTH_LDAP_CANT_READ_ENTRY, $dn)); - return $newuser; - } - -} // end class - -?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth/auth_ldap.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/auth_ldap.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/auth_ldap.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,187 @@ +<?php +// $Id$ +// auth_ldap.php - LDAP authentification class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for standard LDAP Server V2 or V3 + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; + +class XoopsAuthLdap extends XoopsAuth { + + var $ldap_server; + var $ldap_port = '389'; + var $ldap_version = '3'; + var $ldap_base_dn; + var $ldap_loginname_asdn; + var $ldap_loginldap_attr; + var $ldap_mail_attr; + var $ldap_name_attr; + var $ldap_surname_attr; + var $ldap_givenname_attr; + var $ldap_manager_dn; + var $ldap_manager_pass; + var $_ds; + + /** + * Authentication Service constructor + */ + function XoopsAuthLdap (&$dao) { + $this->_dao = $dao; + //The config handler object allows us to look at the configuration options that are stored in the database + $config_handler =& xoops_gethandler('config'); + $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + $confcount = count($config); + foreach ($config as $key => $val) { + $this->$key = $val; + } + } + + /** + * Authenticate user again LDAP directory (Bind) + * 2 options : + * Authenticate directly with uname in the DN + * Authenticate with manager, search the dn + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + if (!extension_loaded('ldap')) { + $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); + return $authenticated; + } + $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); + if ($this->_ds) { + ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); + // If the uid is not in the DN we proceed to a search + // The uid is not always in the dn + $userDN = $this->getUserDN($uname); + if (!$userDN) return false; + // We bind as user to test the credentials + $authenticated = ldap_bind($this->_ds, $userDN, stripslashes($pwd)); + if ($authenticated) { + // We load the Xoops User database + return $this->loadXoopsUser($userDN, $uname, $pwd); + } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userDN . ')'); + } + else { + $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); + } + @ldap_close($this->_ds); + return $authenticated; + } + + + /** + * Compose the user DN with the configuration. + * + * + * @return userDN or false + */ + function getUserDN($uname) { + $userDN = false; + if (!$this->ldap_loginname_asdn) { + // Bind with the manager + /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { + $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); + return false; + }*/ + $filter = $this->getFilter($uname); + $sr = ldap_search($this->_ds, $this->ldap_base_dn, $filter); + $info = ldap_get_entries($this->_ds, $sr); + if ($info["count"] > 0) { + $userDN = $info[0]['dn']; + } else $this->setErrors(0, sprintf(_AUTH_LDAP_USER_NOT_FOUND, $uname, $filter, $this->ldap_base_dn)); + } + else { + $userDN = $this->ldap_loginldap_attr."=".$uname.",".$this->ldap_base_dn; + } + return $userDN; + } + + /** + * Load user from XOOPS Database + * + * @return XoopsUser object + */ + function getFilter($uname) { + $filter = ''; + if ($this->ldap_filter_person != '') { + $filter = str_replace('@@loginname@@',$uname, $this->ldap_filter_person); + } + else { + $filter = $this->ldap_loginldap_attr . "=" . $uname; + } + return $filter; + } + + + function loadXoopsUser($userdn, $uname, $pwd = null) { + $xoopsUser = XoopsAuthProvisionning::getXoopsUser($uname); + if (!$xoopsUser) { + if ($this->ldap_provisionning) { + $newuser = $this->createXoopsUser($userdn, $uname, $pwd); + return $newuser; + } else $this->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); + } + return $xoopsUser; + } + + /** + * Create user in the XOOPS Database + * + * + * @return userDN or false + */ + function createXoopsUser($dn, $uname, $pwd = null) { + $newuser = false; + include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; + $provisHandler = XoopsAuthProvisionning::getInstance(); + // $member_handler =& xoops_gethandler('member'); + /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { + $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); + return $ret; + }*/ + $sr = ldap_read($this->_ds, $dn, '(objectclass=*)'); + $entries = ldap_get_entries($this->_ds, $sr); + if ($entries["count"] > 0) { + $newuser = $provisHandler->sync($entries[0], $uname, $pwd); + } + else $this->setErrors(0, sprintf(_AUTH_LDAP_CANT_READ_ENTRY, $dn)); + return $newuser; + } + +} // end class + +?> \ No newline at end of file Deleted: XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,149 +0,0 @@ -<?php -// $Id$ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification provisionning class. This class is responsible to - * provide synchronisation method to Xoops User Database - * - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class XoopsAuthProvisionning { - - - function &getInstance() - { - static $provis_instance; - if (!isset($provis_instance)) { - $provis_instance = new XoopsAuthProvisionning(); - } - return $provis_instance; - } - - /** - * Authentication Service constructor - */ - function XoopsAuthProvisionning () { - $config_handler =& xoops_gethandler('config'); - $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); - foreach ($config as $key => $val) { - $this->$key = $val; - } - } - - /** - * Return a Xoops User Object - * - * @return XoopsUser or false - */ - function getXoopsUser($uname) { - $member_handler =& xoops_gethandler('member'); - $criteria = new Criteria('uname', $uname); - $getuser = $member_handler->getUsers($criteria); - if (count($getuser) == 1) - return $getuser[0]; - else return false; - } - - /** - * Launch the synchronisation process - * - * @return bool - */ - function sync($datas, $uname, $pwd = null) { - $ret = false; - $member_handler =& xoops_gethandler('member'); - // Create XOOPS Database User - $newuser = $member_handler->createUser(); - $newuser->setVar('uname', $uname); - $newuser->setVar('name', utf8_decode($datas[$this->ldap_givenname_attr][0]) . ' ' . utf8_decode($datas[$this->ldap_surname_attr][0])); - $newuser->setVar('email', $datas[$this->ldap_mail_attr][0]); - $newuser->setVar('pass', md5(stripslashes($pwd))); - $newuser->setVar('rank', 0); - $newuser->setVar('level', 1); - if ($member_handler->insertUser($newuser)) { - foreach ($this->ldap_provisionning_group as $groupid) - $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); - $newuser->unsetNew(); - return $newuser; - } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); - return $ret; - } - - /** - * Add a new user to the system - * - * @return bool - */ - function add() { - } - - /** - * Add a new user to the system - * - * @return bool - */ - function change() { - } - - /** - * Modify a user - * - * @return bool - */ - function delete() { - } - - /** - * Suspend a user - * - * @return bool - */ - function suspend() { - } - - /** - * Restore a user - * - * @return bool - */ - function restore() { - } - - /** - * Add a new user to the system - * - * @return bool - */ - function resetpwd() { - } - - -} // end class - -?> Copied: XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/auth_provisionning.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,149 @@ +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification provisionning class. This class is responsible to + * provide synchronisation method to Xoops User Database + * + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuthProvisionning { + + + function &getInstance() + { + static $provis_instance; + if (!isset($provis_instance)) { + $provis_instance = new XoopsAuthProvisionning(); + } + return $provis_instance; + } + + /** + * Authentication Service constructor + */ + function XoopsAuthProvisionning () { + $config_handler =& xoops_gethandler('config'); + $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + foreach ($config as $key => $val) { + $this->$key = $val; + } + } + + /** + * Return a Xoops User Object + * + * @return XoopsUser or false + */ + function getXoopsUser($uname) { + $member_handler =& xoops_gethandler('member'); + $criteria = new Criteria('uname', $uname); + $getuser = $member_handler->getUsers($criteria); + if (count($getuser) == 1) + return $getuser[0]; + else return false; + } + + /** + * Launch the synchronisation process + * + * @return bool + */ + function sync($datas, $uname, $pwd = null) { + $ret = false; + $member_handler =& xoops_gethandler('member'); + // Create XOOPS Database User + $newuser = $member_handler->createUser(); + $newuser->setVar('uname', $uname); + $newuser->setVar('name', utf8_decode($datas[$this->ldap_givenname_attr][0]) . ' ' . utf8_decode($datas[$this->ldap_surname_attr][0])); + $newuser->setVar('email', $datas[$this->ldap_mail_attr][0]); + $newuser->setVar('pass', md5(stripslashes($pwd))); + $newuser->setVar('rank', 0); + $newuser->setVar('level', 1); + if ($member_handler->insertUser($newuser)) { + foreach ($this->ldap_provisionning_group as $groupid) + $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); + $newuser->unsetNew(); + return $newuser; + } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + return $ret; + } + + /** + * Add a new user to the system + * + * @return bool + */ + function add() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function change() { + } + + /** + * Modify a user + * + * @return bool + */ + function delete() { + } + + /** + * Suspend a user + * + * @return bool + */ + function suspend() { + } + + /** + * Restore a user + * + * @return bool + */ + function restore() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function resetpwd() { + } + + +} // end class + +?> Deleted: XoopsCore/trunk/htdocs/class/auth/auth_xoops.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/auth_xoops.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,64 +0,0 @@ -<?php -// $Id$ -// auth_xoops.php - XOOPS authentification class -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification class for Native XOOPS - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2003 XOOPS.org - */ -class XoopsAuthXoops extends XoopsAuth { - - - /** - * Authentication Service constructor - */ - function XoopsAuthXoops (&$dao) { - $this->_dao = $dao; - } - - /** - * Authenticate user - * - * @param string $uname - * @param string $pwd - * - * @return bool - */ - function authenticate($uname, $pwd = null) { - $member_handler =& xoops_gethandler('member'); - $user =& $member_handler->loginUser($uname, $pwd); - if ($user == false) { - $this->setErrors(1, _US_INCORRECTLOGIN . $uname); - } - return ($user); - } - -} - -?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth/auth_xoops.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/auth_xoops.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/auth_xoops.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,64 @@ +<?php +// $Id$ +// auth_xoops.php - XOOPS authentification class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for Native XOOPS + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuthXoops extends XoopsAuth { + + + /** + * Authentication Service constructor + */ + function XoopsAuthXoops (&$dao) { + $this->_dao = $dao; + } + + /** + * Authenticate user + * + * @param string $uname + * @param string $pwd + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $member_handler =& xoops_gethandler('member'); + $user =& $member_handler->loginUser($uname, $pwd); + if ($user == false) { + $this->setErrors(1, _US_INCORRECTLOGIN . $uname); + } + return ($user); + } + +} + +?> \ No newline at end of file Deleted: XoopsCore/trunk/htdocs/class/auth/authfactory.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php 2006-05-27 01:07:20 UTC (rev 511) +++ XoopsCore/trunk/htdocs/class/auth/authfactory.php 2006-05-27 01:16:37 UTC (rev 512) @@ -1,83 +0,0 @@ -<?php -// $Id$ -// authfactory.php - Authentification class factory -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -/** - * @package kernel - * @subpackage auth - * @description Authentification class factory - * @author Pierre-Eric MENUET <pe...@fr...> - * @copyright copyright (c) 2000-2005 XOOPS.org - */ -class XoopsAuthFactory -{ - - /** - * Get a reference to the only instance of authentication class - * - * if the class has not been instantiated yet, this will also take - * care of that - * - * @static - * @return object Reference to the only instance of authentication class - */ - function &getAuthConnection($uname) - { - static $auth_instance; - if (!isset($auth_instance)) { - $config_handler =& xoops_gethandler('config'); - $authConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); - require_once XOOPS_ROOT_PATH.'/class/auth/auth.php'; - if (!$authConfig) { // If there is a config error, we use xoops - $xoops_auth_method = 'xoops'; - } else { - $xoops_auth_method = $authConfig['auth_method']; - } - // Verify if uname allow to bypass LDAP auth - if (in_array($uname, $authConfig['ldap_users_bypass'])) $xoops_auth_method = 'xoops'; - $file = XOOPS_ROOT_PATH . '/class/auth/auth_' . $xoops_auth_method . '.php'; - require_once $file; - $class = 'XoopsAuth' . ucfirst($xoops_auth_method); - switch ($xoops_auth_method) { - case 'xoops' : - $dao =& $GLOBALS['xoopsDB']; - break; - case 'ldap' : - $dao = null; - break; - case 'ads' : - $dao = null; - break; - - } - $auth_instance = new $class($dao); - } - return $auth_instance; - } - -} - -?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/auth/authfactory.php (from rev 511, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php) =================================================================== --- XoopsCore/trunk/htdocs/class/auth/authfactory.php (rev 0) +++ XoopsCore/trunk/htdocs/class/auth/authfactory.php 2006-05-27 01:16:37 UTC (rev 512) @@ -0,0 +1,83 @@ +<?php +// $Id$ +// authfactory.php - Authentification class factory +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class factory + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2005 XOOPS.org + */ +class XoopsAuthFactory +{ + + /** + * Get a reference to the only instance of authentication class + * + * if the class has not been instantiated yet, this will also take + * care of that + * + * @static + * @return object Reference to the only instance of authentication class + */ + function &getAuthConnection($uname) + { + static $auth_instance; + if (!isset($auth_instance)) { + $config_handler =& xoops_gethandler('config'); + $authConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + require_once XOOPS_ROOT_PATH.'/class/auth/auth.php'; + if (!$authConfig) ... [truncated message content] |
|
From: <sk...@us...> - 2006-05-27 01:07:49
|
Revision: 511 Author: skalpa Date: 2006-05-26 18:07:20 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=511&view=rev Log Message: ----------- Fixed the auth layer MySQL incompatibility problem, and added the auth class to this as it didnt do through the previous merge Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0-main/htdocs/install/index.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/makedata.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/index.php Added Paths: ----------- XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/index.html Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/cache/index.html ___________________________________________________________________ Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,107 @@ +<?php +// $Id$ +// auth.php - defines abstract authentification wrapper class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification base class + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuth { + + var $_dao; + + var $_errors; + /** + * Authentication Service constructor + */ + function XoopsAuth (&$dao){ + $this->_dao = $dao; + } + + /** + * @abstract need to be write in the dervied class + */ + function authenticate() { + $authenticated = false; + + return $authenticated; + } + + /** + * add an error + * + * @param string $value error to add + * @access public + */ + function setErrors($err_no, $err_str) + { + $this->_errors[$err_no] = trim($err_str); + } + + /** + * return the errors for this object as an array + * + * @return array an array of errors + * @access public + */ + function getErrors() + { + return $this->_errors; + } + + /** + * return the errors for this object as html + * + * @return string html listing the errors + * @access public + */ + function getHtmlErrors() + { + /* + if ( file_exists(XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php") ) { + include_once XOOPS_ROOT_PATH."/language/".$GLOBALS['xoopsConfig']['language']."/error.php"; + } else { + include_once XOOPS_ROOT_PATH."/language/english/error.php"; + }*/ + //$ret = '<h4>'._ERRORS.'</h4>'; + $ret = '<br>'; + if (!empty($this->_errors)) { + foreach ($this->_errors as $errno => $errstr) { + // $msg = (function_exists(ldap_err2str) ? ldap_err2str ($errno) : ''); + $ret .= $errstr . '<br/>'; + } + } else { + $ret .= _NONE.'<br />'; + } + $ret .= sprintf(_AUTH_MSG_AUTH_METHOD, $this->auth_method); + return $ret; + } +} + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,102 @@ +<?php +// $Id$ +// auth_ads.php - Authentification class for Active Directory +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for Active Directory + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +include_once XOOPS_ROOT_PATH . '/class/auth/auth_ldap.php'; + +class XoopsAuthAds extends XoopsAuthLdap { + /** + * Authentication Service constructor + */ + function XoopsAuthAds (&$dao) { + parent::XoopsAuthLdap($dao); + } + + /** + * Authenticate user again LDAP directory (Bind) + * 2 options : + * Authenticate directly with uname in the DN + * Authenticate with manager, search the dn + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + if (!extension_loaded('ldap')) { + $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); + return $authenticated; + } + $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); + if ($this->_ds) { + @ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); + // If the uid is not in the DN we proceed to a search + // The uid is not always in the dn + $userUPN = $this->getUPN($uname); + if (!$userUPN) return false; + // We bind as user to test the credentials + $authenticated = ldap_bind($this->_ds, $userUPN, stripslashes($pwd)); + if ($authenticated) { + // We load the Xoops User database + $dn = $this->getUserDN($uname); + return $this->loadXoopsUser($dn, $uname, $pwd); + } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userUPN . ')'); + } + else { + $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); + } + @ldap_close($this->_ds); + return $authenticated; + } + + + /** + * Return the UPN = userPrincipalName (Active Directory) + * userPrincipalName = gu...@CP... Often abbreviated to UPN, and + * looks like an email address. Very useful for logging on especially in + * a large Forest. Note UPN must be unique in the forest. + * + * @return userDN or false + */ + function getUPN($uname) { + $userDN = false; + $userDN = $uname."@".$this->ldap_domain_name; + return $userDN; + } + +} // end class + + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ads.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,187 @@ +<?php +// $Id$ +// auth_ldap.php - LDAP authentification class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for standard LDAP Server V2 or V3 + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; + +class XoopsAuthLdap extends XoopsAuth { + + var $ldap_server; + var $ldap_port = '389'; + var $ldap_version = '3'; + var $ldap_base_dn; + var $ldap_loginname_asdn; + var $ldap_loginldap_attr; + var $ldap_mail_attr; + var $ldap_name_attr; + var $ldap_surname_attr; + var $ldap_givenname_attr; + var $ldap_manager_dn; + var $ldap_manager_pass; + var $_ds; + + /** + * Authentication Service constructor + */ + function XoopsAuthLdap (&$dao) { + $this->_dao = $dao; + //The config handler object allows us to look at the configuration options that are stored in the database + $config_handler =& xoops_gethandler('config'); + $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + $confcount = count($config); + foreach ($config as $key => $val) { + $this->$key = $val; + } + } + + /** + * Authenticate user again LDAP directory (Bind) + * 2 options : + * Authenticate directly with uname in the DN + * Authenticate with manager, search the dn + * + * @param string $uname Username + * @param string $pwd Password + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $authenticated = false; + if (!extension_loaded('ldap')) { + $this->setErrors(0, _AUTH_LDAP_EXTENSION_NOT_LOAD); + return $authenticated; + } + $this->_ds = ldap_connect($this->ldap_server, $this->ldap_port); + if ($this->_ds) { + ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION, $this->ldap_version); + // If the uid is not in the DN we proceed to a search + // The uid is not always in the dn + $userDN = $this->getUserDN($uname); + if (!$userDN) return false; + // We bind as user to test the credentials + $authenticated = ldap_bind($this->_ds, $userDN, stripslashes($pwd)); + if ($authenticated) { + // We load the Xoops User database + return $this->loadXoopsUser($userDN, $uname, $pwd); + } else $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $userDN . ')'); + } + else { + $this->setErrors(0, _AUTH_LDAP_SERVER_NOT_FOUND); + } + @ldap_close($this->_ds); + return $authenticated; + } + + + /** + * Compose the user DN with the configuration. + * + * + * @return userDN or false + */ + function getUserDN($uname) { + $userDN = false; + if (!$this->ldap_loginname_asdn) { + // Bind with the manager + /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { + $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); + return false; + }*/ + $filter = $this->getFilter($uname); + $sr = ldap_search($this->_ds, $this->ldap_base_dn, $filter); + $info = ldap_get_entries($this->_ds, $sr); + if ($info["count"] > 0) { + $userDN = $info[0]['dn']; + } else $this->setErrors(0, sprintf(_AUTH_LDAP_USER_NOT_FOUND, $uname, $filter, $this->ldap_base_dn)); + } + else { + $userDN = $this->ldap_loginldap_attr."=".$uname.",".$this->ldap_base_dn; + } + return $userDN; + } + + /** + * Load user from XOOPS Database + * + * @return XoopsUser object + */ + function getFilter($uname) { + $filter = ''; + if ($this->ldap_filter_person != '') { + $filter = str_replace('@@loginname@@',$uname, $this->ldap_filter_person); + } + else { + $filter = $this->ldap_loginldap_attr . "=" . $uname; + } + return $filter; + } + + + function loadXoopsUser($userdn, $uname, $pwd = null) { + $xoopsUser = XoopsAuthProvisionning::getXoopsUser($uname); + if (!$xoopsUser) { + if ($this->ldap_provisionning) { + $newuser = $this->createXoopsUser($userdn, $uname, $pwd); + return $newuser; + } else $this->setErrors(0, sprintf(_AUTH_LDAP_XOOPS_USER_NOTFOUND, $uname)); + } + return $xoopsUser; + } + + /** + * Create user in the XOOPS Database + * + * + * @return userDN or false + */ + function createXoopsUser($dn, $uname, $pwd = null) { + $newuser = false; + include_once XOOPS_ROOT_PATH . '/class/auth/auth_provisionning.php'; + $provisHandler = XoopsAuthProvisionning::getInstance(); + // $member_handler =& xoops_gethandler('member'); + /* if (!ldap_bind($this->_ds, $this->ldap_manager_dn, stripslashes($this->ldap_manager_pass))) { + $this->setErrors(ldap_errno($this->_ds), ldap_err2str(ldap_errno($this->_ds)) . '(' . $this->ldap_manager_dn . ')'); + return $ret; + }*/ + $sr = ldap_read($this->_ds, $dn, '(objectclass=*)'); + $entries = ldap_get_entries($this->_ds, $sr); + if ($entries["count"] > 0) { + $newuser = $provisHandler->sync($entries[0], $uname, $pwd); + } + else $this->setErrors(0, sprintf(_AUTH_LDAP_CANT_READ_ENTRY, $dn)); + return $newuser; + } + +} // end class + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_ldap.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,149 @@ +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification provisionning class. This class is responsible to + * provide synchronisation method to Xoops User Database + * + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuthProvisionning { + + + function &getInstance() + { + static $provis_instance; + if (!isset($provis_instance)) { + $provis_instance = new XoopsAuthProvisionning(); + } + return $provis_instance; + } + + /** + * Authentication Service constructor + */ + function XoopsAuthProvisionning () { + $config_handler =& xoops_gethandler('config'); + $config =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + foreach ($config as $key => $val) { + $this->$key = $val; + } + } + + /** + * Return a Xoops User Object + * + * @return XoopsUser or false + */ + function getXoopsUser($uname) { + $member_handler =& xoops_gethandler('member'); + $criteria = new Criteria('uname', $uname); + $getuser = $member_handler->getUsers($criteria); + if (count($getuser) == 1) + return $getuser[0]; + else return false; + } + + /** + * Launch the synchronisation process + * + * @return bool + */ + function sync($datas, $uname, $pwd = null) { + $ret = false; + $member_handler =& xoops_gethandler('member'); + // Create XOOPS Database User + $newuser = $member_handler->createUser(); + $newuser->setVar('uname', $uname); + $newuser->setVar('name', utf8_decode($datas[$this->ldap_givenname_attr][0]) . ' ' . utf8_decode($datas[$this->ldap_surname_attr][0])); + $newuser->setVar('email', $datas[$this->ldap_mail_attr][0]); + $newuser->setVar('pass', md5(stripslashes($pwd))); + $newuser->setVar('rank', 0); + $newuser->setVar('level', 1); + if ($member_handler->insertUser($newuser)) { + foreach ($this->ldap_provisionning_group as $groupid) + $member_handler->addUserToGroup($groupid, $newuser->getVar('uid')); + $newuser->unsetNew(); + return $newuser; + } else redirect_header(XOOPS_URL.'/user.php', 5, $newuser->getHtmlErrors()); + return $ret; + } + + /** + * Add a new user to the system + * + * @return bool + */ + function add() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function change() { + } + + /** + * Modify a user + * + * @return bool + */ + function delete() { + } + + /** + * Suspend a user + * + * @return bool + */ + function suspend() { + } + + /** + * Restore a user + * + * @return bool + */ + function restore() { + } + + /** + * Add a new user to the system + * + * @return bool + */ + function resetpwd() { + } + + +} // end class + +?> Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_provisionning.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,64 @@ +<?php +// $Id$ +// auth_xoops.php - XOOPS authentification class +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class for Native XOOPS + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2003 XOOPS.org + */ +class XoopsAuthXoops extends XoopsAuth { + + + /** + * Authentication Service constructor + */ + function XoopsAuthXoops (&$dao) { + $this->_dao = $dao; + } + + /** + * Authenticate user + * + * @param string $uname + * @param string $pwd + * + * @return bool + */ + function authenticate($uname, $pwd = null) { + $member_handler =& xoops_gethandler('member'); + $user =& $member_handler->loginUser($uname, $pwd); + if ($user == false) { + $this->setErrors(1, _US_INCORRECTLOGIN . $uname); + } + return ($user); + } + +} + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/auth_xoops.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1,83 @@ +<?php +// $Id$ +// authfactory.php - Authentification class factory +// ------------------------------------------------------------------------ // +// XOOPS - PHP Content Management System // +// Copyright (c) 2000 XOOPS.org // +// <http://www.xoops.org/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +/** + * @package kernel + * @subpackage auth + * @description Authentification class factory + * @author Pierre-Eric MENUET <pe...@fr...> + * @copyright copyright (c) 2000-2005 XOOPS.org + */ +class XoopsAuthFactory +{ + + /** + * Get a reference to the only instance of authentication class + * + * if the class has not been instantiated yet, this will also take + * care of that + * + * @static + * @return object Reference to the only instance of authentication class + */ + function &getAuthConnection($uname) + { + static $auth_instance; + if (!isset($auth_instance)) { + $config_handler =& xoops_gethandler('config'); + $authConfig =& $config_handler->getConfigsByCat(XOOPS_CONF_AUTH); + require_once XOOPS_ROOT_PATH.'/class/auth/auth.php'; + if (!$authConfig) { // If there is a config error, we use xoops + $xoops_auth_method = 'xoops'; + } else { + $xoops_auth_method = $authConfig['auth_method']; + } + // Verify if uname allow to bypass LDAP auth + if (in_array($uname, $authConfig['ldap_users_bypass'])) $xoops_auth_method = 'xoops'; + $file = XOOPS_ROOT_PATH . '/class/auth/auth_' . $xoops_auth_method . '.php'; + require_once $file; + $class = 'XoopsAuth' . ucfirst($xoops_auth_method); + switch ($xoops_auth_method) { + case 'xoops' : + $dao =& $GLOBALS['xoopsDB']; + break; + case 'ldap' : + $dao = null; + break; + case 'ads' : + $dao = null; + break; + + } + $auth_instance = new $class($dao); + } + return $auth_instance; + } + +} + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/authfactory.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/index.html =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/index.html (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/index.html 2006-05-27 01:07:20 UTC (rev 511) @@ -0,0 +1 @@ + <script>history.go(-1);</script> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/auth/index.html ___________________________________________________________________ Name: svn:keywords + "Author Date Id Rev URL" Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/install/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/install/index.php 2006-05-27 00:47:44 UTC (rev 510) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/install/index.php 2006-05-27 01:07:20 UTC (rev 511) @@ -627,8 +627,8 @@ $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','".serialize(array('admin'))."','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); - $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_DESC','yesno','int',9)"); - $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); + $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/install/makedata.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/install/makedata.php 2006-05-27 00:47:44 UTC (rev 510) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/install/makedata.php 2006-05-27 01:07:20 UTC (rev 511) @@ -246,8 +246,8 @@ $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','".serialize(array('admin'))."','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); - $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_DESC','yesno','int',9)"); - $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); + $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/preferences.php 2006-05-27 00:47:44 UTC (rev 510) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/preferences.php 2006-05-27 01:07:20 UTC (rev 511) @@ -212,9 +212,9 @@ define("_MD_AM_LDAP_USERS_BYPASS_DESC", "Xoops User(s) allow to bypass the LDAP login. Login directly in XOOPS<br>Separate each loginname with a |"); define("_MD_AM_LDAP_LOGINLDAP_ATTR","LDAP Attribute use to search the user"); -define("_MD_AM_LDAP_LOGINLDAP_ATTR_DES","When Login name use in the DN option is set to yes, must correspond to the login name XOOPS"); +define("_MD_AM_LDAP_LOGINLDAP_ATTR_D","When Login name use in the DN option is set to yes, must correspond to the login name XOOPS"); define("_MD_AM_LDAP_LOGINNAME_ASDN", "Login name use in the DN"); -define("_MD_AM_LDAP_LOGINNAME_ASDN_DES", "The XOOPS login name is used in the LDAP DN (eg : uid=<loginname>,dc=xoops,dc=org)<br>The entry is directly read in the LDAP Server without search"); +define("_MD_AM_LDAP_LOGINNAME_ASDN_D", "The XOOPS login name is used in the LDAP DN (eg : uid=<loginname>,dc=xoops,dc=org)<br>The entry is directly read in the LDAP Server without search"); define("_MD_AM_LDAP_FILTER_PERSON", "The search filter LDAP query to find user"); define("_MD_AM_LDAP_FILTER_PERSON_DESC", "Special LDAP Filter to find user. @@loginname@@ is replace by the users's login name<br> MUST BE BLANK IF YOU DON'T KNOW WHAT YOU DO' !" . Modified: XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/index.php 2006-05-27 00:47:44 UTC (rev 510) +++ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/index.php 2006-05-27 01:07:20 UTC (rev 511) @@ -157,11 +157,11 @@ if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_loginname_asdn', 'conf_id')) { - $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginname_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN', 'uid_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN_DESC', 'yesno', 'int', 9)"); + $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginname_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN', 'uid_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN_D', 'yesno', 'int', 9)"); if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_loginldap_attr', 'conf_id')) { - $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_filter_person', 'conf_id')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-27 00:47:55
|
Revision: 510 Author: skalpa Date: 2006-05-26 17:47:44 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=510&view=rev Log Message: ----------- Fixed auth layer that is breaking MySQL strict mode (constants names are too long) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php XoopsCore/branches/2.0.x/2.0.14/htdocs/install/makedata.php XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/language/english/admin/preferences.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php 2006-05-27 00:43:46 UTC (rev 509) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/install/index.php 2006-05-27 00:47:44 UTC (rev 510) @@ -627,8 +627,8 @@ $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','".serialize(array('admin'))."','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); - $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_DESC','yesno','int',9)"); - $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); + $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/install/makedata.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/install/makedata.php 2006-05-27 00:43:46 UTC (rev 509) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/install/makedata.php 2006-05-27 00:47:44 UTC (rev 510) @@ -246,8 +246,8 @@ $dbm->insert('config', " VALUES (79,0,7,'ldap_manager_pass','_MD_AM_LDAP_MANAGER_PASS','manager_pass','_MD_AM_LDAP_MANAGER_PASS_DESC','password','text',6)"); $dbm->insert('config', " VALUES (80,0,7,'ldap_version','_MD_AM_LDAP_VERSION','3','_MD_AM_LDAP_VERSION_DESC','textbox','text', 7)"); $dbm->insert('config', " VALUES (81,0,7,'ldap_users_bypass','_MD_AM_LDAP_USERS_BYPASS','".serialize(array('admin'))."','_MD_AM_LDAP_USERS_BYPASS_DESC','textarea','array',8)"); - $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_DESC','yesno','int',9)"); - $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $dbm->insert('config', " VALUES (82,0,7,'ldap_loginname_asdn','_MD_AM_LDAP_LOGINNAME_ASDN','uid_asdn','_MD_AM_LDAP_LOGINNAME_ASDN_D','yesno','int',9)"); + $dbm->insert('config', " VALUES (83,0,7,'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); $dbm->insert('config', " VALUES (84,0,7,'ldap_filter_person','_MD_AM_LDAP_FILTER_PERSON','','_MD_AM_LDAP_FILTER_PERSON_DESC','textbox','text',11)"); $dbm->insert('config', " VALUES (85,0,7,'ldap_domain_name','_MD_AM_LDAP_DOMAIN_NAME','mydomain','_MD_AM_LDAP_DOMAIN_NAME_DESC','textbox','text',12)"); $dbm->insert('config', " VALUES (86,0,7,'ldap_provisionning','_MD_AM_LDAP_PROVIS','0','_MD_AM_LDAP_PROVIS_DESC','yesno','int',13)"); Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/language/english/admin/preferences.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/language/english/admin/preferences.php 2006-05-27 00:43:46 UTC (rev 509) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/modules/system/language/english/admin/preferences.php 2006-05-27 00:47:44 UTC (rev 510) @@ -212,9 +212,9 @@ define("_MD_AM_LDAP_USERS_BYPASS_DESC", "Xoops User(s) allow to bypass the LDAP login. Login directly in XOOPS<br>Separate each loginname with a |"); define("_MD_AM_LDAP_LOGINLDAP_ATTR","LDAP Attribute use to search the user"); -define("_MD_AM_LDAP_LOGINLDAP_ATTR_DES","When Login name use in the DN option is set to yes, must correspond to the login name XOOPS"); +define("_MD_AM_LDAP_LOGINLDAP_ATTR_D","When Login name use in the DN option is set to yes, must correspond to the login name XOOPS"); define("_MD_AM_LDAP_LOGINNAME_ASDN", "Login name use in the DN"); -define("_MD_AM_LDAP_LOGINNAME_ASDN_DES", "The XOOPS login name is used in the LDAP DN (eg : uid=<loginname>,dc=xoops,dc=org)<br>The entry is directly read in the LDAP Server without search"); +define("_MD_AM_LDAP_LOGINNAME_ASDN_D", "The XOOPS login name is used in the LDAP DN (eg : uid=<loginname>,dc=xoops,dc=org)<br>The entry is directly read in the LDAP Server without search"); define("_MD_AM_LDAP_FILTER_PERSON", "The search filter LDAP query to find user"); define("_MD_AM_LDAP_FILTER_PERSON_DESC", "Special LDAP Filter to find user. @@loginname@@ is replace by the users's login name<br> MUST BE BLANK IF YOU DON'T KNOW WHAT YOU DO' !" . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-27 00:43:51
|
Revision: 509 Author: skalpa Date: 2006-05-26 17:43:46 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=509&view=rev Log Message: ----------- Fixed auth layer that is breaking MySQL strict mode (constants names are too long) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php Modified: XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php 2006-05-26 23:50:48 UTC (rev 508) +++ XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php 2006-05-27 00:43:46 UTC (rev 509) @@ -157,11 +157,11 @@ if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_loginname_asdn', 'conf_id')) { - $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginname_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN', 'uid_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN_DESC', 'yesno', 'int', 9)"); + $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginname_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN', 'uid_asdn', '_MD_AM_LDAP_LOGINNAME_ASDN_D', 'yesno', 'int', 9)"); if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_loginldap_attr', 'conf_id')) { - $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_DESC', 'textbox', 'text', 10)"); + $db->query(" INSERT INTO " . $db->prefix("config") . " (conf_catid, conf_name, conf_title, conf_value, conf_desc, conf_formtype, conf_valuetype, conf_order) " . "VALUES ($confcat_id, 'ldap_loginldap_attr', '_MD_AM_LDAP_LOGINLDAP_ATTR', 'uid', '_MD_AM_LDAP_LOGINLDAP_ATTR_D', 'textbox', 'text', 10)"); if (!$ret) $content .= $db->error(); } if (!isValueExist(&$db, 'config', 'conf_name', 'ldap_filter_person', 'conf_id')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 23:50:56
|
Revision: 508 Author: skalpa Date: 2006-05-26 16:50:48 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=508&view=rev Log Message: ----------- Added a link to the HTML version of the release notes (on the devteam site) Modified Paths: -------------- XoopsCore/trunk/release_notes.txt Modified: XoopsCore/trunk/release_notes.txt =================================================================== --- XoopsCore/trunk/release_notes.txt 2006-05-26 23:39:35 UTC (rev 507) +++ XoopsCore/trunk/release_notes.txt 2006-05-26 23:50:48 UTC (rev 508) @@ -1,6 +1,8 @@ XOOPS 2.0.14-RC1 release notes (2006/05/26) ------------------------------------------------------------------------------ +An up-to-date version of this document can be found at: +http://devteam.xoops.org/releases/xoops-2.0.14rc1.html The XOOPS development team is pleased to announce the release of XOOPS 2.0.14-rc1. @@ -14,12 +16,15 @@ * A redesigned theming engine that gives modules writers full control over the output page meta-information. * Enhancements to the templates system that give themes designers total over the output (templates, files and stylesheets can be customized). +(See the full changelog in docs/changelog.txt) + System requirements PHP Any PHP version >= 4.2.1+ MySQL MySQL server 3.23+ + (MySQL 5.x in strict mode is not fully supported) Web server Any server supporting the required PHP version (Apache highly recommended) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 23:46:57
|
Revision: 505 Author: skalpa Date: 2006-05-26 15:50:56 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=505&view=rev Log Message: ----------- Added the 2.0.14rc1 release notes Added Paths: ----------- XoopsCore/branches/2.0.x/2.0.14/release_notes.txt Added: XoopsCore/branches/2.0.x/2.0.14/release_notes.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/release_notes.txt (rev 0) +++ XoopsCore/branches/2.0.x/2.0.14/release_notes.txt 2006-05-26 22:50:56 UTC (rev 505) @@ -0,0 +1,85 @@ + +XOOPS 2.0.14-RC1 release notes (2006/05/26) +------------------------------------------------------------------------------ + +The XOOPS development team is pleased to announce the release of XOOPS 2.0.14-rc1. + +This is mainly a maintenance release containing a lot of bugfixes, but it also provides many enhancements implemented to lessen the gap between the 2.0, 2.2 and 2.3 branches. +What's new + + * Many bug fixes and PHP4.4+ / MySQL 4.1+ compatibility enhancements. + * Many XHTML compliance fixes. + * A new authentication layer suppporting authentication against LDAP and Ms-Active Directory (tm) servers. + * The highly requested possibility to show center blocks below content. + * A redesigned theming engine that gives modules writers full control over the output page meta-information. + * Enhancements to the templates system that give themes designers total over the output (templates, files and stylesheets can be customized). + +System requirements + +PHP + Any PHP version >= 4.2.1+ +MySQL + MySQL server 3.23+ +Web server + Any server supporting the required PHP version (Apache highly recommended) + +Downloading XOOPS + +Your can get this release package from the sourceforge.net file repository. +Both .zip and .tgz archives are provided. +Installing XOOPS + + 1. Copy the content of the htdocs/ folder where it can be accessed by your server + 2. Ensure mainfile.php, cache, templates_c and uploads are writable by the webserver + 3. Access the folder where you installed the htdocs/ files using your web browser to launch the installation wizard + +Upgrading from 2.0.13.2 + + 1. Copy the content of the htdocs/ folder except mainfile.php over your existing installation. + 2. Delete the following folders and files: + * class/smarty/core + * class/smarty/plugins/resource.db.php + 3. Empty the templates_c folder (except index.html) + 4. Upload the 2.0.13-to-2.0.14 folder to your site (it's located in upgrade in the package) + 5. Login using an administrator account + 6. Access <your.site.url>/2.0.13-to-2.0.14/ using your browser, and follow the instructions + 7. Remove the 2.0.13-to-2.0.14 folder after use + +The 2006/05/23 patch hasn't been integrated in this Release Candidate upgrade script. If your site is running with register_globals on, you are advised to download the patch separately and apply it. +Known issues / Things you should be aware of +Modules + +The release candidates packages do not contain any module apart from the system one. You can use old modules from a 2.0.13.2 package, or browse the XOOPS modules repository to get some. +Some of the best modules can be found in the following locations: + + * Herve Thouzard's site (News, multimenu, mydownload, shortcuts...) + * Panther Software Publishing (xProject, xAsset) + * Smart Factory (SmartSection and many others) + * XForge site (CBB forum, Wordpress, MediaWiki...) + +We also highly recomment the installation of the Protector module which will bring additional protection and logging capabilities to your site. +New blocks positions + +Support for the new blocks positions must be added to themes: if you place blocks in the bottom and do not see them, this may be because your theme is too old. Most of the times, such support can be added easily by copying the theme.html portion that inserts the center top blocks just after the <{$xoops_contents}> division, and changing the variables so the duplicated code inserts the bottom blocks (see the default theme for an example). +Templates overriding + +Designers can add custom templates to their themes, and those will be used instead of the default ones. To exploit this feature, templates have to be created in subfolders of the themes duplicating the default folders structure and removing the "templates" part: + + * To overload system_userinfo.html template located in modules/system/templates/system_userinfo.html you have to create your custom version in <yourthemefolder>/modules/system/system_userinfo.html + * To overload system_block_login.html template located in modules/system/templates/blocks/system_block_login.html you have to create your custom version in <yourthemefolder>/modules/system/blocks/system_block_login.html + +Output resources overriding for developers + +To allow theme designers to customize images or stylesheets, you have to use the new theme class and xoImgUrl templates plug-in. + + * Scripts and stylesheets can be declared to XOOPS using the theme class addScript and addStylesheet methods. The theme instance is available after the inclusion of header.php by using the $xoTheme global variable, and in a template variable of the same name: + <{$xoTheme->addStylesheet('modules/newbb/style.css')}> + * Images and medias URLs have to be generated by using the xoImgUrl plug-in in your templates: + <img src="<xoImgUrl modules/newbb/images/reply.png}>" alt="reply" /> + +Output resources overriding for designers + +Designers can also provide custom versions of most output-related resources using a mechanism similar to the one available to templates, for modules that support this. + + * To create a custom stylesheet that will replace modules/newbb/style.css, create your customized file in <yourthemefolder>/modules/newbb/style.css + * To create a custom image that will replace modules/newbb/images/reply.png, create your customized file in <yourthemefolder>/modules/newbb/images/reply.png This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 23:46:36
|
Revision: 506 Author: skalpa Date: 2006-05-26 16:10:37 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=506&view=rev Log Message: ----------- Merged the 2.0.14 changes to the 2.0.x trunk (r505) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0-main/docs/changelog.txt XoopsCore/branches/2.0.x/2.0-main/htdocs/banners.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/criteria.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/database.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/mysqldatabase.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/errorhandler.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/ChangeLog.txt XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/README XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/class.phpmailer.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/class.smtp.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/module.textsanitizer.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/Config_File.class.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/Smarty.class.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/Smarty_Compiler.class.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/debug.tpl XoopsCore/branches/2.0.x/2.0-main/htdocs/class/template.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/tree.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/uploader.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xml/rss/xmlrss2parser.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsblock.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopscomments.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/form.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/formelement.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/grouppermform.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/tableform.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopsform/themeform.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopslists.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopstopic.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/xoopstree.php XoopsCore/branches/2.0.x/2.0-main/htdocs/edituser.php XoopsCore/branches/2.0.x/2.0-main/htdocs/footer.php XoopsCore/branches/2.0.x/2.0-main/htdocs/header.php XoopsCore/branches/2.0.x/2.0-main/htdocs/imagemanager.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/calendarjs.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/checklogin.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/comment_form.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/comment_new.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/comment_reply.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/common.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/cp_functions.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/cp_header.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/functions.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/version.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/class/dbmanager.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/class/mainfilemanager.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/class/textsanitizer.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/index.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/install_tpl.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/makedata.php XoopsCore/branches/2.0.x/2.0-main/htdocs/install/sql/mysql.data.sql XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/avatar.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/block.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/comment.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/config.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/configcategory.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/configitem.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/configoption.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/group.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/groupperm.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/image.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/imagecategory.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/imageset.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/imagesetimg.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/member.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/module.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/notification.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/object.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/online.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/privmessage.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/tplfile.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/tplset.php XoopsCore/branches/2.0.x/2.0-main/htdocs/kernel/user.php XoopsCore/branches/2.0.x/2.0-main/htdocs/language/english/comment.php XoopsCore/branches/2.0.x/2.0-main/htdocs/mainfile.dist.php XoopsCore/branches/2.0.x/2.0-main/htdocs/misc.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/blocksadmin/blockform.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/blocksadmin/blocksadmin.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/groupperm.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/tplsets/main.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/admin/tplsets/themeimgform.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/blocks/system_blocks.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/blocksadmin.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/templates/blocks/system_block_user.html XoopsCore/branches/2.0.x/2.0-main/htdocs/modules/system/templates/system_siteclosed.html XoopsCore/branches/2.0.x/2.0-main/htdocs/search.php XoopsCore/branches/2.0.x/2.0-main/htdocs/themes/default/style.css XoopsCore/branches/2.0.x/2.0-main/htdocs/themes/default/theme.html XoopsCore/branches/2.0.x/2.0-main/htdocs/viewpmsg.php XoopsCore/branches/2.0.x/2.0-main/htdocs/xmlrpc.php Added Paths: ----------- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.assemble_plugin_filepath.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.assign_smarty_interface.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.create_dir_structure.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.display_debug_console.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.get_include_path.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.get_microtime.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.get_php_resource.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.is_secure.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.is_trusted.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.load_plugins.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.load_resource_plugin.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.process_cached_inserts.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.process_compiled_include.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.read_cache_file.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.rm_auto.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.rmdir.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.run_insert_handler.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.smarty_include_php.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.write_cache_file.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.write_compiled_include.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.write_compiled_resource.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/internals/core.write_file.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/compiler.foreachq.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/compiler.includeq.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/compiler.xoAppUrl.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/compiler.xoImgUrl.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/function.xoops_link.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/xoops_plugins/resource.db.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/theme.php XoopsCore/branches/2.0.x/2.0-main/htdocs/class/theme_blocks.php XoopsCore/branches/2.0.x/2.0-main/htdocs/include/xoops13_header.php XoopsCore/branches/2.0.x/2.0-main/release_notes.txt XoopsCore/branches/2.0.x/2.0-main/upgrade/ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/img/ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/index.php XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/language/ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/language/english/ XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/language/english/finish.php XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/language/english/upgrade.php XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/style.css XoopsCore/branches/2.0.x/2.0-main/upgrade/2.0.13-to-2.0.14/upgrade_tpl.php XoopsCore/branches/2.0.x/2.0-main/upgrade/readme.txt Removed Paths: ------------- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/core/ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/smarty/plugins/resource.db.php Modified: XoopsCore/branches/2.0.x/2.0-main/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/docs/changelog.txt 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/docs/changelog.txt 2006-05-26 23:10:37 UTC (rev 506) @@ -1,5 +1,55 @@ + XOOPS v2.0.x Changelog + ============================ +2006/05/26: Version 2.0.14-RC1 +============================ + + +- Fixed bug #1476719: GroupPermForm client validation problem (skalpa) +- Fixed bug #1456176: PHP 5 installation problems (skalpa) +- Fixed debug mode support from the administration interface (skalpa) +- Fixed the "update templates from file" feature (skalpa) +- Fixed bug #1477969: wrong version for module (phppp) +- Fixed bug for template path (phppp/wenmingpig) +- Fixed bug for redirect after login (phppp) +- Several XHTML compliance fixes (skalpa) +- Several MySQL 4.1/5 strict mode fixes (phppp+skalpa) +- Enhanced columns criterias check (skalpa/report by gijoe) +- Applied the protector module comouflaged image check to the uploader (skalpa/code by gijoe) + +- Added new authentication system. Support for XOOPS Database, standard LDAP Directory, Microsoft Active Directory (pemen) +- New upgrade installer (pemen) +- Enhanced MySQL 4.1+ foreign encodings support (skalpa) +- Added avatar check to prevent unexpected avatar deletion (phppp) +- Added multiple file extensions sanitizing and image type check for uploader (phppp) +- Added ".svn" to preserved directory name; Removed unnecessary preg_match for directory/file name check (phppp+epaulin) +- Added xoops_redirect support to the closed site feature [patch #1206162/king] (skalpa) +- Added xoops_redirect support to history.go() (phppp) +- Added the possibility to display blocks below content (skalpa, original patch from McNaz) +- Backported the theme class from the 2.2/2.3 branches (skalpa) +- Added templates overloading capability to themes (skalpa) +- Added files resources overloading capability to themes (skalpa) +- Backported the URL generation Smarty plug-ins xoAppUrl and xoImgUrl from the 2.3 branch (skalpa) +- Backported the quick foreach and quick include Smarty plug-ins from the 2.3 branch (skalpa) +- Added the xoInboxCount Smarty plug-in (skalpa) +- Added text sanitizing to multiple files for $xoopsConfig['sitename'] and $xoopsConfig['slogan'] (phppp) +- Added localization for "Re" in comment (phppp) + +- Re-ordered user menu items to something more logical [patch #1264900/rabideau] (skalpa) +- Gave modules the possibility to return a message for diplay during the oninstall function [patch #1352943/bruno2000] (skalpa) +- Merged/optimized the logger and error handling classes (skalpa) +- Merged the PHP Debug and MySQL debug modes (skalpa) +- Changed private message list to new-first order (phppp) + +- Updated 3rd party libraries: Smarty 2.6.13, PHPMailer 1.73 (skalpa) + +Changes for translators: +- Added 3 new constants to the system/admin/blocksadmin (_AM_CBBOTTOM, _AM_CBBOTTOMLEFT, _AM_CBBOTTOMRIGHT) +- Several constants changed in system/admin/preferences (_MD_AM_DEBUGMODE1,_MD_AM_DEBUGMODE2,_MD_AM_THEMEFILE,_MD_AM_THEMEFILEDSC) +- Added one constant to language/english/comment.php (_CM_RE) + +============================ 2005/10/28: Version 2.0.13.2 ============================ - SECURITY: Fix to prevent mail headers injection (Skalpa/XOOPS Cube) @@ -56,7 +106,7 @@ - Implemented new token system for validating form origination and increased protection against CSRF (Mithrandir/Onokazu) - Security fix to avoid the usage of fopen and unlink when previewing (Onokazu) - Fixed bug - Missing </a> in news/templates/blocks/news_block_bigstory.html (Mithrandir/blacKurd) -- Fixed bug in header.php \x96 assign $xoops_lblocks (Mithrandir/phppp) +- Fixed bug in header.php ?assign $xoops_lblocks (Mithrandir/phppp) - Fixed bug #1087786 Can"t assign to $this in PHP5 (Mithrandir) - Included 2.0.9.3 fixes in 2.0.10 patch for easy upgrade from 2.0.9.2 (Mithrandir/rowd) - Fixed bug #1157029 - Bug in include/checklogin.php (Onokazu/sudhaker) Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/banners.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/banners.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/banners.php 2006-05-26 23:10:37 UTC (rev 506) @@ -86,7 +86,7 @@ <td class='b_td'><b>Imp. Left</b></td> <td class='b_td'><b>Clicks</b></td> <td class='b_td'><b>% Clicks</b></td> - <td class='b_td'><b>Functions</b></td><tr>"; + <td class='b_td'><b>Functions</b></td></tr>"; $result = $xoopsDB->query("select bid, imptotal, impmade, clicks, date from ".$xoopsDB->prefix("banner")." where cid=$cid"); while ( list($bid, $imptotal, $impmade, $clicks, $date) = $xoopsDB->fetchRow($result) ) { if ( $impmade == 0 ) { @@ -99,15 +99,15 @@ } else { $left = $imptotal-$impmade; } - echo "<td align='center'>$bid</td> + echo "<tr><td align='center'>$bid</td> <td align='center'>$impmade</td> <td align='center'>$imptotal</td> <td align='center'>$left</td> <td align='center'>$clicks</td> <td align='center'>$percent%</td> - <td align='center'><a href='banners.php?op=EmailStats&login=$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats</a></td><tr>"; + <td align='center'><a href='banners.php?op=EmailStats&login=$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats</a></td></tr>"; } - echo "</table><br /><br /><div>Following are your running Banners in ".$xoopsConfig['sitename']." </div><br /><br />"; + echo "</table><br /><br /><div>Following are your running Banners in " . htmlspecialchars( $xoopsConfig['sitename'] ). " </div><br /><br />"; $result = $xoopsDB->query("select bid, imageurl, clickurl, htmlbanner, htmlcode from ".$xoopsDB->prefix("banner")." where cid=$cid"); while ( list($bid, $imageurl, $clickurl,$htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result) ) { $numrows = $xoopsDB->getRowsNum($result); Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/criteria.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/criteria.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/criteria.php 2006-05-26 23:10:37 UTC (rev 506) @@ -339,18 +339,13 @@ * @return string **/ function render() { - if ( strtoupper($this->operator) == 'IN' || strtoupper($this->operator) == "NOT IN") { - $value = $this->value; - } else { - if ( '' === ($value = trim($this->value)) ) { - return ''; - } - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - if (!class_exists('MyTextSanitizer')) { - include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; - } - $value = "'".addslashes(stripslashes($value))."'"; - } + $value = $this->value; + if ( !in_array( strtoupper($this->operator), array('IN', 'NOT IN') ) ) { + if ( ( substr( $value, 0, 1 ) != '`' ) && ( substr( $value, -1 ) != '`' ) ) { + $value = "'$value'"; + } elseif ( !preg_match( '/^[a-zA-Z0-9_\.\-`]*$/', $value ) ) { + $value = '``'; + } } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; if ( !empty($this->function) ) { Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/database.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/database.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/database.php 2006-05-26 23:10:37 UTC (rev 506) @@ -123,9 +123,9 @@ class Database { - function &getInstance() - { - return XoopsDatabaseFactory::getDatabaseConnection(); + function &getInstance() { + $inst =& XoopsDatabaseFactory::getDatabaseConnection(); + return $inst; } } Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/mysqldatabase.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/mysqldatabase.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/database/mysqldatabase.php 2006-05-26 23:10:37 UTC (rev 506) @@ -63,6 +63,25 @@ */ var $conn; + + var $charsets = array( + 'iso-8859-1' => 'latin1', + 'iso-8859-2' => 'latin2', + 'iso-8859-7' => 'greek', + 'iso-8859-8' => 'hebrew', + 'iso-8859-9' => 'latin5', + 'iso-8859-13' => 'latin7', + 'big5' => 'big5', + 'euc-jp' => 'ujis', + 'euc-kr' => 'euckr', + 'gb2312' => 'gb2312', + 'windows-1250' => 'cp1250', + 'windows-1251' => 'cp1251', + 'windows-1256' => 'cp1256', + 'windows-1257' => 'cp1257', + 'utf-8' => 'utf8', + ); + /** * connect to the database * @@ -81,7 +100,10 @@ $this->logger->addQuery('', $this->error(), $this->errno()); return false; } - + if ( defined( '_CHARSET' ) || defined( '_INSTALL_CHARSET' ) ) { + $this->setClientCharset(); + } + if($selectdb != false){ if (!mysql_select_db(XOOPS_DB_NAME)) { $this->logger->addQuery('', $this->error(), $this->errno()); @@ -91,6 +113,16 @@ return true; } + function setClientCharset( $charset = '' ) { + if ( empty( $charset ) ) { + $charset = strtolower( defined( '_CHARSET' ) ? _CHARSET : _INSTALL_CHARSET ); + } + if ( isset( $this->charsets[$charset] ) ) { + @mysql_query( "SET NAMES '{$this->charsets[$charset]}'" ); + } + } + + /** * generate an ID for a new row * @@ -228,7 +260,7 @@ * @return resource query result or FALSE if successful * or TRUE if successful and no result */ - function &queryF($sql, $limit=0, $start=0) + function queryF($sql, $limit=0, $start=0) { if ( !empty($limit) ) { if (empty($start)) { @@ -236,7 +268,7 @@ } $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit; } - $result =& mysql_query($sql, $this->conn); + $result = mysql_query($sql, $this->conn); if ( $result ) { $this->logger->addQuery($sql); return $result; @@ -258,7 +290,7 @@ * * @abstract */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { } @@ -346,7 +378,7 @@ * @return resource query result or FALSE if successful * or TRUE if successful and no result */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { return $this->queryF($sql, $limit, $start); } @@ -378,7 +410,7 @@ * @param int $start offset of first record to return * @return resource query result or FALSE if unsuccessful */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { $sql = ltrim($sql); if (strtolower(substr($sql, 0, 6)) == 'select') { Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/errorhandler.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/errorhandler.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/errorhandler.php 2006-05-26 23:10:37 UTC (rev 506) @@ -25,191 +25,27 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // +defined( 'XOOPS_ROOT_PATH' ) or die(); + +require_once XOOPS_ROOT_PATH . '/class/logger.php'; + /** - * Error handler class - * - * @author Michael van Dam + * Backward compatibility code, do not use this class directly */ -class XoopsErrorHandler -{ +class XoopsErrorHandler extends XoopsLogger { /** - * List of errors - * - * @var array - * @access private - */ - var $_errors = array(); - - /** - * Show error messages? - * - * @var boolean - * @access private - */ - var $_showErrors = false; - - /** - * Was there a fatal error (E_USER_ERROR) - * - * @var boolean - * @access private - */ - var $_isFatal = false; - - /** - * Constructor - * - * Registers the error handler and shutdown functions. NOTE: when - * registering an error handler, the setting or 'error_reporting' is - * ignored and *everything* is trapped. - */ - function XoopsErrorHandler() - { - set_error_handler('XoopsErrorHandler_HandleError'); - register_shutdown_function('XoopsErrorHandler_Shutdown'); - } - - /** - * Get the (singleton) instance of the error handler - * - * @access public - */ - function &getInstance() - { - static $instance = null; - if (empty($instance)) { - $instance = new XoopsErrorHandler; - } - return $instance; - } - - /** * Activate the error handler - * - * @access public - * @param boolean $showErrors True if debug mode is on - * @return void */ - function activate($showErrors=false) - { - $this->_showErrors = $showErrors; + function activate( $showErrors = false ) { + $this->activated = $showErrors; } /** - * Handle an error - * - * @param array $error Associative array containing error info - * @access public - * @return void - */ - function handleError($error) - { - if (($error['errno'] & error_reporting()) != $error['errno']) { - return; - } - $this->_errors[] = $error; - if ($error['errno'] == E_USER_ERROR) { - $this->_isFatal = true; - exit(); - } - } - - /** * Render the list of errors - * - * NOTE: Unfortunately PHP 'fatal' and 'parse' errors are not trappable. - * If the server has 'display_errors Off', then the result will be a - * blank page. It would be nice to print a message 'This page cannot - * be displayed', but there seems to be no way to print this only when - * exiting due to a fatal error rather than normal end of page. - * - * Thus, 'trigger_error' should be used to trap problems early and - * display a meaningful message before a PHP fatal or parse error can - * occur. - * - * @TODO Use CSS - * @TODO Use language? or allow customized message? - * - * @access public - * @return void */ - function renderErrors() - { - $output = ''; - if ($this->_isFatal) { - $output .= 'This page cannot be displayed due to an internal error.<br/><br/>'; - $output .= 'If you are the administrator of this site, please visit the <a href="http://wiki.xoops.org/wakka.php?wakka=TroubleshootingBlankPage">Xoops Troubleshooting Page</a> for assistance.<br/><br/>'; - } - if (!$this->_showErrors || empty($this->_errors)) { - return $output; - } + function renderErrors() { + return $this->dump( 'errors' ); + } +} - foreach( $this->_errors as $error ) - { - switch ( $error['errno'] ) - { - case E_USER_NOTICE: - $output .= "Notice [Xoops]: "; - break; - case E_USER_WARNING: - $output .= "Warning [Xoops]: "; - break; - case E_USER_ERROR: - $output .= "Error [Xoops]: "; - break; - case E_NOTICE: - $output .= "Notice [PHP]: "; - break; - case E_WARNING: - $output .= "Warning [PHP]: "; - break; - default: - $output .= "Unknown Condition [" . $error['errno'] . "]: "; - } - $output .= sprintf( "%s in file %s line %s<br>\n", $error['errstr'], $error['errfile'], $error['errline'] ); - } - return $output; - } - -} - -/** - * User-defined error handler (called from 'trigger_error') - * - * NOTE: Some recent versions of PHP have a 5th parameter, &$p_ErrContext - * which is an associative array of all variables defined in scope in which - * error occurred. We cannot support this, for compatibility with older PHP. - * - * @access public - * @param int $errNo Type of error - * @param string $errStr Error message - * @param string $errFile File in which error occurred - * @param int $errLine Line number on which error occurred - * @return void - */ -function XoopsErrorHandler_HandleError($errNo, $errStr, $errFile, $errLine) -{ - // NOTE: we only store relative pathnames - $new_error = array( - 'errno' => $errNo, - 'errstr' => $errStr, - 'errfile' => preg_replace("|^" . XOOPS_ROOT_PATH . "/|", '', $errFile), - 'errline' => $errLine - ); - $error_handler =& XoopsErrorHandler::getInstance(); - $error_handler->handleError($new_error); -} - -/** - * User-defined shutdown function (called from 'exit') - * - * @access public - * @return void - */ -function XoopsErrorHandler_Shutdown() -{ - $error_handler =& XoopsErrorHandler::getInstance(); - echo $error_handler->renderErrors(); -} - -?> +?> \ No newline at end of file Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger.php 2006-05-26 23:10:37 UTC (rev 506) @@ -1,50 +1,28 @@ <?php -// $Id$ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: Kazumi Ono (AKA onokazu) // -// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // -// Project: The XOOPS Project // -// ------------------------------------------------------------------------- // +/** + * XoopsLogger component main class file + * + * See the enclosed file LICENSE for licensing information. + * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html + * + * @copyright The XOOPS project http://www.xoops.org/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Kazumi Ono <on...@xo...> + * @author Skalpa Keo <sk...@xo...> + * @since 2.0 + * @package xos_kernel + * @subpackage XoopsLogger + * @version $Id$ + */ /** * Collects information for a page request * - * <b>Singelton:</b> There can be only one instance of this class and it must - * be accessed through the {@link instance()} method! - * - * records information about database queries, blocks, and execution time - * and can display it as HTML - * - * @author Kazumi Ono <on...@xo...> - * @copyright copyright (c) 2000-2003 XOOPS.org - * - * @package kernel + * Records information about database queries, blocks, and execution time + * and can display it as HTML. It also catches php runtime errors. + * @package xos_kernel */ -class XoopsLogger -{ +class XoopsLogger { /**#@+ * @var array */ @@ -53,186 +31,156 @@ var $extra = array(); var $logstart = array(); var $logend = array(); + var $errors = array(); /**#@-*/ - /** - * constructor - * - * @access private - */ - function XoopsLogger() - { - + var $usePopup = false; + var $activated = true; + + /**@access protected*/ + var $renderingEnabled = false; + + function XoopsLogger() { + // Always catch errors, for security reasons + set_error_handler( array( &$this, 'handleError' ) ); } - /** - * get a reference to the only instance of this class - * + * Get a reference to the only instance of this class * @return object XoopsLogger reference to the only instance */ - function &instance() - { - static $instance; - if (!isset($instance)) { - $instance = new XoopsLogger(); - } - return $instance; + function &instance() { + // @internal: Using a static var didnt work with PHP5+ (the output handler was called on a clone) + if ( !isset( $GLOBALS['xoopsLogger'] ) || !is_object( $GLOBALS['xoopsLogger'] ) ) { + $GLOBALS['xoopsLogger'] =& new XoopsLogger(); + } + return $GLOBALS['xoopsLogger']; } - + /** + * Enable logger output rendering + * When output rendering is enabled, the logger will insert its output within the page content. + * If the string <!--{xo-logger-output}--> is found in the page content, the logger output will + * replace it, otherwise it will be inserted after all the page output. + */ + function enableRendering() { + if ( !$this->renderingEnabled ) { + ob_start( array( &$this, 'render' ) ); + $this->renderingEnabled = true; + } + } + /** + * Returns the current microtime in seconds. + * @return float + */ + function microtime() { + $now = explode( ' ', microtime() ); + return (float)$now[0] + (float)$now[1]; + } /** - * start a timer - * + * Start a timer * @param string $name name of the timer - * */ - function startTime($name = 'XOOPS') - { - $this->logstart[$name] = explode(' ', microtime()); + function startTime($name = 'XOOPS') { + $this->logstart[$name] = $this->microtime(); } - /** - * stop a timer - * + * Stop a timer * @param string $name name of the timer */ - function stopTime($name = 'XOOPS') - { - $this->logend[$name] = explode(' ', microtime()); + function stopTime($name = 'XOOPS') { + $this->logend[$name] = $this->microtime(); } - /** - * log a database query - * + * Log a database query * @param string $sql SQL string * @param string $error error message (if any) * @param int $errno error number (if any) */ - function addQuery($sql, $error=null, $errno=null) - { - $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno); + function addQuery($sql, $error=null, $errno=null) { + if ( $this->activated ) $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno); } - /** - * log display of a block - * + * Log display of a block * @param string $name name of the block * @param bool $cached was the block cached? * @param int $cachetime cachetime of the block */ - function addBlock($name, $cached = false, $cachetime = 0) - { - $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime); + function addBlock($name, $cached = false, $cachetime = 0) { + if ( $this->activated ) $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime); } - /** - * log extra information - * + * Log extra information * @param string $name name for the entry * @param int $msg text message for the entry */ - function addExtra($name, $msg) - { - $this->extra[] = array('name' => $name, 'msg' => $msg); + function addExtra($name, $msg) { + if ( $this->activated ) $this->extra[] = array('name' => $name, 'msg' => $msg); } - /** - * get the logged queries in a HTML table - * - * @return string HTML table with queries - */ - function dumpQueries() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th>Queries</th></tr>'; - $class = 'even'; - foreach ($this->queries as $q) { - if (isset($q['error'])) { - $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'].'</span></td></tr>'; - } else { - $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']).'</td></tr>'; - } - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->queries).'</span> queries</td></tr></table><br />'; - return $ret; - } + /** + * Error handling callback (called by the zend engine) + */ + function handleError( $errno, $errstr, $errfile, $errline ) { + if ( $this->activated && ( $errno & error_reporting() ) ) { + // NOTE: we only store relative pathnames + $errfile = str_replace( array( '\\', XOOPS_ROOT_PATH ), array( '/', '' ), $errfile ); + $this->errors[] = compact( 'errno', 'errstr', 'errfile', 'errline' ); + } + if ( $errno == E_USER_ERROR ) { + echo 'This page cannot be displayed due to an internal error.<br/><br/>'; + echo 'If you are the administrator of this site, please visit the <a href="http://wiki.xoops.org/wakka.php?wakka=TroubleshootingBlankPage">Xoops Troubleshooting Page</a> for assistance.<br/><br/>'; + exit(); + } + } + /** + * Output buffering callback inserting logger dump in page output + */ + function render( $output ) { + global $xoopsUser; + if ( !$this->activated || !$xoopsUser || !$xoopsUser->isAdmin() ) { + return $output; + } + $this->renderingEnabled = $this->activated = false; + + $log = "\n<div id=\"xo-logger-output\">\n" . $this->dump( $this->usePopup ? 'popup' : '' ) . "\n</div>\n"; - /** - * get the logged blocks in a HTML table - * - * @return string HTML table with blocks + $pattern = '<!--{xo-logger-output}-->'; + $pos = strpos( $output, $pattern ); + if ( $pos !== false ) { + return substr( $output, 0, $pos ) . $log . substr( $output, $pos + strlen( $pattern ) ); + } else { + return $output . $log; + } + } + /**#@+ + * @protected */ - function dumpBlocks() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Blocks</th></tr>'; - $class = 'even'; - foreach ($this->blocks as $b) { - if ($b['cached']) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>'; - } else { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> No Cache</td></tr>'; - } - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table><br />'; - return $ret; - } - + function dump( $mode = '' ) { + include XOOPS_ROOT_PATH . '/class/logger_render.php'; + return $ret; + } /** * get the current execution time of a timer * * @param string $name name of the counter * @return float current execution time of the counter */ - function dumpTime($name = 'XOOPS') - { - if (!isset($this->logstart[$name])) { + function dumpTime( $name = 'XOOPS' ) { + if ( !isset($this->logstart[$name]) ) { return 0; } - if (!isset($this->logend[$name])) { - $stop_time = explode(' ', microtime()); - } else { - $stop_time = $this->logend[$name]; - } - return ((float)$stop_time[1] + (float)$stop_time[0]) - ((float)$this->logstart[$name][1] + (float)$this->logstart[$name][0]); + $stop = isset( $this->logend[$name] ) ? $this->logend[$name] : $this->microtime(); + return $stop - $this->logstart[$name]; } - - /** - * get extra information in a HTML table - * - * @return string HTML table with extra information + /**#@-*/ + /**#@+ + * @deprecated */ - function dumpExtra() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Extra</th></tr>'; - $class = 'even'; - foreach ($this->extra as $ex) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>'; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '</table><br />'; - return $ret; - } - - /** - * get all logged information formatted in HTML tables - * - * @return string HTML output - */ - function dumpAll() - { - $ret = $this->dumpQueries(); - $ret .= $this->dumpBlocks(); - if (count($this->logstart) > 0) { - $ret .= '<table class="outer" width="100%" cellspacing="1"><tr><th>Execution Time</th></tr>'; - $class = 'even'; - foreach ($this->logstart as $k => $v) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">'.$this->dumpTime($k).'</span> seconds to load.</td></tr>'; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '</table><br />'; - } - $ret .= $this->dumpExtra(); - return $ret; - } + function dumpAll() { return $this->dump( '' ); } + function dumpBlocks() { return $this->dump( 'blocks' ); } + function dumpExtra() { return $this->dump( 'extra' ); } + function dumpQueries() { return $this->dump( 'queries' ); } + /**#@-*/ } + + ?> \ No newline at end of file Added: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php (rev 0) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php 2006-05-26 23:10:37 UTC (rev 506) @@ -0,0 +1,177 @@ +<?php + +defined( 'XOOPS_ROOT_PATH' ) or die(); + +$ret = ''; + +if ( $mode == 'popup' ) { + $dump = $this->dump( '' ); + $content = ' +<html> +<head> + <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /> + <meta http-equiv="content-language" content="'._LANGCODE.'" /> + <title>'.$xoopsConfig['sitename'].'</title> + <link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" /> +</head> +<body>' . $dump . ' + <div style="text-align:center;"> + <input class="formButton" value="'._CLOSE.'" type="button" /> + </div> +</body> +</html>'; + $ret .= ' +<script type="text/javascript"> + debug_window = openWithSelfMain("about:blank", "popup", 680, 450, true); + debug_window.document.clear(); +'; + $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); + foreach ($lines as $line) { + $ret .= "\n" . 'debug_window.document.writeln("'.str_replace( array( '"', '</' ), array( '\"', '<\/' ), $line).'");'; + } + $ret .= ' + debug_window.focus(); + debug_window.document.close(); +</script>'; +} + +if ( empty( $mode ) ) { + $views = array( 'errors', 'queries', 'blocks', 'extra' ); + $ret .= "<div id='xo-logger-tabs'>\n"; + $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>All</a>\n"; + foreach ( $views as $view ) { + $count = count( $this->$view ); + $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>$view ($count)</a>\n"; + } + $count = count( $this->logstart ); + $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>timers ($count)</a>\n"; + $ret .= "</div>\n"; +} + +if ( empty($mode) || $mode == 'errors' ) { + $types = array( + E_USER_NOTICE => 'Notice', + E_USER_WARNING => 'Warning', + E_USER_ERROR => 'Error', + E_NOTICE => 'Notice', + E_WARNING => 'Warning', + E_STRICT => 'Strict', + ); + $class = 'even'; + $ret .= '<table id="xo-logger-errors" class="outer"><tr><th>Errors</th></tr>'; + foreach ( $this->errors as $error ) { + $ret .= "\n<tr><td class='$class'>"; + $ret .= isset( $types[ $error['errno'] ] ) ? $types[ $error['errno'] ] : 'Unknown'; + $ret .= sprintf( ": %s in file %s line %s<br />\n", $error['errstr'], $error['errfile'], $error['errline'] ); + $ret .= "</td></tr>"; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= "\n</table>\n"; +} + +if ( empty($mode) || $mode == 'queries' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-queries" class="outer"><tr><th>Queries</th></tr>'; + foreach ($this->queries as $q) { + if (isset($q['error'])) { + $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'].'</span></td></tr>'; + } else { + $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']).'</td></tr>'; + } + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->queries).'</span> queries</td></tr></table>'; +} +if ( empty($mode) || $mode == 'blocks' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">Blocks</th></tr>'; + foreach ($this->blocks as $b) { + if ($b['cached']) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>'; + } else { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> No Cache</td></tr>'; + } + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table>'; +} +if ( empty($mode) || $mode == 'extra' ) { + $this->addExtra( 'Included files', count ( get_included_files() ) . ' files' ); + $memory = 0; + if ( function_exists( 'memory_get_usage' ) ) { + $memory = memory_get_usage() . ' bytes'; + } else { + $os = isset( $_ENV['OS'] ) ? $_ENV['OS'] : $_SERVER['OS']; + if ( strpos( strtolower( $os ), 'windows') !== false ) { + $out = array(); + exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $out ); + $memory = substr( $out[5], strpos( $out[5], ':') + 1) . ' [Estimated]'; + } + } + if ( $memory ) { + $this->addExtra( 'Memory usage', $memory ); + } + + $class = 'even'; + $ret .= '<table id="xo-logger-extra" class="outer"><tr><th colspan="2">Extra</th></tr>'; + foreach ($this->extra as $ex) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>'; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '</table>'; +} +if ( empty($mode) || $mode == 'timers' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-timers" class="outer"><tr><th colspan="2">Timers</th></tr>'; + foreach ( $this->logstart as $k => $v ) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">' . sprintf( "%.03f", $this->dumpTime($k) ) . '</span> seconds to load.</td></tr>'; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '</table>'; +} + +if ( empty( $mode ) ) { + $ret .= <<<EOT +<script type="text/javascript"> + function xoLogCreateCookie(name,value,days) { + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else var expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; + } + function xoLogReadCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; + } + function xoLogEraseCookie(name) { + createCookie(name,"",-1); + } + function xoSetLoggerView( name ) { + var log = document.getElementById( "xo-logger-output" ); + if ( !log ) return; + var i, elt; + for ( i=0; i!=log.childNodes.length; i++ ) { + elt = log.childNodes[i]; + if ( elt.tagName && elt.tagName.toLowerCase() != 'script' && elt.id != "xo-logger-tabs" ) { + elt.style.display = ( !name || elt.id == "xo-logger-" + name ) ? "block" : "none"; + } + } + xoLogCreateCookie( 'XOLOGGERVIEW', name, 1 ); + } + xoSetLoggerView( xoLogReadCookie( 'XOLOGGERVIEW' ) ); +</script> + +EOT; +} + + +?> \ No newline at end of file Property changes on: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + "Author Date Id Rev URL" Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/ChangeLog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/ChangeLog.txt 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/ChangeLog.txt 2006-05-26 23:10:37 UTC (rev 506) @@ -1,5 +1,35 @@ ChangeLog +Version 1.73 (Sun, Jun 10 2005) +* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf +* Now has a total of 20 translations +* Fixed alt attachments bug: http://tinyurl.com/98u9k + +Version 1.72 (Wed, May 25 2004) +* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. +* Received: Removed this method because spam filter programs like +SpamAssassin reject this header. +* Fixed error count bug. +* SetLanguage default is now "language/". +* Fixed magic_quotes_runtime bug. + +Version 1.71 (Tue, Jul 28 2003) +* Made several speed enhancements +* Added German and Italian translation files +* Fixed HELO/AUTH bugs on keep-alive connects +* Now provides an error message if language file does not load +* Fixed attachment EOL bug +* Updated some unclear documentation +* Added additional tests and improved others + +Version 1.70 (Mon, Jun 20 2003) +* Added SMTP keep-alive support +* Added IsError method for error detection +* Added error message translation support (SetLanguage) +* Refactored many methods to increase library performance +* Hello now sends the newer EHLO message before HELO as per RFC 2821 +* Removed the boundary class and replaced it with GetBoundary +* Removed queue support methods * New $Hostname variable * New Message-ID header * Received header reformat @@ -10,6 +40,7 @@ * quoted-encoding should now encode NULs \000 * Fixed encoding of body/AltBody (#553370) * Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) +* Multiple bug fixes Version 1.65 (Fri, Aug 09 2002) * Fixed non-visible attachment bug (#585097) for Outlook Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/README =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/README 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/README 2006-05-26 23:10:37 UTC (rev 506) @@ -1,10 +1,12 @@ -phpmailer - PHP email class -============================== -http://phpmailer.sourceforge.net +PHPMailer +Full Featured Email Transfer Class for PHP +========================================== -Please read LICENSE for information on this softwares availability and -distribution. +http://phpmailer.sourceforge.net/ +This software is licenced under the LGPL. Please read LICENSE for information on the +software availability and distribution. + Class Features: - Send emails with multiple TOs, CCs, BCCs and REPLY-TOs - Redundant SMTP servers @@ -12,8 +14,8 @@ - Support for 8bit, base64, binary, and quoted-printable encoding - Uses the same methods as the very popular AspEmail active server (COM) component - SMTP authentication -- Word wrap -- Many more... +- Native language support +- Word wrap, and more! Why you might need it: @@ -37,19 +39,34 @@ Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well. +In the language directory you will find several files like +phpmailer.lang-en.php. If you look right before the .php extension +that there are two letters. These represent the language type of the +translation file. For instance "en" is the English file and "br" is +the Portuguese file. Chose the file that best fits with your language +and place it in the PHP include path. If your language is English +then you have nothing more to do. If it is a different language then +you must point PHPMailer to the correct translation. To do this, call +the PHPMailer SetLanguage method like so: -Example +// To load the Portuguese version +$mail->SetLanguage("br", "/optional/path/to/language/directory/"); +That's it. You should now be ready to use PHPMailer! + + +A Simple Example: + <?php require("class.phpmailer.php"); -$mail = new phpmailer(); +$mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true // turn on SMTP authentication -$mail->Username = "jswan" // SMTP username -$mail->Password = "secret" // SMTP password +$mail->SMTPAuth = true; // turn on SMTP authentication +$mail->Username = "jswan"; // SMTP username +$mail->Password = "secret"; // SMTP password $mail->From = "fr...@ex..."; $mail->FromName = "Mailer"; @@ -82,4 +99,4 @@ Download: http://sourceforge.net/project/showfiles.php?group_id=26031 -Brent R. Matzelle <bma...@ya...> +Brent R. Matzelle Modified: XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/class.phpmailer.php =================================================================== --- XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/class.phpmailer.php 2006-05-26 22:50:56 UTC (rev 505) +++ XoopsCore/branches/2.0.x/2.0-main/htdocs/class/mail/phpmailer/class.phpmailer.php 2006-05-26 23:10:37 UTC (rev 506) @@ -1,1779 +1,1499 @@ -<?php -//////////////////////////////////////////////////// -// phpmailer - PHP email class -// -// Version 1.65, Created 08/09/2002 -// -// Class for sending email using either -// sendmail, PHP mail(), or SMTP. Methods are -// based upon the standard AspEmail(tm) classes. -// -// Author: Brent R. Matzelle <bma...@ya...> -// -// License: LGPL, see LICENSE -//////////////////////////////////////////////////// - -/** - * phpmailer - PHP email transport class - * @author Brent R. Matzelle - */ -class phpmailer -{ - ///////////////////////////////////////////////// - // PUBLIC VARIABLES - ///////////////////////////////////////////////// - - /** - * Email priority (1 = High, 3 = Normal, 5 = low). - * @access public - * @var int - */ - var $Priority = 3; - - /** - * Sets the CharSet of the message. - * @access public - * @var string - */ - var $CharSet = "iso-8859-1"; - - /** - * Sets the Content-type of the message. - * @access public - * @var string - */ - var $ContentType = "text/plain"; - - /** - * Sets the Encoding of the message. Options for this are "8bit", - * "7bit", "binary", "base64", and "quoted-printable". - * @access public - * @var string - */ - var $Encoding = "8bit"; - - /** - * Holds the most recent mailer error message. - * @access public - * @var string - */ - var $ErrorInfo = ""; - - /** - * Sets the From email address for the message. - * @access public - * @var string - */ - var $From = "root@localhost"; - - /** - * Sets the From name of the message. - * @access public - * @var string - */ - var $FromName = "Root User"; - - /** - * Sets the Sender email of the message. If not empty, will be sent via -f to sendmail - * or as 'MAIL FROM' in smtp mode. - * @access public - * @var string - */ - var $Sender = ""; - - /** - * Sets the Subject of the message. - * @access public - * @var string - */ - var $Subject = ""; - - /** - * Sets the Body of the message. This can be either an HTML or text body. - * If HTML then run IsHTML(true). - * @access public - * @var string - */ - var $Body = ""; - - /** - * Sets the text-only body of the message. This automatically sets the - * email to multipart/alternative. This body can be read by mail - * clients that do not have HTML email capability such as mutt. Clients - * that can read HTML will view the normal Body. - * @access public - * @var string - */ - var $AltBody = ""; - - /** - * Sets word wrapping on the body of the message to a given number of - * characters. - * @access public - * @var int - */ - var $WordWrap = 0; - - /** - * Method to send mail: ("mail", "sendmail", or "smtp"). - * @access public - * @var string - */ - var $Mailer = "mail"; - - /** - * Sets the path of the sendmail program. - * @access public - * @var string - */ - var $Sendmail = "/usr/sbin/sendmail"; - - /** - * Turns Microsoft mail client headers on and off. Useful mostly - * for older clients. - * @access public - * @var bool - */ - var $UseMSMailHeaders = false; - - /** - * Path to phpmailer plugins. This is now only useful if the SMTP class - * is in a different directory than the PHP include path. - * @access public - * @var string - */ - var $PluginDir = ""; - - /** - * Holds phpmailer version. - * @access public - * @var string - */ - var $Version = "1.65"; - - /** - * Sets the email address that a reading confirmation will be sent. - * @access public - * @var string - */ - var $ConfirmReadingTo = ""; - - /** - * Sets the line endings of the message. - * @access public - * @var string - */ - var $LE = "\n"; - - /** - * Sets the hostname to use in Message-Id and Received headers - * and as default HELO string. If empty, the value returned - * by SERVER_NAME is used or 'localhost.localdomain'. - * @access public - * @var string - */ - var $Hostname = ""; - - - ///////////////////////////////////////////////// - // SMTP VARIABLES - ///////////////////////////////////////////////// - - /** - * Sets the SMTP hosts. All hosts must be separated by a - * semicolon. You can also specify a different port - * for each host by using this format: [hostname:port] - * (e.g. "smtp1.example.com:25;smtp2.example.com"). - * Hosts will be tried in order. - * @access public - * @var string - */ - var $Host = "localhost"; - - /** - * Sets the default SMTP server port. - * @access public - * @var int - */ - var $Port = 25; - - /** - * Sets the SMTP HELO of the message (Default is $Hostname). - * @access public - * @var string - */ - var $Helo = ""; - - /** - * Sets SMTP authentication. Utilizes the Username and Password variables. - * @access public - * @var bool - */ - var $SMTPAuth = false; - - /** - * Sets SMTP username. - * @access public - * @var string - */ - var $Username =... [truncated message content] |
|
From: <sk...@us...> - 2006-05-26 23:45:45
|
Revision: 507 Author: skalpa Date: 2006-05-26 16:39:35 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=507&view=rev Log Message: ----------- Updatign the trunk to 2.0.14rc1 Modified Paths: -------------- XoopsCore/trunk/docs/changelog.txt XoopsCore/trunk/htdocs/banners.php XoopsCore/trunk/htdocs/class/criteria.php XoopsCore/trunk/htdocs/class/database/database.php XoopsCore/trunk/htdocs/class/database/mysqldatabase.php XoopsCore/trunk/htdocs/class/errorhandler.php XoopsCore/trunk/htdocs/class/logger.php XoopsCore/trunk/htdocs/class/mail/phpmailer/ChangeLog.txt XoopsCore/trunk/htdocs/class/mail/phpmailer/README XoopsCore/trunk/htdocs/class/mail/phpmailer/class.phpmailer.php XoopsCore/trunk/htdocs/class/mail/phpmailer/class.smtp.php XoopsCore/trunk/htdocs/class/mail/xoopsmultimailer.php XoopsCore/trunk/htdocs/class/module.textsanitizer.php XoopsCore/trunk/htdocs/class/smarty/Config_File.class.php XoopsCore/trunk/htdocs/class/smarty/Smarty.class.php XoopsCore/trunk/htdocs/class/smarty/Smarty_Compiler.class.php XoopsCore/trunk/htdocs/class/smarty/debug.tpl XoopsCore/trunk/htdocs/class/template.php XoopsCore/trunk/htdocs/class/tree.php XoopsCore/trunk/htdocs/class/uploader.php XoopsCore/trunk/htdocs/class/xml/rss/xmlrss2parser.php XoopsCore/trunk/htdocs/class/xoopsblock.php XoopsCore/trunk/htdocs/class/xoopscomments.php XoopsCore/trunk/htdocs/class/xoopsform/form.php XoopsCore/trunk/htdocs/class/xoopsform/formelement.php XoopsCore/trunk/htdocs/class/xoopsform/formtextdateselect.php XoopsCore/trunk/htdocs/class/xoopsform/grouppermform.php XoopsCore/trunk/htdocs/class/xoopsform/tableform.php XoopsCore/trunk/htdocs/class/xoopsform/themeform.php XoopsCore/trunk/htdocs/class/xoopslists.php XoopsCore/trunk/htdocs/class/xoopstopic.php XoopsCore/trunk/htdocs/class/xoopstree.php XoopsCore/trunk/htdocs/edituser.php XoopsCore/trunk/htdocs/footer.php XoopsCore/trunk/htdocs/header.php XoopsCore/trunk/htdocs/imagemanager.php XoopsCore/trunk/htdocs/include/calendarjs.php XoopsCore/trunk/htdocs/include/checklogin.php XoopsCore/trunk/htdocs/include/comment_form.php XoopsCore/trunk/htdocs/include/comment_new.php XoopsCore/trunk/htdocs/include/comment_reply.php XoopsCore/trunk/htdocs/include/common.php XoopsCore/trunk/htdocs/include/cp_functions.php XoopsCore/trunk/htdocs/include/cp_header.php XoopsCore/trunk/htdocs/include/functions.php XoopsCore/trunk/htdocs/include/version.php XoopsCore/trunk/htdocs/install/class/dbmanager.php XoopsCore/trunk/htdocs/install/class/mainfilemanager.php XoopsCore/trunk/htdocs/install/class/textsanitizer.php XoopsCore/trunk/htdocs/install/index.php XoopsCore/trunk/htdocs/install/install_tpl.php XoopsCore/trunk/htdocs/install/makedata.php XoopsCore/trunk/htdocs/install/sql/mysql.data.sql XoopsCore/trunk/htdocs/kernel/avatar.php XoopsCore/trunk/htdocs/kernel/block.php XoopsCore/trunk/htdocs/kernel/comment.php XoopsCore/trunk/htdocs/kernel/config.php XoopsCore/trunk/htdocs/kernel/configcategory.php XoopsCore/trunk/htdocs/kernel/configitem.php XoopsCore/trunk/htdocs/kernel/configoption.php XoopsCore/trunk/htdocs/kernel/group.php XoopsCore/trunk/htdocs/kernel/groupperm.php XoopsCore/trunk/htdocs/kernel/image.php XoopsCore/trunk/htdocs/kernel/imagecategory.php XoopsCore/trunk/htdocs/kernel/imageset.php XoopsCore/trunk/htdocs/kernel/imagesetimg.php XoopsCore/trunk/htdocs/kernel/member.php XoopsCore/trunk/htdocs/kernel/module.php XoopsCore/trunk/htdocs/kernel/notification.php XoopsCore/trunk/htdocs/kernel/object.php XoopsCore/trunk/htdocs/kernel/online.php XoopsCore/trunk/htdocs/kernel/privmessage.php XoopsCore/trunk/htdocs/kernel/tplfile.php XoopsCore/trunk/htdocs/kernel/tplset.php XoopsCore/trunk/htdocs/kernel/user.php XoopsCore/trunk/htdocs/language/english/comment.php XoopsCore/trunk/htdocs/mainfile.dist.php XoopsCore/trunk/htdocs/misc.php XoopsCore/trunk/htdocs/modules/system/admin/blocksadmin/blockform.php XoopsCore/trunk/htdocs/modules/system/admin/blocksadmin/blocksadmin.php XoopsCore/trunk/htdocs/modules/system/admin/groupperm.php XoopsCore/trunk/htdocs/modules/system/admin/modulesadmin/modulesadmin.php XoopsCore/trunk/htdocs/modules/system/admin/preferences/main.php XoopsCore/trunk/htdocs/modules/system/admin/tplsets/main.php XoopsCore/trunk/htdocs/modules/system/admin/tplsets/themeimgform.php XoopsCore/trunk/htdocs/modules/system/blocks/system_blocks.php XoopsCore/trunk/htdocs/modules/system/language/english/admin/blocksadmin.php XoopsCore/trunk/htdocs/modules/system/language/english/admin/preferences.php XoopsCore/trunk/htdocs/modules/system/templates/blocks/system_block_user.html XoopsCore/trunk/htdocs/modules/system/templates/system_siteclosed.html XoopsCore/trunk/htdocs/search.php XoopsCore/trunk/htdocs/themes/default/style.css XoopsCore/trunk/htdocs/themes/default/theme.html XoopsCore/trunk/htdocs/viewpmsg.php XoopsCore/trunk/htdocs/xmlrpc.php Added Paths: ----------- XoopsCore/trunk/htdocs/class/logger_render.php XoopsCore/trunk/htdocs/class/smarty/internals/ XoopsCore/trunk/htdocs/class/smarty/internals/core.assemble_plugin_filepath.php XoopsCore/trunk/htdocs/class/smarty/internals/core.assign_smarty_interface.php XoopsCore/trunk/htdocs/class/smarty/internals/core.create_dir_structure.php XoopsCore/trunk/htdocs/class/smarty/internals/core.display_debug_console.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_include_path.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_microtime.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_php_resource.php XoopsCore/trunk/htdocs/class/smarty/internals/core.is_secure.php XoopsCore/trunk/htdocs/class/smarty/internals/core.is_trusted.php XoopsCore/trunk/htdocs/class/smarty/internals/core.load_plugins.php XoopsCore/trunk/htdocs/class/smarty/internals/core.load_resource_plugin.php XoopsCore/trunk/htdocs/class/smarty/internals/core.process_cached_inserts.php XoopsCore/trunk/htdocs/class/smarty/internals/core.process_compiled_include.php XoopsCore/trunk/htdocs/class/smarty/internals/core.read_cache_file.php XoopsCore/trunk/htdocs/class/smarty/internals/core.rm_auto.php XoopsCore/trunk/htdocs/class/smarty/internals/core.rmdir.php XoopsCore/trunk/htdocs/class/smarty/internals/core.run_insert_handler.php XoopsCore/trunk/htdocs/class/smarty/internals/core.smarty_include_php.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_cache_file.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_compiled_include.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_compiled_resource.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_file.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/ XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.foreachq.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.includeq.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.xoAppUrl.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.xoImgUrl.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/function.xoops_link.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/resource.db.php XoopsCore/trunk/htdocs/class/theme.php XoopsCore/trunk/htdocs/class/theme_blocks.php XoopsCore/trunk/htdocs/include/xoops13_header.php XoopsCore/trunk/release_notes.txt XoopsCore/trunk/upgrade/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/img/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/index.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/finish.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/upgrade.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/style.css XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/upgrade_tpl.php XoopsCore/trunk/upgrade/readme.txt Removed Paths: ------------- XoopsCore/trunk/htdocs/class/smarty/core/ XoopsCore/trunk/htdocs/class/smarty/internals/core.assemble_plugin_filepath.php XoopsCore/trunk/htdocs/class/smarty/internals/core.assign_smarty_interface.php XoopsCore/trunk/htdocs/class/smarty/internals/core.create_dir_structure.php XoopsCore/trunk/htdocs/class/smarty/internals/core.display_debug_console.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_include_path.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_microtime.php XoopsCore/trunk/htdocs/class/smarty/internals/core.get_php_resource.php XoopsCore/trunk/htdocs/class/smarty/internals/core.is_secure.php XoopsCore/trunk/htdocs/class/smarty/internals/core.is_trusted.php XoopsCore/trunk/htdocs/class/smarty/internals/core.load_plugins.php XoopsCore/trunk/htdocs/class/smarty/internals/core.load_resource_plugin.php XoopsCore/trunk/htdocs/class/smarty/internals/core.process_cached_inserts.php XoopsCore/trunk/htdocs/class/smarty/internals/core.process_compiled_include.php XoopsCore/trunk/htdocs/class/smarty/internals/core.read_cache_file.php XoopsCore/trunk/htdocs/class/smarty/internals/core.rm_auto.php XoopsCore/trunk/htdocs/class/smarty/internals/core.rmdir.php XoopsCore/trunk/htdocs/class/smarty/internals/core.run_insert_handler.php XoopsCore/trunk/htdocs/class/smarty/internals/core.smarty_include_php.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_cache_file.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_compiled_include.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_compiled_resource.php XoopsCore/trunk/htdocs/class/smarty/internals/core.write_file.php XoopsCore/trunk/htdocs/class/smarty/plugins/resource.db.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.foreachq.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.includeq.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.xoAppUrl.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/compiler.xoImgUrl.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/function.xoops_link.php XoopsCore/trunk/htdocs/class/smarty/xoops_plugins/resource.db.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/img/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/index.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/ XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/finish.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/language/english/upgrade.php XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/style.css XoopsCore/trunk/upgrade/2.0.13-to-2.0.14/upgrade_tpl.php XoopsCore/trunk/upgrade/readme.txt Modified: XoopsCore/trunk/docs/changelog.txt =================================================================== --- XoopsCore/trunk/docs/changelog.txt 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/docs/changelog.txt 2006-05-26 23:39:35 UTC (rev 507) @@ -1,5 +1,55 @@ + XOOPS v2.0.x Changelog + ============================ +2006/05/26: Version 2.0.14-RC1 +============================ + + +- Fixed bug #1476719: GroupPermForm client validation problem (skalpa) +- Fixed bug #1456176: PHP 5 installation problems (skalpa) +- Fixed debug mode support from the administration interface (skalpa) +- Fixed the "update templates from file" feature (skalpa) +- Fixed bug #1477969: wrong version for module (phppp) +- Fixed bug for template path (phppp/wenmingpig) +- Fixed bug for redirect after login (phppp) +- Several XHTML compliance fixes (skalpa) +- Several MySQL 4.1/5 strict mode fixes (phppp+skalpa) +- Enhanced columns criterias check (skalpa/report by gijoe) +- Applied the protector module comouflaged image check to the uploader (skalpa/code by gijoe) + +- Added new authentication system. Support for XOOPS Database, standard LDAP Directory, Microsoft Active Directory (pemen) +- New upgrade installer (pemen) +- Enhanced MySQL 4.1+ foreign encodings support (skalpa) +- Added avatar check to prevent unexpected avatar deletion (phppp) +- Added multiple file extensions sanitizing and image type check for uploader (phppp) +- Added ".svn" to preserved directory name; Removed unnecessary preg_match for directory/file name check (phppp+epaulin) +- Added xoops_redirect support to the closed site feature [patch #1206162/king] (skalpa) +- Added xoops_redirect support to history.go() (phppp) +- Added the possibility to display blocks below content (skalpa, original patch from McNaz) +- Backported the theme class from the 2.2/2.3 branches (skalpa) +- Added templates overloading capability to themes (skalpa) +- Added files resources overloading capability to themes (skalpa) +- Backported the URL generation Smarty plug-ins xoAppUrl and xoImgUrl from the 2.3 branch (skalpa) +- Backported the quick foreach and quick include Smarty plug-ins from the 2.3 branch (skalpa) +- Added the xoInboxCount Smarty plug-in (skalpa) +- Added text sanitizing to multiple files for $xoopsConfig['sitename'] and $xoopsConfig['slogan'] (phppp) +- Added localization for "Re" in comment (phppp) + +- Re-ordered user menu items to something more logical [patch #1264900/rabideau] (skalpa) +- Gave modules the possibility to return a message for diplay during the oninstall function [patch #1352943/bruno2000] (skalpa) +- Merged/optimized the logger and error handling classes (skalpa) +- Merged the PHP Debug and MySQL debug modes (skalpa) +- Changed private message list to new-first order (phppp) + +- Updated 3rd party libraries: Smarty 2.6.13, PHPMailer 1.73 (skalpa) + +Changes for translators: +- Added 3 new constants to the system/admin/blocksadmin (_AM_CBBOTTOM, _AM_CBBOTTOMLEFT, _AM_CBBOTTOMRIGHT) +- Several constants changed in system/admin/preferences (_MD_AM_DEBUGMODE1,_MD_AM_DEBUGMODE2,_MD_AM_THEMEFILE,_MD_AM_THEMEFILEDSC) +- Added one constant to language/english/comment.php (_CM_RE) + +============================ 2005/10/28: Version 2.0.13.2 ============================ - SECURITY: Fix to prevent mail headers injection (Skalpa/XOOPS Cube) @@ -56,7 +106,7 @@ - Implemented new token system for validating form origination and increased protection against CSRF (Mithrandir/Onokazu) - Security fix to avoid the usage of fopen and unlink when previewing (Onokazu) - Fixed bug - Missing </a> in news/templates/blocks/news_block_bigstory.html (Mithrandir/blacKurd) -- Fixed bug in header.php \x96 assign $xoops_lblocks (Mithrandir/phppp) +- Fixed bug in header.php ?assign $xoops_lblocks (Mithrandir/phppp) - Fixed bug #1087786 Can"t assign to $this in PHP5 (Mithrandir) - Included 2.0.9.3 fixes in 2.0.10 patch for easy upgrade from 2.0.9.2 (Mithrandir/rowd) - Fixed bug #1157029 - Bug in include/checklogin.php (Onokazu/sudhaker) Modified: XoopsCore/trunk/htdocs/banners.php =================================================================== --- XoopsCore/trunk/htdocs/banners.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/banners.php 2006-05-26 23:39:35 UTC (rev 507) @@ -86,7 +86,7 @@ <td class='b_td'><b>Imp. Left</b></td> <td class='b_td'><b>Clicks</b></td> <td class='b_td'><b>% Clicks</b></td> - <td class='b_td'><b>Functions</b></td><tr>"; + <td class='b_td'><b>Functions</b></td></tr>"; $result = $xoopsDB->query("select bid, imptotal, impmade, clicks, date from ".$xoopsDB->prefix("banner")." where cid=$cid"); while ( list($bid, $imptotal, $impmade, $clicks, $date) = $xoopsDB->fetchRow($result) ) { if ( $impmade == 0 ) { @@ -99,15 +99,15 @@ } else { $left = $imptotal-$impmade; } - echo "<td align='center'>$bid</td> + echo "<tr><td align='center'>$bid</td> <td align='center'>$impmade</td> <td align='center'>$imptotal</td> <td align='center'>$left</td> <td align='center'>$clicks</td> <td align='center'>$percent%</td> - <td align='center'><a href='banners.php?op=EmailStats&login=$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats</a></td><tr>"; + <td align='center'><a href='banners.php?op=EmailStats&login=$login&pass=$pass&cid=$cid&bid=$bid&t=".$GLOBALS['xoopsSecurity']->createToken()."'>E-mail Stats</a></td></tr>"; } - echo "</table><br /><br /><div>Following are your running Banners in ".$xoopsConfig['sitename']." </div><br /><br />"; + echo "</table><br /><br /><div>Following are your running Banners in " . htmlspecialchars( $xoopsConfig['sitename'] ). " </div><br /><br />"; $result = $xoopsDB->query("select bid, imageurl, clickurl, htmlbanner, htmlcode from ".$xoopsDB->prefix("banner")." where cid=$cid"); while ( list($bid, $imageurl, $clickurl,$htmlbanner, $htmlcode) = $xoopsDB->fetchRow($result) ) { $numrows = $xoopsDB->getRowsNum($result); Modified: XoopsCore/trunk/htdocs/class/criteria.php =================================================================== --- XoopsCore/trunk/htdocs/class/criteria.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/criteria.php 2006-05-26 23:39:35 UTC (rev 507) @@ -339,18 +339,13 @@ * @return string **/ function render() { - if ( strtoupper($this->operator) == 'IN' || strtoupper($this->operator) == "NOT IN") { - $value = $this->value; - } else { - if ( '' === ($value = trim($this->value)) ) { - return ''; - } - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - if (!class_exists('MyTextSanitizer')) { - include_once XOOPS_ROOT_PATH."/class/module.textsanitizer.php"; - } - $value = "'".addslashes(stripslashes($value))."'"; - } + $value = $this->value; + if ( !in_array( strtoupper($this->operator), array('IN', 'NOT IN') ) ) { + if ( ( substr( $value, 0, 1 ) != '`' ) && ( substr( $value, -1 ) != '`' ) ) { + $value = "'$value'"; + } elseif ( !preg_match( '/^[a-zA-Z0-9_\.\-`]*$/', $value ) ) { + $value = '``'; + } } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; if ( !empty($this->function) ) { Modified: XoopsCore/trunk/htdocs/class/database/database.php =================================================================== --- XoopsCore/trunk/htdocs/class/database/database.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/database/database.php 2006-05-26 23:39:35 UTC (rev 507) @@ -123,9 +123,9 @@ class Database { - function &getInstance() - { - return XoopsDatabaseFactory::getDatabaseConnection(); + function &getInstance() { + $inst =& XoopsDatabaseFactory::getDatabaseConnection(); + return $inst; } } Modified: XoopsCore/trunk/htdocs/class/database/mysqldatabase.php =================================================================== --- XoopsCore/trunk/htdocs/class/database/mysqldatabase.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/database/mysqldatabase.php 2006-05-26 23:39:35 UTC (rev 507) @@ -63,6 +63,25 @@ */ var $conn; + + var $charsets = array( + 'iso-8859-1' => 'latin1', + 'iso-8859-2' => 'latin2', + 'iso-8859-7' => 'greek', + 'iso-8859-8' => 'hebrew', + 'iso-8859-9' => 'latin5', + 'iso-8859-13' => 'latin7', + 'big5' => 'big5', + 'euc-jp' => 'ujis', + 'euc-kr' => 'euckr', + 'gb2312' => 'gb2312', + 'windows-1250' => 'cp1250', + 'windows-1251' => 'cp1251', + 'windows-1256' => 'cp1256', + 'windows-1257' => 'cp1257', + 'utf-8' => 'utf8', + ); + /** * connect to the database * @@ -81,7 +100,10 @@ $this->logger->addQuery('', $this->error(), $this->errno()); return false; } - + if ( defined( '_CHARSET' ) || defined( '_INSTALL_CHARSET' ) ) { + $this->setClientCharset(); + } + if($selectdb != false){ if (!mysql_select_db(XOOPS_DB_NAME)) { $this->logger->addQuery('', $this->error(), $this->errno()); @@ -91,6 +113,16 @@ return true; } + function setClientCharset( $charset = '' ) { + if ( empty( $charset ) ) { + $charset = strtolower( defined( '_CHARSET' ) ? _CHARSET : _INSTALL_CHARSET ); + } + if ( isset( $this->charsets[$charset] ) ) { + @mysql_query( "SET NAMES '{$this->charsets[$charset]}'" ); + } + } + + /** * generate an ID for a new row * @@ -228,7 +260,7 @@ * @return resource query result or FALSE if successful * or TRUE if successful and no result */ - function &queryF($sql, $limit=0, $start=0) + function queryF($sql, $limit=0, $start=0) { if ( !empty($limit) ) { if (empty($start)) { @@ -236,7 +268,7 @@ } $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit; } - $result =& mysql_query($sql, $this->conn); + $result = mysql_query($sql, $this->conn); if ( $result ) { $this->logger->addQuery($sql); return $result; @@ -258,7 +290,7 @@ * * @abstract */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { } @@ -346,7 +378,7 @@ * @return resource query result or FALSE if successful * or TRUE if successful and no result */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { return $this->queryF($sql, $limit, $start); } @@ -378,7 +410,7 @@ * @param int $start offset of first record to return * @return resource query result or FALSE if unsuccessful */ - function &query($sql, $limit=0, $start=0) + function query($sql, $limit=0, $start=0) { $sql = ltrim($sql); if (strtolower(substr($sql, 0, 6)) == 'select') { Modified: XoopsCore/trunk/htdocs/class/errorhandler.php =================================================================== --- XoopsCore/trunk/htdocs/class/errorhandler.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/errorhandler.php 2006-05-26 23:39:35 UTC (rev 507) @@ -25,191 +25,27 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // +defined( 'XOOPS_ROOT_PATH' ) or die(); + +require_once XOOPS_ROOT_PATH . '/class/logger.php'; + /** - * Error handler class - * - * @author Michael van Dam + * Backward compatibility code, do not use this class directly */ -class XoopsErrorHandler -{ +class XoopsErrorHandler extends XoopsLogger { /** - * List of errors - * - * @var array - * @access private - */ - var $_errors = array(); - - /** - * Show error messages? - * - * @var boolean - * @access private - */ - var $_showErrors = false; - - /** - * Was there a fatal error (E_USER_ERROR) - * - * @var boolean - * @access private - */ - var $_isFatal = false; - - /** - * Constructor - * - * Registers the error handler and shutdown functions. NOTE: when - * registering an error handler, the setting or 'error_reporting' is - * ignored and *everything* is trapped. - */ - function XoopsErrorHandler() - { - set_error_handler('XoopsErrorHandler_HandleError'); - register_shutdown_function('XoopsErrorHandler_Shutdown'); - } - - /** - * Get the (singleton) instance of the error handler - * - * @access public - */ - function &getInstance() - { - static $instance = null; - if (empty($instance)) { - $instance = new XoopsErrorHandler; - } - return $instance; - } - - /** * Activate the error handler - * - * @access public - * @param boolean $showErrors True if debug mode is on - * @return void */ - function activate($showErrors=false) - { - $this->_showErrors = $showErrors; + function activate( $showErrors = false ) { + $this->activated = $showErrors; } /** - * Handle an error - * - * @param array $error Associative array containing error info - * @access public - * @return void - */ - function handleError($error) - { - if (($error['errno'] & error_reporting()) != $error['errno']) { - return; - } - $this->_errors[] = $error; - if ($error['errno'] == E_USER_ERROR) { - $this->_isFatal = true; - exit(); - } - } - - /** * Render the list of errors - * - * NOTE: Unfortunately PHP 'fatal' and 'parse' errors are not trappable. - * If the server has 'display_errors Off', then the result will be a - * blank page. It would be nice to print a message 'This page cannot - * be displayed', but there seems to be no way to print this only when - * exiting due to a fatal error rather than normal end of page. - * - * Thus, 'trigger_error' should be used to trap problems early and - * display a meaningful message before a PHP fatal or parse error can - * occur. - * - * @TODO Use CSS - * @TODO Use language? or allow customized message? - * - * @access public - * @return void */ - function renderErrors() - { - $output = ''; - if ($this->_isFatal) { - $output .= 'This page cannot be displayed due to an internal error.<br/><br/>'; - $output .= 'If you are the administrator of this site, please visit the <a href="http://wiki.xoops.org/wakka.php?wakka=TroubleshootingBlankPage">Xoops Troubleshooting Page</a> for assistance.<br/><br/>'; - } - if (!$this->_showErrors || empty($this->_errors)) { - return $output; - } + function renderErrors() { + return $this->dump( 'errors' ); + } +} - foreach( $this->_errors as $error ) - { - switch ( $error['errno'] ) - { - case E_USER_NOTICE: - $output .= "Notice [Xoops]: "; - break; - case E_USER_WARNING: - $output .= "Warning [Xoops]: "; - break; - case E_USER_ERROR: - $output .= "Error [Xoops]: "; - break; - case E_NOTICE: - $output .= "Notice [PHP]: "; - break; - case E_WARNING: - $output .= "Warning [PHP]: "; - break; - default: - $output .= "Unknown Condition [" . $error['errno'] . "]: "; - } - $output .= sprintf( "%s in file %s line %s<br>\n", $error['errstr'], $error['errfile'], $error['errline'] ); - } - return $output; - } - -} - -/** - * User-defined error handler (called from 'trigger_error') - * - * NOTE: Some recent versions of PHP have a 5th parameter, &$p_ErrContext - * which is an associative array of all variables defined in scope in which - * error occurred. We cannot support this, for compatibility with older PHP. - * - * @access public - * @param int $errNo Type of error - * @param string $errStr Error message - * @param string $errFile File in which error occurred - * @param int $errLine Line number on which error occurred - * @return void - */ -function XoopsErrorHandler_HandleError($errNo, $errStr, $errFile, $errLine) -{ - // NOTE: we only store relative pathnames - $new_error = array( - 'errno' => $errNo, - 'errstr' => $errStr, - 'errfile' => preg_replace("|^" . XOOPS_ROOT_PATH . "/|", '', $errFile), - 'errline' => $errLine - ); - $error_handler =& XoopsErrorHandler::getInstance(); - $error_handler->handleError($new_error); -} - -/** - * User-defined shutdown function (called from 'exit') - * - * @access public - * @return void - */ -function XoopsErrorHandler_Shutdown() -{ - $error_handler =& XoopsErrorHandler::getInstance(); - echo $error_handler->renderErrors(); -} - -?> +?> \ No newline at end of file Modified: XoopsCore/trunk/htdocs/class/logger.php =================================================================== --- XoopsCore/trunk/htdocs/class/logger.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/logger.php 2006-05-26 23:39:35 UTC (rev 507) @@ -1,50 +1,28 @@ <?php -// $Id$ -// ------------------------------------------------------------------------ // -// XOOPS - PHP Content Management System // -// Copyright (c) 2000 XOOPS.org // -// <http://www.xoops.org/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: Kazumi Ono (AKA onokazu) // -// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ // -// Project: The XOOPS Project // -// ------------------------------------------------------------------------- // +/** + * XoopsLogger component main class file + * + * See the enclosed file LICENSE for licensing information. + * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html + * + * @copyright The XOOPS project http://www.xoops.org/ + * @license http://www.fsf.org/copyleft/gpl.html GNU public license + * @author Kazumi Ono <on...@xo...> + * @author Skalpa Keo <sk...@xo...> + * @since 2.0 + * @package xos_kernel + * @subpackage XoopsLogger + * @version $Id$ + */ /** * Collects information for a page request * - * <b>Singelton:</b> There can be only one instance of this class and it must - * be accessed through the {@link instance()} method! - * - * records information about database queries, blocks, and execution time - * and can display it as HTML - * - * @author Kazumi Ono <on...@xo...> - * @copyright copyright (c) 2000-2003 XOOPS.org - * - * @package kernel + * Records information about database queries, blocks, and execution time + * and can display it as HTML. It also catches php runtime errors. + * @package xos_kernel */ -class XoopsLogger -{ +class XoopsLogger { /**#@+ * @var array */ @@ -53,186 +31,156 @@ var $extra = array(); var $logstart = array(); var $logend = array(); + var $errors = array(); /**#@-*/ - /** - * constructor - * - * @access private - */ - function XoopsLogger() - { - + var $usePopup = false; + var $activated = true; + + /**@access protected*/ + var $renderingEnabled = false; + + function XoopsLogger() { + // Always catch errors, for security reasons + set_error_handler( array( &$this, 'handleError' ) ); } - /** - * get a reference to the only instance of this class - * + * Get a reference to the only instance of this class * @return object XoopsLogger reference to the only instance */ - function &instance() - { - static $instance; - if (!isset($instance)) { - $instance = new XoopsLogger(); - } - return $instance; + function &instance() { + // @internal: Using a static var didnt work with PHP5+ (the output handler was called on a clone) + if ( !isset( $GLOBALS['xoopsLogger'] ) || !is_object( $GLOBALS['xoopsLogger'] ) ) { + $GLOBALS['xoopsLogger'] =& new XoopsLogger(); + } + return $GLOBALS['xoopsLogger']; } - + /** + * Enable logger output rendering + * When output rendering is enabled, the logger will insert its output within the page content. + * If the string <!--{xo-logger-output}--> is found in the page content, the logger output will + * replace it, otherwise it will be inserted after all the page output. + */ + function enableRendering() { + if ( !$this->renderingEnabled ) { + ob_start( array( &$this, 'render' ) ); + $this->renderingEnabled = true; + } + } + /** + * Returns the current microtime in seconds. + * @return float + */ + function microtime() { + $now = explode( ' ', microtime() ); + return (float)$now[0] + (float)$now[1]; + } /** - * start a timer - * + * Start a timer * @param string $name name of the timer - * */ - function startTime($name = 'XOOPS') - { - $this->logstart[$name] = explode(' ', microtime()); + function startTime($name = 'XOOPS') { + $this->logstart[$name] = $this->microtime(); } - /** - * stop a timer - * + * Stop a timer * @param string $name name of the timer */ - function stopTime($name = 'XOOPS') - { - $this->logend[$name] = explode(' ', microtime()); + function stopTime($name = 'XOOPS') { + $this->logend[$name] = $this->microtime(); } - /** - * log a database query - * + * Log a database query * @param string $sql SQL string * @param string $error error message (if any) * @param int $errno error number (if any) */ - function addQuery($sql, $error=null, $errno=null) - { - $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno); + function addQuery($sql, $error=null, $errno=null) { + if ( $this->activated ) $this->queries[] = array('sql' => $sql, 'error' => $error, 'errno' => $errno); } - /** - * log display of a block - * + * Log display of a block * @param string $name name of the block * @param bool $cached was the block cached? * @param int $cachetime cachetime of the block */ - function addBlock($name, $cached = false, $cachetime = 0) - { - $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime); + function addBlock($name, $cached = false, $cachetime = 0) { + if ( $this->activated ) $this->blocks[] = array('name' => $name, 'cached' => $cached, 'cachetime' => $cachetime); } - /** - * log extra information - * + * Log extra information * @param string $name name for the entry * @param int $msg text message for the entry */ - function addExtra($name, $msg) - { - $this->extra[] = array('name' => $name, 'msg' => $msg); + function addExtra($name, $msg) { + if ( $this->activated ) $this->extra[] = array('name' => $name, 'msg' => $msg); } - /** - * get the logged queries in a HTML table - * - * @return string HTML table with queries - */ - function dumpQueries() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th>Queries</th></tr>'; - $class = 'even'; - foreach ($this->queries as $q) { - if (isset($q['error'])) { - $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'].'</span></td></tr>'; - } else { - $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']).'</td></tr>'; - } - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->queries).'</span> queries</td></tr></table><br />'; - return $ret; - } + /** + * Error handling callback (called by the zend engine) + */ + function handleError( $errno, $errstr, $errfile, $errline ) { + if ( $this->activated && ( $errno & error_reporting() ) ) { + // NOTE: we only store relative pathnames + $errfile = str_replace( array( '\\', XOOPS_ROOT_PATH ), array( '/', '' ), $errfile ); + $this->errors[] = compact( 'errno', 'errstr', 'errfile', 'errline' ); + } + if ( $errno == E_USER_ERROR ) { + echo 'This page cannot be displayed due to an internal error.<br/><br/>'; + echo 'If you are the administrator of this site, please visit the <a href="http://wiki.xoops.org/wakka.php?wakka=TroubleshootingBlankPage">Xoops Troubleshooting Page</a> for assistance.<br/><br/>'; + exit(); + } + } + /** + * Output buffering callback inserting logger dump in page output + */ + function render( $output ) { + global $xoopsUser; + if ( !$this->activated || !$xoopsUser || !$xoopsUser->isAdmin() ) { + return $output; + } + $this->renderingEnabled = $this->activated = false; + + $log = "\n<div id=\"xo-logger-output\">\n" . $this->dump( $this->usePopup ? 'popup' : '' ) . "\n</div>\n"; - /** - * get the logged blocks in a HTML table - * - * @return string HTML table with blocks + $pattern = '<!--{xo-logger-output}-->'; + $pos = strpos( $output, $pattern ); + if ( $pos !== false ) { + return substr( $output, 0, $pos ) . $log . substr( $output, $pos + strlen( $pattern ) ); + } else { + return $output . $log; + } + } + /**#@+ + * @protected */ - function dumpBlocks() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Blocks</th></tr>'; - $class = 'even'; - foreach ($this->blocks as $b) { - if ($b['cached']) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>'; - } else { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> No Cache</td></tr>'; - } - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table><br />'; - return $ret; - } - + function dump( $mode = '' ) { + include XOOPS_ROOT_PATH . '/class/logger_render.php'; + return $ret; + } /** * get the current execution time of a timer * * @param string $name name of the counter * @return float current execution time of the counter */ - function dumpTime($name = 'XOOPS') - { - if (!isset($this->logstart[$name])) { + function dumpTime( $name = 'XOOPS' ) { + if ( !isset($this->logstart[$name]) ) { return 0; } - if (!isset($this->logend[$name])) { - $stop_time = explode(' ', microtime()); - } else { - $stop_time = $this->logend[$name]; - } - return ((float)$stop_time[1] + (float)$stop_time[0]) - ((float)$this->logstart[$name][1] + (float)$this->logstart[$name][0]); + $stop = isset( $this->logend[$name] ) ? $this->logend[$name] : $this->microtime(); + return $stop - $this->logstart[$name]; } - - /** - * get extra information in a HTML table - * - * @return string HTML table with extra information + /**#@-*/ + /**#@+ + * @deprecated */ - function dumpExtra() - { - $ret = '<table class="outer" width="100%" cellspacing="1"><tr><th colspan="2">Extra</th></tr>'; - $class = 'even'; - foreach ($this->extra as $ex) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>'; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '</table><br />'; - return $ret; - } - - /** - * get all logged information formatted in HTML tables - * - * @return string HTML output - */ - function dumpAll() - { - $ret = $this->dumpQueries(); - $ret .= $this->dumpBlocks(); - if (count($this->logstart) > 0) { - $ret .= '<table class="outer" width="100%" cellspacing="1"><tr><th>Execution Time</th></tr>'; - $class = 'even'; - foreach ($this->logstart as $k => $v) { - $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">'.$this->dumpTime($k).'</span> seconds to load.</td></tr>'; - $class = ($class == 'odd') ? 'even' : 'odd'; - } - $ret .= '</table><br />'; - } - $ret .= $this->dumpExtra(); - return $ret; - } + function dumpAll() { return $this->dump( '' ); } + function dumpBlocks() { return $this->dump( 'blocks' ); } + function dumpExtra() { return $this->dump( 'extra' ); } + function dumpQueries() { return $this->dump( 'queries' ); } + /**#@-*/ } + + ?> \ No newline at end of file Copied: XoopsCore/trunk/htdocs/class/logger_render.php (from rev 506, XoopsCore/branches/2.0.x/2.0-main/htdocs/class/logger_render.php) =================================================================== --- XoopsCore/trunk/htdocs/class/logger_render.php (rev 0) +++ XoopsCore/trunk/htdocs/class/logger_render.php 2006-05-26 23:39:35 UTC (rev 507) @@ -0,0 +1,177 @@ +<?php + +defined( 'XOOPS_ROOT_PATH' ) or die(); + +$ret = ''; + +if ( $mode == 'popup' ) { + $dump = $this->dump( '' ); + $content = ' +<html> +<head> + <meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" /> + <meta http-equiv="content-language" content="'._LANGCODE.'" /> + <title>'.$xoopsConfig['sitename'].'</title> + <link rel="stylesheet" type="text/css" media="all" href="'.getcss($xoopsConfig['theme_set']).'" /> +</head> +<body>' . $dump . ' + <div style="text-align:center;"> + <input class="formButton" value="'._CLOSE.'" type="button" /> + </div> +</body> +</html>'; + $ret .= ' +<script type="text/javascript"> + debug_window = openWithSelfMain("about:blank", "popup", 680, 450, true); + debug_window.document.clear(); +'; + $lines = preg_split("/(\r\n|\r|\n)( *)/", $content); + foreach ($lines as $line) { + $ret .= "\n" . 'debug_window.document.writeln("'.str_replace( array( '"', '</' ), array( '\"', '<\/' ), $line).'");'; + } + $ret .= ' + debug_window.focus(); + debug_window.document.close(); +</script>'; +} + +if ( empty( $mode ) ) { + $views = array( 'errors', 'queries', 'blocks', 'extra' ); + $ret .= "<div id='xo-logger-tabs'>\n"; + $ret .= "<a href='javascript:xoSetLoggerView(\"\")'>All</a>\n"; + foreach ( $views as $view ) { + $count = count( $this->$view ); + $ret .= "<a href='javascript:xoSetLoggerView(\"$view\")'>$view ($count)</a>\n"; + } + $count = count( $this->logstart ); + $ret .= "<a href='javascript:xoSetLoggerView(\"timers\")'>timers ($count)</a>\n"; + $ret .= "</div>\n"; +} + +if ( empty($mode) || $mode == 'errors' ) { + $types = array( + E_USER_NOTICE => 'Notice', + E_USER_WARNING => 'Warning', + E_USER_ERROR => 'Error', + E_NOTICE => 'Notice', + E_WARNING => 'Warning', + E_STRICT => 'Strict', + ); + $class = 'even'; + $ret .= '<table id="xo-logger-errors" class="outer"><tr><th>Errors</th></tr>'; + foreach ( $this->errors as $error ) { + $ret .= "\n<tr><td class='$class'>"; + $ret .= isset( $types[ $error['errno'] ] ) ? $types[ $error['errno'] ] : 'Unknown'; + $ret .= sprintf( ": %s in file %s line %s<br />\n", $error['errstr'], $error['errfile'], $error['errline'] ); + $ret .= "</td></tr>"; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= "\n</table>\n"; +} + +if ( empty($mode) || $mode == 'queries' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-queries" class="outer"><tr><th>Queries</th></tr>'; + foreach ($this->queries as $q) { + if (isset($q['error'])) { + $ret .= '<tr class="'.$class.'"><td><span style="color:#ff0000;">'.htmlentities($q['sql']).'<br /><b>Error number:</b> '.$q['errno'].'<br /><b>Error message:</b> '.$q['error'].'</span></td></tr>'; + } else { + $ret .= '<tr class="'.$class.'"><td>'.htmlentities($q['sql']).'</td></tr>'; + } + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->queries).'</span> queries</td></tr></table>'; +} +if ( empty($mode) || $mode == 'blocks' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-blocks" class="outer"><tr><th colspan="2">Blocks</th></tr>'; + foreach ($this->blocks as $b) { + if ($b['cached']) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> Cached (regenerates every '.intval($b['cachetime']).' seconds)</td></tr>'; + } else { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($b['name']).':</b> No Cache</td></tr>'; + } + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '<tr class="foot"><td>Total: <span style="color:#ff0000;">'.count($this->blocks).'</span> blocks</td></tr></table>'; +} +if ( empty($mode) || $mode == 'extra' ) { + $this->addExtra( 'Included files', count ( get_included_files() ) . ' files' ); + $memory = 0; + if ( function_exists( 'memory_get_usage' ) ) { + $memory = memory_get_usage() . ' bytes'; + } else { + $os = isset( $_ENV['OS'] ) ? $_ENV['OS'] : $_SERVER['OS']; + if ( strpos( strtolower( $os ), 'windows') !== false ) { + $out = array(); + exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $out ); + $memory = substr( $out[5], strpos( $out[5], ':') + 1) . ' [Estimated]'; + } + } + if ( $memory ) { + $this->addExtra( 'Memory usage', $memory ); + } + + $class = 'even'; + $ret .= '<table id="xo-logger-extra" class="outer"><tr><th colspan="2">Extra</th></tr>'; + foreach ($this->extra as $ex) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($ex['name']).':</b> '.htmlspecialchars($ex['msg']).'</td></tr>'; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '</table>'; +} +if ( empty($mode) || $mode == 'timers' ) { + $class = 'even'; + $ret .= '<table id="xo-logger-timers" class="outer"><tr><th colspan="2">Timers</th></tr>'; + foreach ( $this->logstart as $k => $v ) { + $ret .= '<tr><td class="'.$class.'"><b>'.htmlspecialchars($k).'</b> took <span style="color:#ff0000;">' . sprintf( "%.03f", $this->dumpTime($k) ) . '</span> seconds to load.</td></tr>'; + $class = ($class == 'odd') ? 'even' : 'odd'; + } + $ret .= '</table>'; +} + +if ( empty( $mode ) ) { + $ret .= <<<EOT +<script type="text/javascript"> + function xoLogCreateCookie(name,value,days) { + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else var expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; + } + function xoLogReadCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; + } + function xoLogEraseCookie(name) { + createCookie(name,"",-1); + } + function xoSetLoggerView( name ) { + var log = document.getElementById( "xo-logger-output" ); + if ( !log ) return; + var i, elt; + for ( i=0; i!=log.childNodes.length; i++ ) { + elt = log.childNodes[i]; + if ( elt.tagName && elt.tagName.toLowerCase() != 'script' && elt.id != "xo-logger-tabs" ) { + elt.style.display = ( !name || elt.id == "xo-logger-" + name ) ? "block" : "none"; + } + } + xoLogCreateCookie( 'XOLOGGERVIEW', name, 1 ); + } + xoSetLoggerView( xoLogReadCookie( 'XOLOGGERVIEW' ) ); +</script> + +EOT; +} + + +?> \ No newline at end of file Modified: XoopsCore/trunk/htdocs/class/mail/phpmailer/ChangeLog.txt =================================================================== --- XoopsCore/trunk/htdocs/class/mail/phpmailer/ChangeLog.txt 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/mail/phpmailer/ChangeLog.txt 2006-05-26 23:39:35 UTC (rev 507) @@ -1,5 +1,35 @@ ChangeLog +Version 1.73 (Sun, Jun 10 2005) +* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf +* Now has a total of 20 translations +* Fixed alt attachments bug: http://tinyurl.com/98u9k + +Version 1.72 (Wed, May 25 2004) +* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. +* Received: Removed this method because spam filter programs like +SpamAssassin reject this header. +* Fixed error count bug. +* SetLanguage default is now "language/". +* Fixed magic_quotes_runtime bug. + +Version 1.71 (Tue, Jul 28 2003) +* Made several speed enhancements +* Added German and Italian translation files +* Fixed HELO/AUTH bugs on keep-alive connects +* Now provides an error message if language file does not load +* Fixed attachment EOL bug +* Updated some unclear documentation +* Added additional tests and improved others + +Version 1.70 (Mon, Jun 20 2003) +* Added SMTP keep-alive support +* Added IsError method for error detection +* Added error message translation support (SetLanguage) +* Refactored many methods to increase library performance +* Hello now sends the newer EHLO message before HELO as per RFC 2821 +* Removed the boundary class and replaced it with GetBoundary +* Removed queue support methods * New $Hostname variable * New Message-ID header * Received header reformat @@ -10,6 +40,7 @@ * quoted-encoding should now encode NULs \000 * Fixed encoding of body/AltBody (#553370) * Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) +* Multiple bug fixes Version 1.65 (Fri, Aug 09 2002) * Fixed non-visible attachment bug (#585097) for Outlook Modified: XoopsCore/trunk/htdocs/class/mail/phpmailer/README =================================================================== --- XoopsCore/trunk/htdocs/class/mail/phpmailer/README 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/mail/phpmailer/README 2006-05-26 23:39:35 UTC (rev 507) @@ -1,10 +1,12 @@ -phpmailer - PHP email class -============================== -http://phpmailer.sourceforge.net +PHPMailer +Full Featured Email Transfer Class for PHP +========================================== -Please read LICENSE for information on this softwares availability and -distribution. +http://phpmailer.sourceforge.net/ +This software is licenced under the LGPL. Please read LICENSE for information on the +software availability and distribution. + Class Features: - Send emails with multiple TOs, CCs, BCCs and REPLY-TOs - Redundant SMTP servers @@ -12,8 +14,8 @@ - Support for 8bit, base64, binary, and quoted-printable encoding - Uses the same methods as the very popular AspEmail active server (COM) component - SMTP authentication -- Word wrap -- Many more... +- Native language support +- Word wrap, and more! Why you might need it: @@ -37,19 +39,34 @@ Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well. +In the language directory you will find several files like +phpmailer.lang-en.php. If you look right before the .php extension +that there are two letters. These represent the language type of the +translation file. For instance "en" is the English file and "br" is +the Portuguese file. Chose the file that best fits with your language +and place it in the PHP include path. If your language is English +then you have nothing more to do. If it is a different language then +you must point PHPMailer to the correct translation. To do this, call +the PHPMailer SetLanguage method like so: -Example +// To load the Portuguese version +$mail->SetLanguage("br", "/optional/path/to/language/directory/"); +That's it. You should now be ready to use PHPMailer! + + +A Simple Example: + <?php require("class.phpmailer.php"); -$mail = new phpmailer(); +$mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true // turn on SMTP authentication -$mail->Username = "jswan" // SMTP username -$mail->Password = "secret" // SMTP password +$mail->SMTPAuth = true; // turn on SMTP authentication +$mail->Username = "jswan"; // SMTP username +$mail->Password = "secret"; // SMTP password $mail->From = "fr...@ex..."; $mail->FromName = "Mailer"; @@ -82,4 +99,4 @@ Download: http://sourceforge.net/project/showfiles.php?group_id=26031 -Brent R. Matzelle <bma...@ya...> +Brent R. Matzelle Modified: XoopsCore/trunk/htdocs/class/mail/phpmailer/class.phpmailer.php =================================================================== --- XoopsCore/trunk/htdocs/class/mail/phpmailer/class.phpmailer.php 2006-05-26 23:10:37 UTC (rev 506) +++ XoopsCore/trunk/htdocs/class/mail/phpmailer/class.phpmailer.php 2006-05-26 23:39:35 UTC (rev 507) @@ -1,1779 +1,1499 @@ -<?php -//////////////////////////////////////////////////// -// phpmailer - PHP email class -// -// Version 1.65, Created 08/09/2002 -// -// Class for sending email using either -// sendmail, PHP mail(), or SMTP. Methods are -// based upon the standard AspEmail(tm) classes. -// -// Author: Brent R. Matzelle <bma...@ya...> -// -// License: LGPL, see LICENSE -//////////////////////////////////////////////////// - -/** - * phpmailer - PHP email transport class - * @author Brent R. Matzelle - */ -class phpmailer -{ - ///////////////////////////////////////////////// - // PUBLIC VARIABLES - ///////////////////////////////////////////////// - - /** - * Email priority (1 = High, 3 = Normal, 5 = low). - * @access public - * @var int - */ - var $Priority = 3; - - /** - * Sets the CharSet of the message. - * @access public - * @var string - */ - var $CharSet = "iso-8859-1"; - - /** - * Sets the Content-type of the message. - * @access public - * @var string - */ - var $ContentType = "text/plain"; - - /** - * Sets the Encoding of the message. Options for this are "8bit", - * "7bit", "binary", "base64", and "quoted-printable". - * @access public - * @var string - */ - var $Encoding = "8bit"; - - /** - * Holds the most recent mailer error message. - * @access public - * @var string - */ - var $ErrorInfo = ""; - - /** - * Sets the From email address for the message. - * @access public - * @var string - */ - var $From = "root@localhost"; - - /** - * Sets the From name of the message. - * @access public - * @var string - */ - var $FromName = "Root User"; - - /** - * Sets the Sender email of the message. If not empty, will be sent via -f to sendmail - * or as 'MAIL FROM' in smtp mode. - * @access public - * @var string - */ - var $Sender = ""; - - /** - * Sets the Subject of the message. - * @access public - * @var string - */ - var $Subject = ""; - - /** - * Sets the Body of the message. This can be either an HTML or text body. - * If HTML then run IsHTML(true). - * @access public - * @var string - */ - var $Body = ""; - - /** - * Sets the text-only body of the message. This automatically sets the - * email to multipart/alternative. This body can be read by mail - * clients that do not have HTML email capability such as mutt. Clients - * that can read HTML will view the normal Body. - * @access public - * @var string - */ - var $AltBody = ""; - - /** - * Sets word wrapping on the body of the message to a given number of - * characters. - * @access public - * @var int - */ - var $WordWrap = 0; - - /** - * Method to send mail: ("mail", "sendmail", or "smtp"). - * @access public - * @var string - */ - var $Mailer = "mail"; - - /** - * Sets the path of the sendmail program. - * @access public - * @var string - */ - var $Sendmail = "/usr/sbin/sendmail"; - - /** - * Turns Microsoft mail client headers on and off. Useful mostly - * for older clients. - * @access public - * @var bool - */ - var $UseMSMailHeaders = false; - - /** - * Path to phpmailer plugins. This is now only useful if the SMTP class - * is in a different directory than the PHP include path. - * @access public - * @var string - */ - var $PluginDir = ""; - - /** - * Holds phpmailer version. - * @access public - * @var string - */ - var $Version = "1.65"; - - /** - * Sets the email address that a reading confirmation will be sent. - * @access public - * @var string - */ - var $ConfirmReadingTo = ""; - - /** - * Sets the line endings of the message. - * @access public - * @var string - */ - var $LE = "\n"; - - /** - * Sets the hostname to use in Message-Id and Received headers - * and as default HELO string. If empty, the value returned - * by SERVER_NAME is used or 'localhost.localdomain'. - * @access public - * @var string - */ - var $Hostname = ""; - - - ///////////////////////////////////////////////// - // SMTP VARIABLES - ///////////////////////////////////////////////// - - /** - * Sets the SMTP hosts. All hosts must be separated by a - * semicolon. You can also specify a different port - * for each host by using this format: [hostname:port] - * (e.g. "smtp1.example.com:25;smtp2.example.com"). - * Hosts will be tried in order. - * @access public - * @var string - */ - var $Host = "localhost"; - - /** - * Sets the default SMTP server port. - * @access public - * @var int - */ - var $Port = 25; - - /** - * Sets the SMTP HELO of the message (Default is $Hostname). - * @access public - * @var string - */ - var $Helo = ""; - - /** - * Sets SMTP authentication. Utilizes the Username and Password variables. - * @access public - * @var bool - */ - var $SMTPAuth = false; - - /** - * Sets SMTP username. - * @access public - * @var string - */ - var $Username = ""; - - /** - * Sets SMTP password. - * @access public - * @var string - */ - var $Password = ""; - - /** - * Sets the SMTP server timeout in seconds. This function will not - * work with the win32 version. - * @access public - * @var int - */ - var $Timeout = 10; - - /** - * Sets SMTP class debugging on or off. - * @access public - * @var bool - */ - var $SMTPDebug = false; - - - ///////////////////////////////////////////////// - // PRIVATE VARIABLES - ////////... [truncated message content] |
|
From: <sk...@us...> - 2006-05-26 21:53:27
|
Revision: 504 Author: skalpa Date: 2006-05-26 14:53:19 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=504&view=rev Log Message: ----------- Minor protection added to the upgrade script (removed error reporting and added path check) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php Modified: XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php 2006-05-26 21:35:40 UTC (rev 503) +++ XoopsCore/branches/2.0.x/2.0.14/upgrade/2.0.13-to-2.0.14/index.php 2006-05-26 21:53:19 UTC (rev 504) @@ -24,8 +24,12 @@ // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // -include_once '../mainfile.php'; -error_reporting (E_ALL); +@include_once '../mainfile.php'; + +if ( !defined( 'XOOPS_ROOT_PATH' ) ) { + die( 'Bad installation: please add this folder to the XOOPS install you want to upgrade'); +} + $myts = MyTextSanitizer::getInstance(); if (isset($_POST) ) { foreach ($_POST as $k => $v) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 21:35:46
|
Revision: 503 Author: skalpa Date: 2006-05-26 14:35:40 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=503&view=rev Log Message: ----------- Updated changelog, and added the date to 2014RC1 Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt Modified: XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-26 20:58:50 UTC (rev 502) +++ XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-26 21:35:40 UTC (rev 503) @@ -2,7 +2,7 @@ XOOPS v2.0.x Changelog ============================ -2006/05/xx: Version 2.0.14-RC1 +2006/05/26: Version 2.0.14-RC1 ============================ @@ -15,6 +15,8 @@ - Fixed bug for redirect after login (phppp) - Several XHTML compliance fixes (skalpa) - Several MySQL 4.1/5 strict mode fixes (phppp+skalpa) +- Enhanced columns criterias check (skalpa/report by gijoe) +- Applied the protector module comouflaged image check to the uploader (skalpa/code by gijoe) - Added new authentication system. Support for XOOPS Database, standard LDAP Directory, Microsoft Active Directory (pemen) - New upgrade installer (pemen) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 20:58:57
|
Revision: 502 Author: skalpa Date: 2006-05-26 13:58:50 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=502&view=rev Log Message: ----------- Fixed the image type check (code used directly coming from protector) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/uploader.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/uploader.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/uploader.php 2006-05-26 20:03:51 UTC (rev 501) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/uploader.php 2006-05-26 20:58:50 UTC (rev 502) @@ -115,9 +115,11 @@ var $savedFileName; var $extensionToMime = array(); - - var $extensionsToBeSanitized = array("php", "php3", "php5"); var $checkImageType = true; + + var $extensionsToBeSanitized = array( 'php' , 'phtml' , 'phtm' , 'php3' , 'php4' , 'cgi' , 'pl' , 'asp', 'php5' ); + // extensions needed image check (anti-IE Content-Type XSS) + var $imageExtensions = array( 1 => 'gif', 2 => 'jpg', 3 => 'png', 4 => 'swf', 5 => 'psd', 6 => 'bmp', 7 => 'tif', 8 => 'tif', 9 => 'jpc', 10 => 'jp2', 11 => 'jpx', 12 => 'jb2', 13 => 'swc', 14 => 'iff', 15 => 'wbmp', 16 => 'xbm' ); /** * Constructor @@ -350,6 +352,16 @@ if (!move_uploaded_file($this->mediaTmpName, $this->savedDestination)) { return false; } + // Check IE XSS before returning success + $ext = strtolower( substr( strrchr( $this->savedDestination , '.' ) , 1 ) ) ; + if( in_array( $ext , $this->imageExtensions ) ) { + $info = @getimagesize( $this->savedDestination ) ; + if( $info === false || $this->imageExtensions[ (int)$info[2] ] != $ext ) { + $this->setErrors( 'Suspicious image upload refused' ); + @unlink( $this->savedDestination ); + return false; + } + } @chmod($this->savedDestination, $chmod); return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-26 20:04:04
|
Revision: 501 Author: skalpa Date: 2006-05-26 13:03:51 -0700 (Fri, 26 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=501&view=rev Log Message: ----------- Added stronger sanitizing to the criteria class Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/criteria.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/criteria.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/criteria.php 2006-05-25 19:06:54 UTC (rev 500) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/criteria.php 2006-05-26 20:03:51 UTC (rev 501) @@ -343,8 +343,10 @@ if ( !in_array( strtoupper($this->operator), array('IN', 'NOT IN') ) ) { if ( ( substr( $value, 0, 1 ) != '`' ) && ( substr( $value, -1 ) != '`' ) ) { $value = "'$value'"; - } - } + } elseif ( !preg_match( '/^[a-zA-Z0-9_\.\-`]*$/', $value ) ) { + $value = '``'; + } + } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; if ( !empty($this->function) ) { $clause = sprintf($this->function, $clause); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: - 2006-05-26 02:47:45
|
<html> <head> <meta name=3D"GENERATOR" content=3D"Microsoft FrontPage 5.0"> <meta name=3D"ProgId" content=3D"FrontPage.Editor.Document"> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dbig5"> <title>=A4W=AFZ=B1=DA=BD=D5=C1~=A4=FB=A8B =B0h=A5=F0=AA=F7=C1Y=A4=F4</title>= </head> <body> <p><font color=3D"#FF0000" size=3D"5">=B7Q=B8=F2Yah**=A1BPCHO** =C1=C8=BF=FA= =B6=DC=A1H</font></p> <p><font color=3D"#0000FF" size=3D"+3"><a href=3D"http://home.graffiti.net/g= o4u/Addmoneyslow.htm">=A4W=AFZ=B1=DA=BD=D5=C1~=A4=FB=A8B=20 =B0h=A5=F0=AA=F7=C1Y=A4=F4</a></font></p> <p> <span class=3D"text9"><font size=3D"4">=A1i=B0O=AA=CC=AAL=BFP=B2=DE=A1= =FE=A5x=A5_=B3=F8=BE=C9=A1j</font></span></p> </body> </html> |
|
From: <sk...@us...> - 2006-05-25 19:07:09
|
Revision: 500 Author: skalpa Date: 2006-05-25 12:06:54 -0700 (Thu, 25 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=500&view=rev Log Message: ----------- Last-minute fix to ensure blocks functions have access to the theme and tpl engine instances (with a thanks to rowd for this one) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/theme.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/class/theme.php 2006-05-25 02:01:41 UTC (rev 499) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/class/theme.php 2006-05-25 19:06:54 UTC (rev 500) @@ -200,6 +200,8 @@ if ( $this->bufferOutput ) { ob_start(); } + $GLOBALS['xoTheme'] =& $this; + $GLOBALS['xoopsTpl'] =& $this->template; // Instanciate and initialize all the theme plugins foreach ( $this->plugins as $k => $bundleId ) { if ( !is_object( $bundleId ) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-25 02:01:49
|
Revision: 499 Author: skalpa Date: 2006-05-24 19:01:41 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=499&view=rev Log Message: ----------- Re-applied 13.2 fix that was missing in SVN Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/misc.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/misc.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/misc.php 2006-05-24 08:45:30 UTC (rev 498) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/misc.php 2006-05-25 02:01:41 UTC (rev 499) @@ -144,7 +144,7 @@ $yname = $myts->stripSlashesGPC(trim($_POST['yname'])); $fname = $myts->stripSlashesGPC(trim($_POST['fname'])); $fmail = $myts->stripSlashesGPC(trim($_POST['fmail'])); - if (!checkEmail($fmail) || !checkEmail($ymail)) { + if (!checkEmail($fmail) || !checkEmail($ymail) || preg_match( "/[\\0-\\31]/", $yname ) ) { $errormessage = _MSC_INVALIDEMAIL1."<br />"._MSC_INVALIDEMAIL2.""; redirect_header(XOOPS_URL."/misc.php?action=showpopups&type=friend&op=sendform",2,$errormessage); exit(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ph...@us...> - 2006-05-24 08:45:46
|
Revision: 498 Author: phppp Date: 2006-05-24 01:45:30 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=498&view=rev Log Message: ----------- Updated changelog and re-grouped/sorted logs as: bugfix, new added features, existing item changes, third-party library upgrade Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt Modified: XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-24 05:11:56 UTC (rev 497) +++ XoopsCore/branches/2.0.x/2.0.14/docs/changelog.txt 2006-05-24 08:45:30 UTC (rev 498) @@ -6,33 +6,46 @@ ============================ -- Added new authentication system. Support for XOOPS Database, standard LDAP Directory, Microsoft Active Directory (pemen) -- New upgrade installer (pemen) -- Added ".svn" to preserved directory name; Removed unnecessary preg_match for directory/file name check (phppp) -- Added xoops_redirect support to the closed site feature [patch #1206162/king] (skalpa) -- Re-ordered user menu items to something more logical [patch #1264900/rabideau] (skalpa) -- Gave modules the possibility to return a message for diplay during the oninstall function [patch #1352943/bruno2000] (skalpa) - Fixed bug #1476719: GroupPermForm client validation problem (skalpa) - Fixed bug #1456176: PHP 5 installation problems (skalpa) +- Fixed debug mode support from the administration interface (skalpa) +- Fixed the "update templates from file" feature (skalpa) +- Fixed bug #1477969: wrong version for module (phppp) +- Fixed bug for template path (phppp/wenmingpig) +- Fixed bug for redirect after login (phppp) - Several XHTML compliance fixes (skalpa) - Several MySQL 4.1/5 strict mode fixes (phppp+skalpa) + +- Added new authentication system. Support for XOOPS Database, standard LDAP Directory, Microsoft Active Directory (pemen) +- New upgrade installer (pemen) - Enhanced MySQL 4.1+ foreign encodings support (skalpa) -- Updated 3rd party libraries: Smarty 2.6.13, PHPMailer 1.73 (skalpa) +- Added avatar check to prevent unexpected avatar deletion (phppp) +- Added multiple file extensions sanitizing and image type check for uploader (phppp) +- Added ".svn" to preserved directory name; Removed unnecessary preg_match for directory/file name check (phppp+epaulin) +- Added xoops_redirect support to the closed site feature [patch #1206162/king] (skalpa) +- Added xoops_redirect support to history.go() (phppp) - Added the possibility to display blocks below content (skalpa, original patch from McNaz) - Backported the theme class from the 2.2/2.3 branches (skalpa) -- Fixed the "update templates from file" feature (skalpa) - Added templates overloading capability to themes (skalpa) - Added files resources overloading capability to themes (skalpa) - Backported the URL generation Smarty plug-ins xoAppUrl and xoImgUrl from the 2.3 branch (skalpa) - Backported the quick foreach and quick include Smarty plug-ins from the 2.3 branch (skalpa) - Added the xoInboxCount Smarty plug-in (skalpa) +- Added text sanitizing to multiple files for $xoopsConfig['sitename'] and $xoopsConfig['slogan'] (phppp) +- Added localization for "Re" in comment (phppp) + +- Re-ordered user menu items to something more logical [patch #1264900/rabideau] (skalpa) +- Gave modules the possibility to return a message for diplay during the oninstall function [patch #1352943/bruno2000] (skalpa) - Merged/optimized the logger and error handling classes (skalpa) - Merged the PHP Debug and MySQL debug modes (skalpa) -- Fixed debug mode support from the administration interface (skalpa) +- Changed private message list to new-first order (phppp) +- Updated 3rd party libraries: Smarty 2.6.13, PHPMailer 1.73 (skalpa) + Changes for translators: - Added 3 new constants to the system/admin/blocksadmin (_AM_CBBOTTOM, _AM_CBBOTTOMLEFT, _AM_CBBOTTOMRIGHT) - Several constants changed in system/admin/preferences (_MD_AM_DEBUGMODE1,_MD_AM_DEBUGMODE2,_MD_AM_THEMEFILE,_MD_AM_THEMEFILEDSC) +- Added one constant to language/english/comment.php (_CM_RE) ============================ 2005/10/28: Version 2.0.13.2 @@ -91,7 +104,7 @@ - Implemented new token system for validating form origination and increased protection against CSRF (Mithrandir/Onokazu) - Security fix to avoid the usage of fopen and unlink when previewing (Onokazu) - Fixed bug - Missing </a> in news/templates/blocks/news_block_bigstory.html (Mithrandir/blacKurd) -- Fixed bug in header.php \x96 assign $xoops_lblocks (Mithrandir/phppp) +- Fixed bug in header.php ?assign $xoops_lblocks (Mithrandir/phppp) - Fixed bug #1087786 Can"t assign to $this in PHP5 (Mithrandir) - Included 2.0.9.3 fixes in 2.0.10 patch for easy upgrade from 2.0.9.2 (Mithrandir/rowd) - Fixed bug #1157029 - Bug in include/checklogin.php (Onokazu/sudhaker) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-24 05:12:03
|
Revision: 497 Author: skalpa Date: 2006-05-23 22:11:56 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=497&view=rev Log Message: ----------- Applied the 2006/05/23 patch to mainfile.dist.php Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/mainfile.dist.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/mainfile.dist.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/mainfile.dist.php 2006-05-24 05:09:37 UTC (rev 496) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/mainfile.dist.php 2006-05-24 05:11:56 UTC (rev 497) @@ -91,6 +91,13 @@ define("XOOPS_GROUP_USERS", "2"); define("XOOPS_GROUP_ANONYMOUS", "3"); + foreach ( array('GLOBALS', '_SESSION', 'HTTP_SESSION_VARS', '_GET', 'HTTP_GET_VARS', '_POST', 'HTTP_POST_VARS', '_COOKIE', 'HTTP_COOKIE_VARS', '_REQUEST', '_SERVER', 'HTTP_SERVER_VARS', '_ENV', 'HTTP_ENV_VARS', '_FILES', 'HTTP_POST_FILES', 'xoopsDB', 'xoopsUser', 'xoopsUserId', 'xoopsUserGroups', 'xoopsUserIsAdmin', 'xoopsConfig', 'xoopsOption', 'xoopsModule', 'xoopsModuleConfig', 'xoopsRequestUri') as $bad_global ) { + if ( isset( $_REQUEST[$bad_global] ) ) { + header( 'Location: '.XOOPS_URL.'/' ); + exit(); + } + } + if (!isset($xoopsOption['nocommon']) && XOOPS_ROOT_PATH != '') { include XOOPS_ROOT_PATH."/include/common.php"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-24 05:09:43
|
Revision: 496 Author: skalpa Date: 2006-05-23 22:09:37 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=496&view=rev Log Message: ----------- Updated version.php to "2.0.14-RC1" ;-) Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/include/version.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/include/version.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/include/version.php 2006-05-24 05:08:32 UTC (rev 495) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/include/version.php 2006-05-24 05:09:37 UTC (rev 496) @@ -1,4 +1,4 @@ <?php // $Id$ -define("XOOPS_VERSION","XOOPS 2.0.14"); +define("XOOPS_VERSION","XOOPS 2.0.14-rc1"); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <sk...@us...> - 2006-05-24 05:08:39
|
Revision: 495 Author: skalpa Date: 2006-05-23 22:08:32 -0700 (Tue, 23 May 2006) ViewCVS: http://svn.sourceforge.net/xoops/?rev=495&view=rev Log Message: ----------- Fixed potential path disclosure in the new xoops13_header file Modified Paths: -------------- XoopsCore/branches/2.0.x/2.0.14/htdocs/include/xoops13_header.php Modified: XoopsCore/branches/2.0.x/2.0.14/htdocs/include/xoops13_header.php =================================================================== --- XoopsCore/branches/2.0.x/2.0.14/htdocs/include/xoops13_header.php 2006-05-24 04:59:05 UTC (rev 494) +++ XoopsCore/branches/2.0.x/2.0.14/htdocs/include/xoops13_header.php 2006-05-24 05:08:32 UTC (rev 495) @@ -9,6 +9,7 @@ * @version $Id$ * @package xoops */ +defined( 'XOOPS_ROOT_PATH' ) or die(); $xoopsOption['theme_use_smarty'] = 0; if (file_exists(XOOPS_THEME_PATH.'/'.$xoopsConfig['theme_set'].'/language/lang-'.$xoopsConfig['language'].'.php')) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |