From geeklog-cvs at lists.geeklog.net Fri Oct 3 04:18:36 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 04:18:36 -0400 Subject: [geeklog-cvs] geeklog: Minor improvements to the error handling (and some sour... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9d6dee6e985c changeset: 6407:9d6dee6e985c user: Dirk Haun date: Fri Oct 03 10:18:19 2008 +0200 description: Minor improvements to the error handling (and some source code cosmetics) diffstat: 1 file changed, 38 insertions(+), 27 deletions(-) public_html/lib-common.php | 65 +++++++++++++++++++++++++------------------- diffs (115 lines): diff -r 91adc20a8211 -r 9d6dee6e985c public_html/lib-common.php --- a/public_html/lib-common.php Mon Sep 29 20:07:00 2008 +0200 +++ b/public_html/lib-common.php Fri Oct 03 10:18:19 2008 +0200 @@ -6534,34 +6534,45 @@ global $_CONF, $_USER; // Handle @ operator - if( error_reporting() == 0 ) - { + if (error_reporting() == 0) { return; } - /* If in PHP4, then respect error_reporting */ - if( (PHP_VERSION < 5) && (($errno & error_reporting()) == 0) ) return; + // If in PHP4, then respect error_reporting + if ((PHP_VERSION < 5) && (($errno & error_reporting()) == 0)) { + return; + } /* * If we have a root user, then output detailed error message: */ - if( ( is_array($_USER) && function_exists('SEC_inGroup') ) || (isset($_CONF['rootdebug']) && $_CONF['rootdebug']) ) - { - if($_CONF['rootdebug'] || SEC_inGroup('Root')) - { + if ((is_array($_USER) && function_exists('SEC_inGroup')) + || (isset($_CONF['rootdebug']) && $_CONF['rootdebug'])) { + if ($_CONF['rootdebug'] || SEC_inGroup('Root')) { + + header('HTTP/1.1 500 Internal Server Error'); + header('Status: 500 Internal Server Error'); + + $title = 'An Error Occurred'; + if (!empty($_CONF['site_name'])) { + $title = $_CONF['site_name'] . ' - ' . $title; + } + echo("$title\n\n"); + echo('

An error has occurred:

'); - if($_CONF['rootdebug']) { + if ($_CONF['rootdebug']) { echo('

This is being displayed as "Root Debugging" is enabled in your Geeklog configuration.

If this is a production website you must disable this option once you have resolved any issues you are investigating.

'); } else { - echo('(This text is only displayed to users in the group \'Root\')
'); - } - echo("$errno - $errstr @ $errfile line $errline
"); - if(!SEC_inGroup('Root')) { - if('force' != ''.$_CONF['rootdebug']) { + echo('

(This text is only displayed to users in the group \'Root\')

'); + } + echo("

$errno - $errstr @ $errfile line $errline

"); + + if (!function_exists('SEC_inGroup') || !SEC_inGroup('Root')) { + if ('force' != ''.$_CONF['rootdebug']) { $errcontext = COM_rootDebugClean($errcontext); } else { echo('

Root Debug is set to "force", this @@ -6574,7 +6585,7 @@ var_dump($errcontext); $errcontext = htmlspecialchars(ob_get_contents()); ob_end_clean(); - echo("$errcontext"); + echo("$errcontext"); exit; } } @@ -6582,15 +6593,12 @@ /* If there is a custom error handler, fail over to that, but only * if the error wasn't in lib-custom.php */ - if( is_array($_CONF) && !(strstr($errfile, 'lib-custom.php'))) - { - if( array_key_exists('path_system', $_CONF) ) - { - if (file_exists($_CONF['path_system'].'lib-custom.php')) { - require_once($_CONF['path_system'].'lib-custom.php'); - } - if( function_exists('CUSTOM_handleError') ) - { + if (is_array($_CONF) && !(strstr($errfile, 'lib-custom.php'))) { + if (array_key_exists('path_system', $_CONF)) { + if (file_exists($_CONF['path_system'] . 'lib-custom.php')) { + require_once $_CONF['path_system'] . 'lib-custom.php'; + } + if (function_exists('CUSTOM_handleError')) { CUSTOM_handleError($errno, $errstr, $errfile, $errline, $errcontext); exit; } @@ -6600,14 +6608,17 @@ // if we do not throw the error back to an admin, still log it in the error.log COM_errorLog("$errno - $errstr @ $errfile line $errline", 1); - /* Does the theme implement an error message html file? */ + header('HTTP/1.1 500 Internal Server Error'); + header('Status: 500 Internal Server Error'); + + // Does the theme implement an error message html file? if (!empty($_CONF['path_layout']) && file_exists($_CONF['path_layout'] . 'errormessage.html')) { // NOTE: NOT A TEMPLATE! JUST HTML! include $_CONF['path_layout'] . 'errormessage.html'; } else { - /* Otherwise, display simple error message */ - $title = "An Error Occurred"; + // Otherwise, display simple error message + $title = 'An Error Occurred'; if (!empty($_CONF['site_name'])) { $title = $_CONF['site_name'] . ' - ' . $title; } From geeklog-cvs at lists.geeklog.net Fri Oct 3 04:49:05 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 04:49:05 -0400 Subject: [geeklog-cvs] geeklog: Send images 'inline', not as 'attachment' Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/12a47f2285a6 changeset: 6408:12a47f2285a6 user: Dirk Haun date: Fri Oct 03 10:48:53 2008 +0200 description: Send images 'inline', not as 'attachment' diffstat: 1 file changed, 12 insertions(+), 5 deletions(-) system/classes/downloader.class.php | 17 ++++++++++++----- diffs (30 lines): diff -r 9d6dee6e985c -r 12a47f2285a6 system/classes/downloader.class.php --- a/system/classes/downloader.class.php Fri Oct 03 10:18:19 2008 +0200 +++ b/system/classes/downloader.class.php Fri Oct 03 10:48:53 2008 +0200 @@ -515,14 +515,21 @@ if ($this->checkExtension($fextension)) { // Display file inside browser. header('Content-Type: ' . $this->_availableMimeTypes[$fextension]); - header('Content-transfer-encoding: binary'); - header('Content-length: ' . filesize($this->_sourceDirectory . $fileName)); - header('Content-Disposition: attachment; filename="' . $fileName . '"'); + header('Content-Transfer-Encoding: binary'); + header('Content-Length: ' + . filesize($this->_sourceDirectory . $fileName)); + + // send images as 'inline' everything else as 'attachment' + if (substr($this->_availableMimeTypes[$fextension], 0, 6) == 'image/') { + header('Content-Disposition: inline; filename="' . $fileName . '"'); + } else { + header('Content-Disposition: attachment; filename="' . $fileName . '"'); + } // Send file contents. $fp = fopen($this->_sourceDirectory . $fileName, 'rb'); - - fpassthru( $fp ); + fpassthru($fp); + fclose($fp); } return true; From geeklog-cvs at lists.geeklog.net Fri Oct 3 05:34:48 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 05:34:48 -0400 Subject: [geeklog-cvs] geeklog: Implemented Conditional GET (somewhat experimental) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/aeced27e1da9 changeset: 6409:aeced27e1da9 user: Dirk Haun date: Fri Oct 03 11:34:33 2008 +0200 description: Implemented Conditional GET (somewhat experimental) diffstat: 1 file changed, 47 insertions(+), 19 deletions(-) public_html/getimage.php | 66 ++++++++++++++++++++++++++++++++-------------- diffs (120 lines): diff -r 12a47f2285a6 -r aeced27e1da9 public_html/getimage.php --- a/public_html/getimage.php Fri Oct 03 10:48:53 2008 +0200 +++ b/public_html/getimage.php Fri Oct 03 11:34:33 2008 +0200 @@ -2,15 +2,16 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.4 | +// | Geeklog 1.5 | // +---------------------------------------------------------------------------+ // | getimage.php | // | | // | Shows images outside of the webtree | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2004-2006 by the following authors: | +// | Copyright (C) 2004-2008 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | +// | Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | @@ -36,12 +37,11 @@ * serve the images from outside of the webtree to a place that the webserver * user can actually write too * -* @author Tony Bibbs +* @author Tony Bibbs * */ require_once 'lib-common.php'; - require_once $_CONF['path_system'] . 'classes/downloader.class.php'; $downloader = new downloader(); @@ -50,21 +50,18 @@ $downloader->setLogging(true); -$downloader->setAllowedExtensions(array('gif' => 'image/gif', - 'jpg' => 'image/jpeg', +$downloader->setAllowedExtensions(array('gif' => 'image/gif', + 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', - 'png' => 'image/x-png', + 'png' => 'image/png', + 'png' => 'image/x-png' ) ); -$mode = ''; -if (isset($_GET['mode'])) { - $mode = $_GET['mode']; -} -$image = ''; -if (isset($_GET['image'])) { - $image = COM_applyFilter ($_GET['image']); -} +COM_setArgNames(array('mode', 'image')); +$mode = COM_applyFilter(COM_getArgument('mode')); +$image = COM_applyFilter(COM_getArgument('image')); + if (strstr($image, '..')) { // Can you believe this, some jackass tried to relative pathing to access // files they shouldn't have access to? @@ -90,7 +87,36 @@ } // Let's see if we don't have a legit file. If not bail -if (is_file($downloader->getPath() . $image)) { +$pathToImage = $downloader->getPath() . $image; +if (is_file($pathToImage)) { + + // support conditional GET, if possible + $st = @stat($pathToImage); + if (is_array($st)) { + // cf. RFC 2616, Section 3.3.1 Full Date + $last_mod = str_replace('+0000', 'GMT', gmdate('r', $st['mtime'])); + $etag = '"' . md5($image) . '"'; + + $mod_since = ''; + $none_match = ''; + if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])) { + $mod_since = $_SERVER['HTTP_IF_MODIFIED_SINCE']; + } + if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) { + $none_match = $_SERVER['HTTP_IF_NONE_MATCH']; + } + + if (($last_mod == $mod_since) && ($etag == $none_match)) { + // image hasn't change - we're done + header('HTTP/1.1 304 Not Modified'); + header('Status: 304 Not Modified'); + exit; + } + + header('Last-Modified: ' . $last_mod); + header('ETag: ' . $etag); + } + if ($mode == 'show') { echo ''; } else { @@ -99,10 +125,12 @@ } else { $display = COM_errorLog('File, ' . $image . ', was not found in getimage.php'); + // send 404 in any case + header('HTTP/1.1 404 Not Found'); + header('Status: 404 Not Found'); + if ($mode == 'show') { - echo COM_siteHeader ('menu') . $display . COM_siteFooter (); - } else { - header ('HTTP/1.0 404 Not Found'); + echo COM_siteHeader('menu') . $display . COM_siteFooter(); } } From geeklog-cvs at lists.geeklog.net Fri Oct 3 08:42:10 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 08:42:10 -0400 Subject: [geeklog-cvs] geeklog: Added missing check for allowed IP addresses in downloa... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2499b63f85dd changeset: 6410:2499b63f85dd user: Dirk Haun date: Fri Oct 03 14:41:57 2008 +0200 description: Added missing check for allowed IP addresses in downloader class (bug #0000709) diffstat: 2 files changed, 13 insertions(+), 1 deletion(-) public_html/docs/history | 2 ++ system/classes/downloader.class.php | 12 +++++++++++- diffs (41 lines): diff -r aeced27e1da9 -r 2499b63f85dd public_html/docs/history --- a/public_html/docs/history Fri Oct 03 11:34:33 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 14:41:57 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Added missing check for allowed IP addresses in downloader class + (bug #0000709) [Dirk] - Force a refresh after uninstalling a plugin so that the plugin's entry disappears from the Admins block [Dirk] - Fixed an issue with story expiry dates on PHP 4/Windows (reported by zeb) diff -r aeced27e1da9 -r 2499b63f85dd system/classes/downloader.class.php --- a/system/classes/downloader.class.php Fri Oct 03 11:34:33 2008 +0200 +++ b/system/classes/downloader.class.php Fri Oct 03 14:41:57 2008 +0200 @@ -171,7 +171,7 @@ function _logItem($logtype, $text) { $timestamp = strftime("%c"); - if (!$file = fopen($this->_logFile,a)) { + if (!$file = fopen($this->_logFile, 'a')) { // couldn't open log file for writing so let's disable logging and add an error $this->setLogging(false); $this->_addError('Error writing to log file: ' . $this->_logFile . '. Logging has been disabled'); @@ -481,6 +481,16 @@ */ function downloadFile($fileName) { + // Before we do anything, let's see if we are limiting file downloads by + // IP address and, if so, verify the user is originating from one of + // those places + if ($this->_limitByIP) { + if (!in_array($_SERVER['REMOTE_ADDR'], $this->_allowedIPS)) { + $this->_addError('The IP, ' . $_SERVER['REMOTE_ADDR'] . ' is not in the list of accepted IP addresses. Refusing to allow file download(s)'); + return false; + } + } + if (strstr( PHP_OS, "WIN")) { // Added as test1 below was failing on Windows platforms $strPathSeparator = '\\'; $this->_sourceDirectory = str_replace('/','\\',$this->_sourceDirectory); From geeklog-cvs at lists.geeklog.net Fri Oct 3 09:10:04 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 09:10:04 -0400 Subject: [geeklog-cvs] geeklog: Wrong message ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/22f37d16d476 changeset: 6411:22f37d16d476 user: Dirk Haun date: Fri Oct 03 15:09:52 2008 +0200 description: Wrong message ... diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/profiles.php | 2 +- diffs (12 lines): diff -r 2499b63f85dd -r 22f37d16d476 public_html/profiles.php --- a/public_html/profiles.php Fri Oct 03 14:41:57 2008 +0200 +++ b/public_html/profiles.php Fri Oct 03 15:09:52 2008 +0200 @@ -481,7 +481,7 @@ $_POST['shortmsg']) . COM_siteFooter (); } else { - $msg = PLG_itemPreSave ('emailstory', $message); + $msg = PLG_itemPreSave ('emailstory', $_POST['shortmsg']); if (!empty ($msg)) { $display .= COM_siteHeader ('menu', '') . COM_errorLog ($msg, 2) From geeklog-cvs at lists.geeklog.net Fri Oct 3 11:20:41 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 11:20:41 -0400 Subject: [geeklog-cvs] geeklog: Reverted fix for bug #0000618 (reopened) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9fc901f37ffe changeset: 6412:9fc901f37ffe user: Dirk Haun date: Fri Oct 03 15:35:09 2008 +0200 description: Reverted fix for bug #0000618 (reopened) diffstat: 2 files changed, 3 insertions(+), 3 deletions(-) public_html/docs/history | 3 +++ public_html/lib-common.php | 3 --- diffs (26 lines): diff -r 22f37d16d476 -r 9fc901f37ffe public_html/docs/history --- a/public_html/docs/history Fri Oct 03 15:09:52 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 15:35:09 2008 +0200 @@ -3,6 +3,9 @@ ??? ??, 2008 (1.5.2) ------------ +- Reverted fix for bug #0000618 (COM_showMessage automatically picking up a + 'plugin' parameter) as it's causing problems when displaying more than one + message on the same page [Dirk] - Added missing check for allowed IP addresses in downloader class (bug #0000709) [Dirk] - Force a refresh after uninstalling a plugin so that the plugin's entry diff -r 22f37d16d476 -r 9fc901f37ffe public_html/lib-common.php --- a/public_html/lib-common.php Fri Oct 03 15:09:52 2008 +0200 +++ b/public_html/lib-common.php Fri Oct 03 15:35:09 2008 +0200 @@ -4471,9 +4471,6 @@ global $_CONF, $MESSAGE, $_IMAGE_TYPE; $retval = ''; - if (empty($plugin) AND !empty($_REQUEST['plugin'])) { - $plugin = COM_applyFilter($_REQUEST['plugin']); - }; if ($msg > 0) { $timestamp = strftime($_CONF['daytime']); From geeklog-cvs at lists.geeklog.net Fri Oct 3 11:20:44 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 11:20:44 -0400 Subject: [geeklog-cvs] geeklog: Display "successfully saved" in the static pages plugin... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c1e86eb7ad40 changeset: 6413:c1e86eb7ad40 user: Dirk Haun date: Fri Oct 03 17:20:23 2008 +0200 description: Display "successfully saved" in the static pages plugin (bug #0000644) diffstat: 46 files changed, 178 insertions(+), 35 deletions(-) plugins/staticpages/functions.inc | 31 ++++++------ plugins/staticpages/language/chinese_simplified_utf-8.php | 3 + plugins/staticpages/language/chinese_traditional_utf-8.php | 3 + plugins/staticpages/language/czech.php | 3 + plugins/staticpages/language/czech_utf-8.php | 3 + plugins/staticpages/language/danish.php | 3 + plugins/staticpages/language/danish_utf-8.php | 3 + plugins/staticpages/language/dutch.php | 3 + plugins/staticpages/language/dutch_utf-8.php | 3 + plugins/staticpages/language/english.php | 2 plugins/staticpages/language/english_utf-8.php | 2 plugins/staticpages/language/estonian.php | 11 ++-- plugins/staticpages/language/estonian_utf-8.php | 11 ++-- plugins/staticpages/language/farsi_utf-8.php | 3 + plugins/staticpages/language/french_canada.php | 3 + plugins/staticpages/language/french_canada_utf-8.php | 3 + plugins/staticpages/language/german.php | 3 + plugins/staticpages/language/german_formal.php | 3 + plugins/staticpages/language/german_formal_utf-8.php | 3 + plugins/staticpages/language/german_utf-8.php | 3 + plugins/staticpages/language/hebrew_utf-8.php | 3 + plugins/staticpages/language/italian.php | 3 + plugins/staticpages/language/italian_utf-8.php | 3 + plugins/staticpages/language/japanese_utf-8.php | 17 +++--- plugins/staticpages/language/korean.php | 3 + plugins/staticpages/language/korean_utf-8.php | 3 + plugins/staticpages/language/polish.php | 3 + plugins/staticpages/language/polish_utf-8.php | 3 + plugins/staticpages/language/portuguese_brazil.php | 3 + plugins/staticpages/language/portuguese_brazil_utf-8.php | 3 + plugins/staticpages/language/slovenian.php | 3 + plugins/staticpages/language/slovenian_utf-8.php | 3 + plugins/staticpages/language/spanish.php | 3 + plugins/staticpages/language/spanish_utf-8.php | 3 + plugins/staticpages/language/swedish.php | 3 + plugins/staticpages/language/swedish_utf-8.php | 3 + plugins/staticpages/language/turkish.php | 3 + plugins/staticpages/language/turkish_utf-8.php | 3 + plugins/staticpages/language/ukrainian.php | 3 + plugins/staticpages/language/ukrainian_koi8-u.php | 3 + plugins/staticpages/language/ukrainian_utf-8.php | 3 + plugins/staticpages/services.inc.php | 5 + public_html/admin/plugins/staticpages/index.php | 8 ++- public_html/docs/history | 5 + public_html/staticpages/index.php | 10 +++ system/lib-plugins.php | 6 +- diffs (truncated from 754 to 300 lines): diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/functions.inc Fri Oct 03 17:20:23 2008 +0200 @@ -260,14 +260,15 @@ /** * Prepare static page for display. * -* @param string $page static page id -* @param array $A static page data -* @param string comment_order sorting of comments -* @param string comment_mode -* @return string HTML for the static page +* @param string $page static page id +* @param array $A static page data +* @param string $comment_order sorting of comments +* @param string $comment_mode comment mode (nested, flat, etc.) +* @param int $msg optional message number +* @return string HTML for the static page * */ -function SP_displayPage ($page, $A, $comment_order = 'ASC', $comment_mode ='nested') +function SP_displayPage ($page, $A, $comment_order = 'ASC', $comment_mode = 'nested', $msg = 0) { global $_CONF, $_TABLES, $_USER, $LANG01, $LANG11, $LANG_STATIC, $_IMAGE_TYPE, $_SP_CONF; @@ -280,6 +281,9 @@ if ($A['sp_format'] <> 'blankpage') { $retval .= COM_siteHeader ('none'); } + } + if ($msg > 0) { + $retval .= COM_showMessage($msg, 'staticpages'); } if (($A['sp_inblock'] == 1) && ($A['sp_format'] != 'blankpage')) { $retval .= COM_startBlock (stripslashes ($A['sp_title']), $A['sp_help'], @@ -436,14 +440,15 @@ /** * Prepare static page for display * -* @param string $page static page id -* @param string $mode type of display to return ('', 'print', 'autotag' -* @param string comment_order sorting of comments -* @param string comment_mode -* @return string HTML for the static page +* @param string $page static page id +* @param string $mode type of display to return ('', 'print', 'autotag' +* @param string $comment_order sorting of comments +* @param string $comment_mode comment mode (nested, flat, etc.) +* @param int $msg optional message number +* @return string HTML for the static page * */ -function SP_returnStaticpage($page='', $mode='', $comment_order = 'ASC', $comment_mode ='nested') +function SP_returnStaticpage($page='', $mode='', $comment_order = 'ASC', $comment_mode = 'nested', $msg = 0) { global $_CONF, $_TABLES, $LANG_ACCESS, $LANG_STATIC, $LANG_LOGIN; @@ -462,7 +467,7 @@ } else if ($mode =='autotag') { $retval = SP_render_content(stripslashes($retval['sp_content']), $retval['sp_php']); } else { - $retval = SP_displayPage($page, $retval, $comment_order, $comment_mode); + $retval = SP_displayPage($page, $retval, $comment_order, $comment_mode, $msg); } // increment hit counter for page diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/chinese_simplified_utf-8.php --- a/plugins/staticpages/language/chinese_simplified_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/chinese_simplified_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -113,6 +113,9 @@ 'submit' => '??????' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/chinese_traditional_utf-8.php --- a/plugins/staticpages/language/chinese_traditional_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/chinese_traditional_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -113,6 +113,9 @@ 'submit' => '??????' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/czech.php --- a/plugins/staticpages/language/czech.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/czech.php Fri Oct 03 17:20:23 2008 +0200 @@ -110,6 +110,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/czech_utf-8.php --- a/plugins/staticpages/language/czech_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/czech_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -110,6 +110,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/danish.php --- a/plugins/staticpages/language/danish.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/danish.php Fri Oct 03 17:20:23 2008 +0200 @@ -111,6 +111,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/danish_utf-8.php --- a/plugins/staticpages/language/danish_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/danish_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -111,6 +111,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/dutch.php --- a/plugins/staticpages/language/dutch.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/dutch.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/dutch_utf-8.php --- a/plugins/staticpages/language/dutch_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/dutch_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/english.php --- a/plugins/staticpages/language/english.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/english.php Fri Oct 03 17:20:23 2008 +0200 @@ -111,6 +111,8 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/english_utf-8.php --- a/plugins/staticpages/language/english_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/english_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -111,6 +111,8 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/estonian.php --- a/plugins/staticpages/language/estonian.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/estonian.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Sisesta' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugina uuendamine pole toetatud.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; @@ -152,8 +155,8 @@ 1 => array('Jah' => true, 'Ei' => false), 2 => array('Aeg' => 'date', 'Lehe ID' => 'id', 'Tiitel' => 'title'), 3 => array('Aeg' => 'date', 'Lehe ID' => 'id', 'Tiitel' => 'title', 'Silt' => 'label'), - 9 => array('Suuna edasi lehele' => 'item', 'N?ita loetelu' => 'list', 'N?ita avalehte' => 'home', 'N?ita admini lehten' => 'admin'), -12 => array('Pole ligip??su' => 0, 'Ainult loetav' => 2, 'Loetav ja muudetav' => 3) - ); + 9 => array('Suuna edasi lehele' => 'item', 'N?ita loetelu' => 'list', 'N?ita avalehte' => 'home', 'N?ita admini lehten' => 'admin'), + 12 => array('Pole ligip??su' => 0, 'Ainult loetav' => 2, 'Loetav ja muudetav' => 3) +); -?> +?> \ No newline at end of file diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/estonian_utf-8.php --- a/plugins/staticpages/language/estonian_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/estonian_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Sisesta' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugina uuendamine pole toetatud.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; @@ -152,8 +155,8 @@ 1 => array('Jah' => true, 'Ei' => false), 2 => array('Aeg' => 'date', 'Lehe ID' => 'id', 'Tiitel' => 'title'), 3 => array('Aeg' => 'date', 'Lehe ID' => 'id', 'Tiitel' => 'title', 'Silt' => 'label'), - 9 => array('Suuna edasi lehele' => 'item', 'N??ita loetelu' => 'list', 'N??ita avalehte' => 'home', 'N??ita admini lehten' => 'admin'), -12 => array('Pole ligip????su' => 0, 'Ainult loetav' => 2, 'Loetav ja muudetav' => 3) - ); + 9 => array('Suuna edasi lehele' => 'item', 'N??ita loetelu' => 'list', 'N??ita avalehte' => 'home', 'N??ita admini lehten' => 'admin'), + 12 => array('Pole ligip????su' => 0, 'Ainult loetav' => 2, 'Loetav ja muudetav' => 3) +); -?> +?> \ No newline at end of file diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/farsi_utf-8.php --- a/plugins/staticpages/language/farsi_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/farsi_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -110,6 +110,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/french_canada.php --- a/plugins/staticpages/language/french_canada.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/french_canada.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/french_canada_utf-8.php --- a/plugins/staticpages/language/french_canada_utf-8.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/french_canada_utf-8.php Fri Oct 03 17:20:23 2008 +0200 @@ -112,6 +112,9 @@ 'submit' => 'Submit' ); +$PLG_staticpages_MESSAGE19 = 'Your page has been successfully saved.'; +$PLG_staticpages_MESSAGE20 = 'Your page has been successfully deleted.'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; diff -r 9fc901f37ffe -r c1e86eb7ad40 plugins/staticpages/language/german.php --- a/plugins/staticpages/language/german.php Fri Oct 03 15:35:09 2008 +0200 +++ b/plugins/staticpages/language/german.php Fri Oct 03 17:20:23 2008 +0200 @@ -114,6 +114,9 @@ 'submit' => 'Absenden' ); +$PLG_staticpages_MESSAGE19 = 'Seite wurde gespeichert.'; +$PLG_staticpages_MESSAGE20 = 'Seite wurde gel?scht'; + // Messages for the plugin upgrade $PLG_staticpages_MESSAGE3001 = 'Plugin upgrade not supported.'; $PLG_staticpages_MESSAGE3002 = $LANG32[9]; From geeklog-cvs at lists.geeklog.net Fri Oct 3 11:26:09 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 11:26:09 -0400 Subject: [geeklog-cvs] tools: Fixed MESSAGE handling and updated staticpages MESSAGES Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/408878562aeb changeset: 20:408878562aeb user: Dirk Haun date: Fri Oct 03 17:25:57 2008 +0200 description: Fixed MESSAGE handling and updated staticpages MESSAGES diffstat: 5 files changed, 35 insertions(+), 29 deletions(-) lm/include/calendar.inc | 12 ++++++------ lm/include/links.inc | 32 ++++++++++++++++---------------- lm/include/polls.inc | 6 +++--- lm/include/spamx.inc | 6 +++--- lm/include/staticpages.inc | 8 +++++++- diffs (121 lines): diff -r 0a4cb099aaf3 -r 408878562aeb lm/include/calendar.inc --- a/lm/include/calendar.inc Sun Aug 17 16:19:20 2008 +0000 +++ b/lm/include/calendar.inc Fri Oct 03 17:25:57 2008 +0200 @@ -38,12 +38,12 @@ $ENG_CAL_ADMIN = $LANG_CAL_ADMIN; $ENG_CAL_MESSAGE = $LANG_CAL_MESSAGE; -$ENG_MSG4 = PLG_calendar_MESSAGE4; -$ENG_MSG17 = PLG_calendar_MESSAGE17; -$ENG_MSG18 = PLG_calendar_MESSAGE18; -$ENG_MSG24 = PLG_calendar_MESSAGE24; -$ENG_MSG26 = PLG_calendar_MESSAGE26; -$ENG_MSG3001 = PLG_calendar_MESSAGE3001; +$ENG_MSG4 = $PLG_calendar_MESSAGE4; +$ENG_MSG17 = $PLG_calendar_MESSAGE17; +$ENG_MSG18 = $PLG_calendar_MESSAGE18; +$ENG_MSG24 = $PLG_calendar_MESSAGE24; +$ENG_MSG26 = $PLG_calendar_MESSAGE26; +$ENG_MSG3001 = $PLG_calendar_MESSAGE3001; $ENG_configsections['calendar'] = $LANG_configsections['calendar']; $ENG_confignames['calendar'] = $LANG_confignames['calendar']; diff -r 0a4cb099aaf3 -r 408878562aeb lm/include/links.inc --- a/lm/include/links.inc Sun Aug 17 16:19:20 2008 +0000 +++ b/lm/include/links.inc Fri Oct 03 17:25:57 2008 +0200 @@ -39,22 +39,22 @@ $ENG_ADMIN = $LANG_LINKS_ADMIN; $ENG_STATUS = $LANG_LINKS_STATUS; -$ENG_MSG1 = PLG_links_MESSAGE1; -$ENG_MSG2 = PLG_links_MESSAGE2; -$ENG_MSG3 = PLG_links_MESSAGE3; -$ENG_MSG4 = PLG_links_MESSAGE4; -$ENG_MSG5 = PLG_links_MESSAGE5; -$ENG_MSG6 = PLG_links_MESSAGE6; -$ENG_MSG7 = PLG_links_MESSAGE7; -$ENG_MSG10 = PLG_links_MESSAGE10; -$ENG_MSG11 = PLG_links_MESSAGE11; -$ENG_MSG12 = PLG_links_MESSAGE12; -$ENG_MSG13 = PLG_links_MESSAGE13; -$ENG_MSG14 = PLG_links_MESSAGE14; -$ENG_MSG15 = PLG_links_MESSAGE15; -$ENG_MSG16 = PLG_links_MESSAGE16; -$ENG_MSG17 = PLG_links_MESSAGE17; -$ENG_MSG3001 = PLG_links_MESSAGE3001; +$ENG_MSG1 = $PLG_links_MESSAGE1; +$ENG_MSG2 = $PLG_links_MESSAGE2; +$ENG_MSG3 = $PLG_links_MESSAGE3; +$ENG_MSG4 = $PLG_links_MESSAGE4; +$ENG_MSG5 = $PLG_links_MESSAGE5; +$ENG_MSG6 = $PLG_links_MESSAGE6; +$ENG_MSG7 = $PLG_links_MESSAGE7; +$ENG_MSG10 = $PLG_links_MESSAGE10; +$ENG_MSG11 = $PLG_links_MESSAGE11; +$ENG_MSG12 = $PLG_links_MESSAGE12; +$ENG_MSG13 = $PLG_links_MESSAGE13; +$ENG_MSG14 = $PLG_links_MESSAGE14; +$ENG_MSG15 = $PLG_links_MESSAGE15; +$ENG_MSG16 = $PLG_links_MESSAGE16; +$ENG_MSG17 = $PLG_links_MESSAGE17; +$ENG_MSG3001 = $PLG_links_MESSAGE3001; $ENG_configsections['links'] = $LANG_configsections['links']; $ENG_confignames['links'] = $LANG_confignames['links']; diff -r 0a4cb099aaf3 -r 408878562aeb lm/include/polls.inc --- a/lm/include/polls.inc Sun Aug 17 16:19:20 2008 +0000 +++ b/lm/include/polls.inc Fri Oct 03 17:25:57 2008 +0200 @@ -35,9 +35,9 @@ $ENG_POLLS = $LANG_POLLS; $ENG_LANG25 = $LANG25; -$ENG_MSG19 = PLG_polls_MESSAGE19; -$ENG_MSG20 = PLG_polls_MESSAGE20; -$ENG_MSG3001 = PLG_polls_MESSAGE3001; +$ENG_MSG19 = $PLG_polls_MESSAGE19; +$ENG_MSG20 = $PLG_polls_MESSAGE20; +$ENG_MSG3001 = $PLG_polls_MESSAGE3001; $ENG_configsections['polls'] = $LANG_configsections['polls']; $ENG_confignames['polls'] = $LANG_confignames['polls']; diff -r 0a4cb099aaf3 -r 408878562aeb lm/include/spamx.inc --- a/lm/include/spamx.inc Sun Aug 17 16:19:20 2008 +0000 +++ b/lm/include/spamx.inc Fri Oct 03 17:25:57 2008 +0200 @@ -34,9 +34,9 @@ // save the english text strings $ENG_SX00 = $LANG_SX00; -$ENG_MSG128 = PLG_spamx_MESSAGE128; -$ENG_MSG8 = PLG_spamx_MESSAGE8; -$ENG_MSG3001 = PLG_spamx_MESSAGE3001; +$ENG_MSG128 = $PLG_spamx_MESSAGE128; +$ENG_MSG8 = $PLG_spamx_MESSAGE8; +$ENG_MSG3001 = $PLG_spamx_MESSAGE3001; $ENG_configsections['spamx'] = $LANG_configsections['spamx']; $ENG_confignames['spamx'] = $LANG_confignames['spamx']; diff -r 0a4cb099aaf3 -r 408878562aeb lm/include/staticpages.inc --- a/lm/include/staticpages.inc Sun Aug 17 16:19:20 2008 +0000 +++ b/lm/include/staticpages.inc Fri Oct 03 17:25:57 2008 +0200 @@ -34,7 +34,9 @@ // save the english text strings $ENG_STATIC = $LANG_STATIC; -$ENG_MSG3001 = PLG_staticpages_MESSAGE3001; +$ENG_MSG19 = $PLG_staticpages_MESSAGE19; +$ENG_MSG20 = $PLG_staticpages_MESSAGE20; +$ENG_MSG3001 = $PLG_staticpages_MESSAGE3001; $ENG_configsections['staticpages'] = $LANG_configsections['staticpages']; $ENG_confignames['staticpages'] = $LANG_confignames['staticpages']; @@ -57,6 +59,10 @@ mergeArrays($ENG_STATIC, $LANG_STATIC, 'LANG_STATIC', false); echo "\n"; +mergeString($ENG_MSG19, $PLG_staticpages_MESSAGE19, 'PLG_staticpages_MESSAGE19'); +mergeString($ENG_MSG20, $PLG_staticpages_MESSAGE20, 'PLG_staticpages_MESSAGE20'); + +echo "\n"; echo "// Messages for the plugin upgrade\n"; mergeString($ENG_MSG3001, $PLG_staticpages_MESSAGE3001, 'PLG_staticpages_MESSAGE3001'); echo "\$PLG_staticpages_MESSAGE3002 = \$LANG32[9];\n"; From geeklog-cvs at lists.geeklog.net Fri Oct 3 13:01:04 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 13:01:04 -0400 Subject: [geeklog-cvs] geeklog: Fixed 'cookiedomain' being reported as changed (bug #00... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4866ec0c967a changeset: 6414:4866ec0c967a user: Dirk Haun date: Fri Oct 03 19:00:53 2008 +0200 description: Fixed 'cookiedomain' being reported as changed (bug #0000638) diffstat: 2 files changed, 10 insertions(+) public_html/docs/history | 2 ++ system/classes/config.class.php | 8 ++++++++ diffs (30 lines): diff -r c1e86eb7ad40 -r 4866ec0c967a public_html/docs/history --- a/public_html/docs/history Fri Oct 03 17:20:23 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 19:00:53 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Fixed 'cookiedomain' being reported as changed in the Configuration + (bug #0000638) [Dirk] - Reverted fix for bug #0000618 (COM_showMessage automatically picking up a 'plugin' parameter) as it's causing problems when displaying more than one message on the same page [Dirk] diff -r c1e86eb7ad40 -r 4866ec0c967a system/classes/config.class.php --- a/system/classes/config.class.php Fri Oct 03 17:20:23 2008 +0200 +++ b/system/classes/config.class.php Fri Oct 03 19:00:53 2008 +0200 @@ -738,6 +738,14 @@ $value = DB_getItem($_TABLES['conf_values'], 'value', "group_name='Core' AND name='language'"); $this->config_array['Core']['language'] = unserialize($value); + + /** + * Same with $_CONF['cookiedomain'], which is overwritten in + * in lib-sessions.php (if empty). + */ + $value = DB_getItem($_TABLES['conf_values'], 'value', + "group_name='Core' AND name='cookiedomain'"); + $this->config_array['Core']['cookiedomain'] = unserialize($value); } $success_array = array(); From geeklog-cvs at lists.geeklog.net Fri Oct 3 13:21:28 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 13:21:28 -0400 Subject: [geeklog-cvs] geeklog: Added support for CUSTOM_formatEmailAddress and CUSTOM_... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c2d1fb443066 changeset: 6415:c2d1fb443066 user: Dirk Haun date: Fri Oct 03 19:18:41 2008 +0200 description: Added support for CUSTOM_formatEmailAddress and CUSTOM_emailEscape functions (feature request #0000727) diffstat: 2 files changed, 10 insertions(+) public_html/docs/history | 2 ++ public_html/lib-common.php | 8 ++++++++ diffs (37 lines): diff -r 4866ec0c967a -r c2d1fb443066 public_html/docs/history --- a/public_html/docs/history Fri Oct 03 19:00:53 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 19:18:41 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Added support for CUSTOM_formatEmailAddress and CUSTOM_emailEscape functions + (feature request #0000727) [Dirk] - Fixed 'cookiedomain' being reported as changed in the Configuration (bug #0000638) [Dirk] - Reverted fix for bug #0000618 (COM_showMessage automatically picking up a diff -r 4866ec0c967a -r c2d1fb443066 public_html/lib-common.php --- a/public_html/lib-common.php Fri Oct 03 19:00:53 2008 +0200 +++ b/public_html/lib-common.php Fri Oct 03 19:18:41 2008 +0200 @@ -3122,6 +3122,10 @@ { global $_CONF; + if (function_exists('CUSTOM_emailEscape')) { + return CUSTOM_emailEscape($string); + } + $charset = COM_getCharset(); if(( $charset == 'utf-8' ) && ( $string != utf8_decode( $string ))) { @@ -3159,6 +3163,10 @@ */ function COM_formatEmailAddress( $name, $address ) { + if (function_exists('CUSTOM_formatEmailAddress')) { + return CUSTOM_formatEmailAddress($name, $address); + } + $formatted_name = COM_emailEscape( $name ); // if the name comes back unchanged, it's not UTF-8, so preg_match is fine From geeklog-cvs at lists.geeklog.net Fri Oct 3 14:26:34 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 14:26:34 -0400 Subject: [geeklog-cvs] geeklog: Implemented new function COM_renderWikiText to convert ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/47b75abdf9bc changeset: 6416:47b75abdf9bc user: Dirk Haun date: Fri Oct 03 20:26:20 2008 +0200 description: Implemented new function COM_renderWikiText to convert wiki-formatted text to (X)HTML (feature request #0000643) diffstat: 3 files changed, 29 insertions(+), 16 deletions(-) public_html/docs/history | 2 ++ public_html/lib-common.php | 25 +++++++++++++++++++++++++ system/classes/story.class.php | 18 ++---------------- diffs (82 lines): diff -r c2d1fb443066 -r 47b75abdf9bc public_html/docs/history --- a/public_html/docs/history Fri Oct 03 19:18:41 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 20:26:20 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Implemented new function COM_renderWikiText to convert wiki-formatted text + to (X)HTML (feature request #0000643) [Dirk] - Added support for CUSTOM_formatEmailAddress and CUSTOM_emailEscape functions (feature request #0000727) [Dirk] - Fixed 'cookiedomain' being reported as changed in the Configuration diff -r c2d1fb443066 -r 47b75abdf9bc public_html/lib-common.php --- a/public_html/lib-common.php Fri Oct 03 19:18:41 2008 +0200 +++ b/public_html/lib-common.php Fri Oct 03 20:26:20 2008 +0200 @@ -6704,6 +6704,31 @@ } } +/** +* Convert wiki-formatted text to (X)HTML +* +* @param string $wikitext wiki-formatted text +* @return string XHTML formatted text +* +*/ +function COM_renderWikiText($wikitext) +{ + global $_CONF; + + if (!$_CONF['wikitext_editor']) { + return $wikitext; + } + + require_once 'Text/Wiki.php'; + + $wiki = &new Text_Wiki(); + $wiki->disableRule('wikilink'); + $wiki->disableRule('freelink'); + $wiki->disableRule('interwiki'); + + return $wiki->transform($wikitext, 'Xhtml'); +} + // Now include all plugin functions foreach( $_PLUGINS as $pi_name ) { diff -r c2d1fb443066 -r 47b75abdf9bc system/classes/story.class.php --- a/system/classes/story.class.php Fri Oct 03 19:18:41 2008 +0200 +++ b/system/classes/story.class.php Fri Oct 03 20:26:20 2008 +0200 @@ -1383,14 +1383,7 @@ if ($this->_postmode == 'plaintext') { $return = nl2br($this->_introtext); } elseif ($this->_postmode == 'wikitext') { - require_once 'Text/Wiki.php'; - - $wiki = &new Text_Wiki(); - $wiki->disableRule('wikilink'); - $wiki->disableRule('freelink'); - $wiki->disableRule('interwiki'); - $return = $this->_editUnescape($this->_introtext); - $return = $wiki->transform($return, 'Xhtml'); + $return = COM_renderWikiText($this->_editUnescape($this->_introtext)); } else { $return = $this->_introtext; } @@ -1402,14 +1395,7 @@ if (($this->_postmode == 'plaintext') && !(empty($this->_bodytext))) { $return = nl2br($this->_bodytext); } elseif (($this->_postmode == 'wikitext') && !(empty($this->_bodytext))) { - require_once 'Text/Wiki.php'; - - $wiki = &new Text_Wiki(); - $wiki->disableRule('wikilink'); - $wiki->disableRule('freelink'); - $wiki->disableRule('interwiki'); - $return = $this->_editUnescape($this->_bodytext); - $return = $wiki->transform($return, 'Xhtml'); + $return = COM_renderWikiText($this->_editUnescape($this->_bodytext)); } elseif (!empty($this->_bodytext)) { $return = $this->_displayEscape($this->_bodytext); } From geeklog-cvs at lists.geeklog.net Fri Oct 3 16:16:02 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 16:16:02 -0400 Subject: [geeklog-cvs] geeklog: Fixed handling of poll IDs in Polls editor (bug #0000753) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/acd44b7538e0 changeset: 6417:acd44b7538e0 user: Dirk Haun date: Fri Oct 03 22:15:16 2008 +0200 description: Fixed handling of poll IDs in Polls editor (bug #0000753) diffstat: 3 files changed, 53 insertions(+), 14 deletions(-) plugins/polls/templates/admin/polleditor.thtml | 9 +++- public_html/admin/plugins/polls/index.php | 54 ++++++++++++++++++------ public_html/docs/history | 4 + diffs (151 lines): diff -r 47b75abdf9bc -r acd44b7538e0 plugins/polls/templates/admin/polleditor.thtml --- a/plugins/polls/templates/admin/polleditor.thtml Fri Oct 03 20:26:20 2008 +0200 +++ b/plugins/polls/templates/admin/polleditor.thtml Fri Oct 03 22:15:16 2008 +0200 @@ -4,7 +4,7 @@ - + @@ -42,5 +42,10 @@

{lang_permissionskey}

{permissions_editor}

{lang_permissions_msg}

-

{delete_option}

+

+ + {delete_option} + + +

diff -r 47b75abdf9bc -r acd44b7538e0 public_html/admin/plugins/polls/index.php --- a/public_html/admin/plugins/polls/index.php Fri Oct 03 20:26:20 2008 +0200 +++ b/public_html/admin/plugins/polls/index.php Fri Oct 03 22:15:16 2008 +0200 @@ -124,6 +124,7 @@ * Saves a poll topic and potential answers to the database * * @param string $pid Poll topic ID +* @param string $old_pid Previous poll topic ID * @param array $Q Array of poll questions * @param string $mainpage Checkbox: poll appears on homepage * @param string $topic The text for the topic @@ -143,9 +144,9 @@ * @return string HTML redirect or error message * */ -function savepoll($pid, $Q, $mainpage, $topic, $statuscode, $open, $hideresults, - $commentcode, $A, $V, $R, $owner_id, $group_id, $perm_owner, - $perm_group, $perm_members, $perm_anon) +function savepoll($pid, $old_pid, $Q, $mainpage, $topic, $statuscode, $open, + $hideresults, $commentcode, $A, $V, $R, $owner_id, $group_id, + $perm_owner, $perm_group, $perm_members, $perm_anon) { global $_CONF, $_TABLES, $_USER, $LANG21, $LANG25, $MESSAGE, $_POLL_VERBOSE, @@ -156,8 +157,16 @@ // Convert array values to numeric permission values list($perm_owner,$perm_group,$perm_members,$perm_anon) = SEC_getPermissionValues($perm_owner,$perm_group,$perm_members,$perm_anon); + $topic = COM_stripslashes($topic); $pid = COM_sanitizeID($pid); - $topic = COM_stripslashes($topic); + $old_pid = COM_sanitizeID($old_pid); + if (empty($pid)) { + if (empty($old_pid)) { + $pid = COM_makeSid(); + } else { + $pid = $old_pid; + } + } // check if any question was entered if (empty($topic) or (sizeof($Q) == 0) or (strlen($Q[0]) == 0) or @@ -177,12 +186,21 @@ . '/plugins/polls/index.php'); } + // check for poll id change + if (!empty($old_pid) && ($pid != $old_pid)) { + // check if new pid is already in use + if (DB_count($_TABLES['polltopics'], 'pid', $pid) > 0) { + // TBD: abort, display editor with all content intact again + $pid = $old_pid; // for now ... + } + } + // start processing the poll topic if ($_POLL_VERBOSE) { COM_errorLog ('**** Inside savepoll() in ' . $_CONF['site_admin_url'] . '/plugins/polls/index.php ***'); } - $pid = str_replace (' ', '', $pid); // strip spaces from poll id + $access = 0; if (DB_count ($_TABLES['polltopics'], 'pid', $pid) > 0) { $result = DB_query ("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['polltopics']} WHERE pid = '{$pid}'"); @@ -217,10 +235,15 @@ COM_errorLog('member permissions: ' . $perm_members, 1); COM_errorLog('anonymous permissions: ' . $perm_anon, 1); } + // we delete everything and re-create it with the input from the form - DB_delete ($_TABLES['polltopics'], 'pid', $pid); - DB_delete ($_TABLES['pollanswers'], 'pid', $pid); - DB_delete ($_TABLES['pollquestions'], 'pid', $pid); + $del_pid = $pid; + if (!empty($old_pid) && ($pid != $old_pid)) { + $del_pid = $old_pid; // delete by old pid, create using new pid below + } + DB_delete($_TABLES['polltopics'], 'pid', $del_pid); + DB_delete($_TABLES['pollanswers'], 'pid', $del_pid); + DB_delete($_TABLES['pollquestions'], 'pid', $del_pid); $topic = addslashes ($topic); @@ -531,8 +554,15 @@ $display .= editpoll ($pid); $display .= COM_siteFooter (); } elseif (($mode == $LANG_ADMIN['save']) && !empty($LANG_ADMIN['save'])) { - $pid = COM_applyFilter ($_POST['pid']); - if (!empty ($pid)) { + $pid = COM_applyFilter($_POST['pid']); + $old_pid = ''; + if (isset($_POST['old_pid'])) { + $old_pid = COM_applyFilter($_POST['old_pid']); + } + if (empty($pid) && !empty($old_pid)) { + $pid = $old_pid; + } + if (!empty($pid)) { $statuscode = 0; if (isset ($_POST['statuscode'])) { $statuscode = COM_applyFilter ($_POST['statuscode'], true); @@ -549,8 +579,8 @@ if (isset ($_POST['hideresults'])) { $hideresults = COM_applyFilter ($_POST['hideresults']); } - $display .= savepoll ($pid, $_POST['question'], $mainpage, $_POST['topic'], - $statuscode, $open, $hideresults, + $display .= savepoll ($pid, $old_pid, $_POST['question'], $mainpage, + $_POST['topic'], $statuscode, $open, $hideresults, COM_applyFilter ($_POST['commentcode'], true), $_POST['answer'], $_POST['votes'], $_POST['remark'], COM_applyFilter ($_POST['owner_id'], true), diff -r 47b75abdf9bc -r acd44b7538e0 public_html/docs/history --- a/public_html/docs/history Fri Oct 03 20:26:20 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 22:15:16 2008 +0200 @@ -21,6 +21,10 @@ - Updated Polish language files, provided by Robert Stadnik - Updated Slovenian language file for the Links plugin, provided by gape + +Polls plugin +------------ +- Fixed handling of poll IDs in Polls editor (bug #0000753) [Dirk] Static Pages plugin ------------------- From geeklog-cvs at lists.geeklog.net Fri Oct 3 16:39:04 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Fri, 03 Oct 2008 16:39:04 -0400 Subject: [geeklog-cvs] geeklog: Prevent overwriting existing links when changing the li... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/10585aeefd17 changeset: 6418:10585aeefd17 user: Dirk Haun date: Fri Oct 03 22:38:53 2008 +0200 description: Prevent overwriting existing links when changing the link ID diffstat: 2 files changed, 18 insertions(+), 4 deletions(-) public_html/admin/plugins/links/index.php | 18 ++++++++++++++---- public_html/docs/history | 4 ++++ diffs (44 lines): diff -r acd44b7538e0 -r 10585aeefd17 public_html/admin/plugins/links/index.php --- a/public_html/admin/plugins/links/index.php Fri Oct 03 22:15:16 2008 +0200 +++ b/public_html/admin/plugins/links/index.php Fri Oct 03 22:38:53 2008 +0200 @@ -273,12 +273,22 @@ $perm_anon = 2; } - $lid = COM_sanitizeID ($lid); - if (empty ($lid)) { - if (empty ($old_lid)) { - $lid = COM_makeSid (); + $lid = COM_sanitizeID($old_lid); + $old_lid = COM_sanitizeID($old_lid); + if (empty($lid)) { + if (empty($old_lid)) { + $lid = COM_makeSid(); } else { $lid = $old_lid; + } + } + + // check for link id change + if (!empty($old_lid) && ($lid != $old_lid)) { + // check if new lid is already in use + if (DB_count($_TABLES['links'], 'lid', $lid) > 0) { + // TBD: abort, display editor with all content intact again + $lid = $old_lid; // for now ... } } diff -r acd44b7538e0 -r 10585aeefd17 public_html/docs/history --- a/public_html/docs/history Fri Oct 03 22:15:16 2008 +0200 +++ b/public_html/docs/history Fri Oct 03 22:38:53 2008 +0200 @@ -21,6 +21,10 @@ - Updated Polish language files, provided by Robert Stadnik - Updated Slovenian language file for the Links plugin, provided by gape + +Links plugin +------------ +- Prevent overwriting existing links when changing the link ID [Dirk] Polls plugin ------------ From geeklog-cvs at lists.geeklog.net Sat Oct 4 08:41:14 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 08:41:14 -0400 Subject: [geeklog-cvs] geeklog: Display confirmation message when emailing a story (fea... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/a8c5335a82d4 changeset: 6419:a8c5335a82d4 user: Dirk Haun date: Sat Oct 04 14:40:59 2008 +0200 description: Display confirmation message when emailing a story (feature request #0000689) diffstat: 4 files changed, 31 insertions(+), 10 deletions(-) public_html/article.php | 11 +++++++++-- public_html/docs/history | 2 ++ public_html/lib-common.php | 4 +++- public_html/profiles.php | 24 +++++++++++++++++------- diffs (105 lines): diff -r 10585aeefd17 -r a8c5335a82d4 public_html/article.php --- a/public_html/article.php Fri Oct 03 22:38:53 2008 +0200 +++ b/public_html/article.php Sat Oct 04 14:40:59 2008 +0200 @@ -246,8 +246,15 @@ } $display .= COM_siteHeader ('menu', $pagetitle, $rdf); - if (isset ($_GET['msg'])) { - $display .= COM_showMessage (COM_applyFilter ($_GET['msg'], true)); + if (isset($_GET['msg'])) { + $msg = COM_applyFilter($_GET['msg'], true); + if ($msg > 0) { + $plugin = ''; + if (isset($_GET['plugin'])) { + $plugin = COM_applyFilter($_GET['plugin']); + } + $display .= COM_showMessage($msg, $plugin); + } } DB_query ("UPDATE {$_TABLES['stories']} SET hits = hits + 1 WHERE (sid = '".$story->getSid()."') AND (date <= NOW()) AND (draft_flag = 0)"); diff -r 10585aeefd17 -r a8c5335a82d4 public_html/docs/history --- a/public_html/docs/history Fri Oct 03 22:38:53 2008 +0200 +++ b/public_html/docs/history Sat Oct 04 14:40:59 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Display confirmation message when emailing a story (feature request #0000689) + [Dirk] - Implemented new function COM_renderWikiText to convert wiki-formatted text to (X)HTML (feature request #0000643) [Dirk] - Added support for CUSTOM_formatEmailAddress and CUSTOM_emailEscape functions diff -r 10585aeefd17 -r a8c5335a82d4 public_html/lib-common.php --- a/public_html/lib-common.php Fri Oct 03 22:38:53 2008 +0200 +++ b/public_html/lib-common.php Sat Oct 04 14:40:59 2008 +0200 @@ -4495,12 +4495,14 @@ $message = $MESSAGE[$msg]; } - $retval .= COM_startBlock($MESSAGE[40] . ' - ' . $timestamp, '', + if (!empty($message)) { + $retval .= COM_startBlock($MESSAGE[40] . ' - ' . $timestamp, '', COM_getBlockTemplate('_msg_block', 'header')) . '

' . $message . '

' . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer')); + } } return $retval; diff -r 10585aeefd17 -r a8c5335a82d4 public_html/profiles.php --- a/public_html/profiles.php Fri Oct 03 22:38:53 2008 +0200 +++ b/public_html/profiles.php Sat Oct 04 14:40:59 2008 +0200 @@ -271,16 +271,20 @@ * this code * */ -function mailstory ($sid, $to, $toemail, $from, $fromemail, $shortmsg) +function mailstory($sid, $to, $toemail, $from, $fromemail, $shortmsg) { global $_CONF, $_TABLES, $_USER, $LANG01, $LANG08; - $retval = COM_refresh (COM_buildUrl ($_CONF['site_url'] - . '/article.php?story=' . $sid)); + $storyurl = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $sid); + if ($_CONF['url_rewrite']) { + $retval = COM_refresh($storyurl . '?msg=85'); + } else { + $retval = COM_refresh($storyurl . '&msg=85'); + } // check for correct $_CONF permission - if (empty ($_USER['username']) && - (($_CONF['loginrequired'] == 1) || ($_CONF['emailstoryloginrequired'] == 1))) { + if (COM_isAnonUser() && (($_CONF['loginrequired'] == 1) || + ($_CONF['emailstoryloginrequired'] == 1))) { return $retval; } @@ -290,8 +294,8 @@ } // check mail speedlimit - COM_clearSpeedlimit ($_CONF['speedlimit'], 'mail'); - if (COM_checkSpeedlimit ('mail') > 0) { + COM_clearSpeedlimit($_CONF['speedlimit'], 'mail'); + if (COM_checkSpeedlimit('mail') > 0) { return $retval; } @@ -343,6 +347,12 @@ // Increment numemails counter for story DB_query ("UPDATE {$_TABLES['stories']} SET numemails = numemails + 1 WHERE sid = '$sid'"); + + if ($_CONF['url_rewrite']) { + $retval = COM_refresh($storyurl . '?msg=27'); + } else { + $retval = COM_refresh($storyurl . '&msg=27'); + } return $retval; } From geeklog-cvs at lists.geeklog.net Sat Oct 4 09:00:16 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 09:00:16 -0400 Subject: [geeklog-cvs] geeklog: Send people back to a user's profile when using "Send E... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e51de61d0280 changeset: 6420:e51de61d0280 user: Dirk Haun date: Sat Oct 04 15:00:03 2008 +0200 description: Send people back to a user's profile when using "Send Email" option; Code cleanup: Use COM_isAnonUser diffstat: 1 file changed, 23 insertions(+), 20 deletions(-) public_html/profiles.php | 43 +++++++++++++++++++++++-------------------- diffs (141 lines): diff -r a8c5335a82d4 -r e51de61d0280 public_html/profiles.php --- a/public_html/profiles.php Sat Oct 04 14:40:59 2008 +0200 +++ b/public_html/profiles.php Sat Oct 04 15:00:03 2008 +0200 @@ -2,14 +2,14 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.4 | +// | Geeklog 1.5 | // +---------------------------------------------------------------------------+ // | profiles.php | // | | // | This pages lets GL users communicate with each other without risk of | // | their email address being intercepted by spammers. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2000-2006 by the following authors: | +// | Copyright (C) 2000-2008 by the following authors: | // | | // | Authors: Tony Bibbs - tony AT tonybibbs DOT com | // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | @@ -35,7 +35,7 @@ // // $Id: profiles.php,v 1.56 2008/02/20 20:32:37 mjervis Exp $ -require_once ('lib-common.php'); +require_once 'lib-common.php'; /** * Mails the contents of the contact form to that user @@ -54,10 +54,10 @@ $retval = ''; // check for correct $_CONF permission - if (empty ($_USER['username']) && - (($_CONF['loginrequired'] == 1) || ($_CONF['emailuserloginrequired'] == 1)) - && ($uid != 2)) { - return COM_refresh ($_CONF['site_url'] . '/index.php'); + if (COM_isAnonUser() && (($_CONF['loginrequired'] == 1) || + ($_CONF['emailuserloginrequired'] == 1)) + && ($uid != 2)) { + return COM_refresh($_CONF['site_url'] . '/index.php?msg=85'); } // check for correct 'to' user preferences @@ -70,13 +70,13 @@ } if ((($P['emailfromadmin'] != 1) && $isAdmin) || (($P['emailfromuser'] != 1) && !$isAdmin)) { - return COM_refresh ($_CONF['site_url'] . '/index.php'); + return COM_refresh ($_CONF['site_url'] . '/index.php?msg=85'); } // check mail speedlimit COM_clearSpeedlimit ($_CONF['speedlimit'], 'mail'); if (COM_checkSpeedlimit ('mail') > 0) { - return COM_refresh ($_CONF['site_url'] . '/index.php'); + return COM_refresh ($_CONF['site_url'] . '/index.php?msg=85'); } if (!empty($author) && !empty($subject) && !empty($message)) { @@ -86,8 +86,9 @@ // Append the user's signature to the message $sig = ''; - if (isset ($_USER['uid']) && ($_USER['uid'] > 1)) { - $sig = DB_getItem ($_TABLES['users'], 'sig', "uid={$_USER['uid']}"); + if (!COM_isAnonUser()) { + $sig = DB_getItem($_TABLES['users'], 'sig', + "uid={$_USER['uid']}"); if (!empty ($sig)) { $sig = strip_tags (COM_stripslashes ($sig)); $sig = "\n\n-- \n" . $sig; @@ -128,7 +129,9 @@ COM_mail ($to, $subject, $message, $from); COM_updateSpeedlimit ('mail'); - $retval .= COM_refresh($_CONF['site_url'] . '/index.php?msg=27'); + $retval .= COM_refresh($_CONF['site_url'] + . '/users.php?mode=profile&uid=' . $uid + . '&msg=27'); } else { $subject = strip_tags ($subject); $subject = substr ($subject, 0, strcspn ($subject, "\r\n")); @@ -166,8 +169,8 @@ $retval = ''; - if (empty ($_USER['username']) && - (($_CONF['loginrequired'] == 1) || ($_CONF['emailuserloginrequired'] == 1))) { + if (COM_isAnonUser() && (($_CONF['loginrequired'] == 1) || + ($_CONF['emailuserloginrequired'] == 1))) { $retval = COM_startBlock ($LANG_LOGIN[1], '', COM_getBlockTemplate ('_msg_block', 'header')); $login = new Template($_CONF['path_layout'] . 'submit'); @@ -202,7 +205,7 @@ $mail_template->set_var ('site_url', $_CONF['site_url']); $mail_template->set_var ('lang_description', $LANG08[26]); $mail_template->set_var ('lang_username', $LANG08[11]); - if (empty ($_USER['username'])) { + if (COM_isAnonUser()) { $sender = ''; if (isset ($_POST['author'])) { $sender = strip_tags ($_POST['author']); @@ -216,7 +219,7 @@ $_USER['fullname'])); } $mail_template->set_var ('lang_useremail', $LANG08[12]); - if (empty ($_USER['email'])) { + if (COM_isAnonUser()) { $email = ''; if (isset ($_POST['authoremail'])) { $email = strip_tags ($_POST['authoremail']); @@ -273,7 +276,7 @@ */ function mailstory($sid, $to, $toemail, $from, $fromemail, $shortmsg) { - global $_CONF, $_TABLES, $_USER, $LANG01, $LANG08; + global $_CONF, $_TABLES, $LANG01, $LANG08; $storyurl = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $sid); if ($_CONF['url_rewrite']) { @@ -371,8 +374,8 @@ $retval = ''; - if (empty ($_USER['username']) && - (($_CONF['loginrequired'] == 1) || ($_CONF['emailstoryloginrequired'] == 1))) { + if (COM_isAnonUser() && (($_CONF['loginrequired'] == 1) || + ($_CONF['emailstoryloginrequired'] == 1))) { $retval = COM_startBlock ($LANG_LOGIN[1], '', COM_getBlockTemplate ('_msg_block', 'header')); $login = new Template($_CONF['path_layout'] . 'submit'); @@ -396,7 +399,7 @@ } if (empty ($from) && empty ($fromemail)) { - if (!empty ($_USER['username'])) { + if (!COM_isAnonUser()) { $from = COM_getDisplayName ($_USER['uid'], $_USER['username'], $_USER['fullname']); $fromemail = DB_getItem ($_TABLES['users'], 'email', From geeklog-cvs at lists.geeklog.net Sat Oct 4 11:28:23 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 11:28:23 -0400 Subject: [geeklog-cvs] geeklog: Introduced COM_showMessageText (for feature request #00... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/86e95e048be4 changeset: 6421:86e95e048be4 user: Dirk Haun date: Sat Oct 04 17:28:09 2008 +0200 description: Introduced COM_showMessageText (for feature request #0000676) and COM_showMessageFromParameter (for bug #0000618) diffstat: 15 files changed, 106 insertions(+), 98 deletions(-) public_html/admin/block.php | 12 ----- public_html/admin/database.php | 2 public_html/admin/group.php | 6 -- public_html/admin/mail.php | 5 +- public_html/admin/moderation.php | 12 ----- public_html/admin/plugins.php | 12 ----- public_html/admin/story.php | 6 -- public_html/admin/syndication.php | 9 +--- public_html/admin/topic.php | 4 - public_html/admin/trackback.php | 17 ++----- public_html/admin/user.php | 6 -- public_html/docs/history | 5 ++ public_html/lib-common.php | 83 ++++++++++++++++++++++++++++--------- public_html/users.php | 15 ++++-- public_html/usersettings.php | 10 ---- diffs (truncated from 416 to 300 lines): diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/block.php --- a/public_html/admin/block.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/block.php Sat Oct 04 17:28:09 2008 +0200 @@ -847,16 +847,8 @@ $display .= listblocks(); $display .= COM_siteFooter(); } else { // 'cancel' or no mode at all - $display .= COM_siteHeader ('menu', $LANG21[19]); - $msg = 0; - if (isset ($_POST['msg'])) { - $msg = COM_applyFilter ($_POST['msg'], true); - } else if (isset ($_GET['msg'])) { - $msg = COM_applyFilter ($_GET['msg'], true); - } - if ($msg > 0) { - $display .= COM_showMessage ($msg); - } + $display .= COM_siteHeader('menu', $LANG21[19]); + $display .= COM_showMessageFromParameter(); $display .= listblocks(); $display .= COM_siteFooter(); diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/database.php --- a/public_html/admin/database.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/database.php Sat Oct 04 17:28:09 2008 +0200 @@ -311,6 +311,8 @@ } } } +} else { + $display .= COM_showMessageFromParameter(); } // Show all backups diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/group.php --- a/public_html/admin/group.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/group.php Sat Oct 04 17:28:09 2008 +0200 @@ -1034,10 +1034,8 @@ $display .= editusers ($grp_id); $display .= COM_siteFooter (); } else { // 'cancel' or no mode at all - $display .= COM_siteHeader ('menu', $LANG28[38]); - if (isset ($_REQUEST['msg'])) { - $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], true)); - } + $display .= COM_siteHeader('menu', $LANG28[38]); + $display .= COM_showMessageFromParameter(); $display .= listgroups(); $display .= COM_siteFooter(); } diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/mail.php --- a/public_html/admin/mail.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/mail.php Sat Oct 04 17:28:09 2008 +0200 @@ -32,8 +32,8 @@ // // $Id: mail.php,v 1.37 2008/05/27 20:53:10 dhaun Exp $ -require_once ('../lib-common.php'); -require_once ('auth.inc.php'); +require_once '../lib-common.php'; +require_once 'auth.inc.php'; $display = ''; @@ -230,6 +230,7 @@ if (isset($_POST['mail']) && ($_POST['mail'] == 'mail') && SEC_checkToken()) { $display .= send_messages ($_POST); } else { + $display .= COM_showMessageFromParameter(); $display .= display_mailform (); } diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/moderation.php --- a/public_html/admin/moderation.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/moderation.php Sat Oct 04 17:28:09 2008 +0200 @@ -667,17 +667,7 @@ $display = ''; $display .= COM_siteHeader ('menu', $LANG29[34]); -$msg = 0; -if (isset($_GET['msg'])) { - $msg = COM_applyFilter($_GET['msg'], true); -} -if ($msg > 0) { - $plugin = ''; - if (isset($_GET['plugin'])) { - $plugin = COM_applyFilter($_GET['plugin']); - } - $display .= COM_showMessage($msg, $plugin); -} +$display .= COM_showMessageFromParameter(); if (isset ($_POST['mode']) && ($_POST['mode'] == 'moderation') && SEC_checkToken()) { $action = array(); diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/plugins.php Sat Oct 04 17:28:09 2008 +0200 @@ -492,16 +492,7 @@ } else { // 'cancel' or no mode at all $display .= COM_siteHeader ('menu', $LANG32[5]); - if (isset ($_REQUEST['msg'])) { - $msg = COM_applyFilter ($_REQUEST['msg'], true); - if (!empty ($msg)) { - $plugin = ''; - if (isset ($_REQUEST['plugin'])) { - $plugin = COM_applyFilter ($_REQUEST['plugin']); - } - $display .= COM_showMessage ($msg, $plugin); - } - } + $display .= COM_showMessageFromParameter(); $token = SEC_createToken(); $display .= listplugins ($token); $display .= show_newplugins($token); @@ -509,4 +500,5 @@ } echo $display; + ?> diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/story.php --- a/public_html/admin/story.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/story.php Sat Oct 04 17:28:09 2008 +0200 @@ -785,11 +785,7 @@ $display = COM_refresh ($_CONF['site_admin_url'] . '/moderation.php'); } else { $display .= COM_siteHeader('menu', $LANG24[22]); - $msg = ""; - if (isset($_GET['msg'])) { - $msg = COM_applyFilter($_GET['msg'], true); - $display .= COM_showMessage($msg); - } + $display .= COM_showMessageFromParameter(); $display .= liststories(); $display .= COM_siteFooter(); } diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/syndication.php --- a/public_html/admin/syndication.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/syndication.php Sat Oct 04 17:28:09 2008 +0200 @@ -583,13 +583,12 @@ } else { - $display .= COM_siteHeader ('menu', $LANG33[10]); - if (isset ($_REQUEST['msg'])) { - $display .= COM_showMessage (COM_applyFilter($_REQUEST['msg'])); - } + $display .= COM_siteHeader('menu', $LANG33[10]); + $display .= COM_showMessageFromParameter(); $display .= listfeeds(); - $display .= COM_siteFooter (); + $display .= COM_siteFooter(); } echo $display; + ?> diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/topic.php --- a/public_html/admin/topic.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/topic.php Sat Oct 04 17:28:09 2008 +0200 @@ -595,9 +595,7 @@ $display .= COM_siteFooter(); } else { // 'cancel' or no mode at all $display .= COM_siteHeader('menu', $LANG27[8]); - if (isset ($_GET['msg'])) { - $display .= COM_showMessage (COM_applyFilter ($_GET['msg'], true)); - } + $display .= COM_showMessageFromParameter(); $display .= listtopics(); $display .= COM_siteFooter(); } diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/trackback.php --- a/public_html/admin/trackback.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/trackback.php Sat Oct 04 17:28:09 2008 +0200 @@ -1128,13 +1128,7 @@ . COM_siteFooter (); } else if (($mode == 'fresh') || ($mode == 'preview')) { $display .= COM_siteHeader ('menu', $LANG_TRB['trackback']); - - if (isset ($_REQUEST['msg'])) { - $msg = COM_applyFilter ($_REQUEST['msg'], true); - if ($msg > 0) { - $display .= COM_showMessage ($msg); - } - } + $display .= COM_showMessageFromParameter(); $target = ''; if (isset ($_REQUEST['target'])) { @@ -1216,14 +1210,13 @@ $display .= editServiceForm ($pid); } else if ($mode == 'listservice') { - $display .= COM_siteHeader ('menu', $LANG_TRB['services_headline']); - if (isset ($_REQUEST['msg'])) { - $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], true)); - } - $display .= listServices (); + $display .= COM_siteHeader('menu', $LANG_TRB['services_headline']); + $display .= COM_showMessageFromParameter(); + $display .= listServices(); $display .= COM_siteFooter(); } else if ($mode == 'freepb') { $display .= COM_siteHeader ('menu', $LANG_TRB['pingback']); + $display .= COM_showMessageFromParameter(); $display .= pingbackForm (); $display .= COM_siteFooter(); } else if ($mode == 'sendpingback') { diff -r e51de61d0280 -r 86e95e048be4 public_html/admin/user.php --- a/public_html/admin/user.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/admin/user.php Sat Oct 04 17:28:09 2008 +0200 @@ -1250,10 +1250,8 @@ . batchdelete() . COM_siteFooter(); } else { // 'cancel' or no mode at all - $display .= COM_siteHeader ('menu', $LANG28[11]); - if (isset ($_REQUEST['msg'])) { - $display .= COM_showMessage (COM_applyFilter ($_REQUEST['msg'], true)); - } + $display .= COM_siteHeader('menu', $LANG28[11]); + $display .= COM_showMessageFromParameter(); $display .= listusers(); $display .= COM_siteFooter(); } diff -r e51de61d0280 -r 86e95e048be4 public_html/docs/history --- a/public_html/docs/history Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/docs/history Sat Oct 04 17:28:09 2008 +0200 @@ -3,6 +3,11 @@ ??? ??, 2008 (1.5.2) ------------ +- Introduced new function COM_showMessageText to display a free-form text in a + "System Message" box (feature request #0000676) [Dirk] +- Introduced new function COM_showMessageFromParameter for easy and consistent + display of messages passed in the URL, including plugin messages (second + attempt to fix bug #0000618) [Dirk] - Display confirmation message when emailing a story (feature request #0000689) [Dirk] - Implemented new function COM_renderWikiText to convert wiki-formatted text diff -r e51de61d0280 -r 86e95e048be4 public_html/lib-common.php --- a/public_html/lib-common.php Sat Oct 04 15:00:03 2008 +0200 +++ b/public_html/lib-common.php Sat Oct 04 17:28:09 2008 +0200 @@ -4462,6 +4462,31 @@ return $retval; } +/** +* Displays a message text in a "System Message" block +* +* @param string $message Message text; may contain HTML +* @return string HTML block with message +* +*/ +function COM_showMessageText($message) +{ + global $_CONF, $MESSAGE, $_IMAGE_TYPE; + + $retval = ''; + + if (!empty($message)) { + $timestamp = strftime($_CONF['daytime']); + $retval .= COM_startBlock($MESSAGE[40] . ' - ' . $timestamp, '', + COM_getBlockTemplate('_msg_block', 'header')) + . '

' . $message . '

' + . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer')); + } + + return $retval; +} /** * Displays a message on the webpage @@ -4469,19 +4494,17 @@ * Pulls $msg off the URL string and gets the corresponding message and returns * it for display on the calling page * -* @param int $msg ID of message to show -* @param string $plugin Optional Name of plugin to lookup plugin defined message -* @return string HTML block with message -*/ - +* @param int $msg ID of message to show +* @param string $plugin Optional Name of plugin to lookup plugin defined message +* @return string HTML block with message +*/ function COM_showMessage($msg, $plugin = '') { - global $_CONF, $MESSAGE, $_IMAGE_TYPE; + global $MESSAGE; $retval = ''; if ($msg > 0) { - $timestamp = strftime($_CONF['daytime']); if (!empty($plugin)) { $var = 'PLG_' . $plugin . '_MESSAGE' . $msg; global $$var; From geeklog-cvs at lists.geeklog.net Sat Oct 4 12:43:32 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 12:43:32 -0400 Subject: [geeklog-cvs] geeklog: Define constants earlier and use them in STORY_renderAr... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/578387031535 changeset: 6422:578387031535 user: Dirk Haun date: Sat Oct 04 18:43:20 2008 +0200 description: Define constants earlier and use them in STORY_renderArticle diffstat: 1 file changed, 7 insertions(+), 7 deletions(-) system/lib-story.php | 14 +++++++------- diffs (38 lines): diff -r 86e95e048be4 -r 578387031535 system/lib-story.php --- a/system/lib-story.php Sat Oct 04 17:28:09 2008 +0200 +++ b/system/lib-story.php Sat Oct 04 18:43:20 2008 +0200 @@ -48,6 +48,12 @@ // this must be kept in sync with the actual size of 'sid' in the db ... define('STORY_MAX_ID_LENGTH', 40); + +// Story Record Options for the STATUS Field +if (!defined ('STORY_ARCHIVE_ON_EXPIRE')) { + define ('STORY_ARCHIVE_ON_EXPIRE', '10'); + define ('STORY_DELETE_ON_EXPIRE', '11'); +} /** * Takes an article class and renders HTML in the specified template and style. @@ -522,7 +528,7 @@ PLG_templateSetVars( 'featuredstorytext', $article ); $article->parse( 'finalstory', 'featuredarticle' ); } - elseif( $story->DisplayElements('statuscode') == 10 AND $story->DisplayElements('expire') <= time() ) + elseif( $story->DisplayElements('statuscode') == STORY_ARCHIVE_ON_EXPIRE AND $story->DisplayElements('expire') <= time() ) { $article->parse( 'story_bodyhtml', 'archivestorybodytext', true ); PLG_templateSetVars( 'archivestorytext', $article ); @@ -536,12 +542,6 @@ } return $article->finish( $article->get_var( 'finalstory' )); -} - -// Story Record Options for the STATUS Field -if (!defined ('STORY_ARCHIVE_ON_EXPIRE')) { - define ('STORY_ARCHIVE_ON_EXPIRE', '10'); - define ('STORY_DELETE_ON_EXPIRE', '11'); } /** From geeklog-cvs at lists.geeklog.net Sat Oct 4 14:46:58 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 14:46:58 -0400 Subject: [geeklog-cvs] geeklog: Missing exit after redirect to OpenID server Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f202bb4307a5 changeset: 6423:f202bb4307a5 user: Dirk Haun date: Sat Oct 04 20:46:44 2008 +0200 description: Missing exit after redirect to OpenID server diffstat: 1 file changed, 1 insertion(+) public_html/users.php | 1 + diffs (11 lines): diff -r 578387031535 -r f202bb4307a5 public_html/users.php --- a/public_html/users.php Sat Oct 04 18:43:20 2008 +0200 +++ b/public_html/users.php Sat Oct 04 20:46:44 2008 +0200 @@ -1114,6 +1114,7 @@ $_CONF['site_url'], // Trust root. null, "email,nickname,fullname")); // Required fields. + exit; } } elseif (isset($query['openid.mode']) || isset($query['openid_mode'])) { $openid_mode = ''; From geeklog-cvs at lists.geeklog.net Sat Oct 4 15:04:37 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 15:04:37 -0400 Subject: [geeklog-cvs] geeklog: Display a "Service" column in the Admin's list of users... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/649d19f400b6 changeset: 6424:649d19f400b6 user: Dirk Haun date: Sat Oct 04 21:04:23 2008 +0200 description: Display a "Service" column in the Admin's list of users when remote auth is activated diffstat: 2 files changed, 17 insertions(+), 5 deletions(-) public_html/admin/user.php | 20 +++++++++++++++----- public_html/docs/history | 2 ++ diffs (59 lines): diff -r f202bb4307a5 -r 649d19f400b6 public_html/admin/user.php --- a/public_html/admin/user.php Sat Oct 04 20:46:44 2008 +0200 +++ b/public_html/admin/user.php Sat Oct 04 21:04:23 2008 +0200 @@ -361,7 +361,7 @@ function listusers() { - global $_CONF, $_TABLES, $LANG_ADMIN, $LANG28, $_IMAGE_TYPE; + global $_CONF, $_TABLES, $LANG_ADMIN, $LANG04, $LANG28, $_IMAGE_TYPE; require_once $_CONF['path_system'] . 'lib-admin.php'; @@ -380,10 +380,14 @@ array('text' => $LANG28[37], 'field' => $_TABLES['users'] . '.uid', 'sort' => true), array('text' => $LANG28[3], 'field' => 'username', 'sort' => true), array('text' => $LANG28[4], 'field' => 'fullname', 'sort' => true), - array('text' => $login_text, 'field' => $login_field, 'sort' => true) + array('text' => $login_text, 'field' => $login_field, 'sort' => true), + array('text' => $LANG28[7], 'field' => 'email', 'sort' => true) ); - $header_arr[] = array('text' => $LANG28[7], 'field' => 'email', 'sort' => true); + if ($_CONF['user_login_method']['openid'] || + $_CONF['user_login_method']['3rdparty']) { + $header_arr[] = array('text' => $LANG04[121], 'field' => 'remoteservice', 'sort' => true); + } $defsort_arr = array('field' => $_TABLES['users'] . '.uid', 'direction' => 'ASC'); @@ -414,9 +418,15 @@ 'help_url' => '' ); + $join_userinfo = ''; + $select_userinfo = ''; if ($_CONF['lastlogin']) { - $join_userinfo="LEFT JOIN {$_TABLES['userinfo']} ON {$_TABLES['users']}.uid={$_TABLES['userinfo']}.uid "; - $select_userinfo=",lastlogin"; + $join_userinfo .= "LEFT JOIN {$_TABLES['userinfo']} ON {$_TABLES['users']}.uid={$_TABLES['userinfo']}.uid "; + $select_userinfo .= ",lastlogin"; + } + if ($_CONF['user_login_method']['openid'] || + $_CONF['user_login_method']['3rdparty']) { + $select_userinfo .= ',remoteservice'; } $sql = "SELECT {$_TABLES['users']}.uid,username,fullname,email,photo,status,regdate$select_userinfo " . "FROM {$_TABLES['users']} $join_userinfo WHERE 1=1"; diff -r f202bb4307a5 -r 649d19f400b6 public_html/docs/history --- a/public_html/docs/history Sat Oct 04 20:46:44 2008 +0200 +++ b/public_html/docs/history Sat Oct 04 21:04:23 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Display a "Service" column in the Admin's list of users when remote auth is + activated [Dirk] - Introduced new function COM_showMessageText to display a free-form text in a "System Message" box (feature request #0000676) [Dirk] - Introduced new function COM_showMessageFromParameter for easy and consistent From geeklog-cvs at lists.geeklog.net Sat Oct 4 18:26:28 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 04 Oct 2008 18:26:28 -0400 Subject: [geeklog-cvs] geeklog: The {start_storylink_anchortag} variable in the story t... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8a105009ba6e changeset: 6425:8a105009ba6e user: Dirk Haun date: Sun Oct 05 00:26:16 2008 +0200 description: The {start_storylink_anchortag} variable in the story templates was missing a '>' diffstat: 2 files changed, 3 insertions(+), 1 deletion(-) public_html/docs/history | 2 ++ system/lib-story.php | 2 +- diffs (24 lines): diff -r 649d19f400b6 -r 8a105009ba6e public_html/docs/history --- a/public_html/docs/history Sat Oct 04 21:04:23 2008 +0200 +++ b/public_html/docs/history Sun Oct 05 00:26:16 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- The {start_storylink_anchortag} variable in the story templates was missing + a '>' (reported by Michael Brusletten) [Dirk] - Display a "Service" column in the Admin's list of users when remote auth is activated [Dirk] - Introduced new function COM_showMessageText to display a free-form text in a diff -r 649d19f400b6 -r 8a105009ba6e system/lib-story.php --- a/system/lib-story.php Sat Oct 04 21:04:23 2008 +0200 +++ b/system/lib-story.php Sun Oct 05 00:26:16 2008 +0200 @@ -221,7 +221,7 @@ $attr_array['rel'] = 'bookmark'; } $article->set_var('start_storylink_anchortag', - ''); $article->set_var('end_storylink_anchortag', ''); $article->set_var('story_title_link', COM_createLink( From geeklog-cvs at lists.geeklog.net Sun Oct 5 09:35:57 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Oct 2008 09:35:57 -0400 Subject: [geeklog-cvs] geeklog: Ported plugin upload (part of Matt's GSoC project) over... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/527b34a8095b changeset: 6426:527b34a8095b user: Dirk Haun date: Sun Oct 05 15:35:41 2008 +0200 description: Ported plugin upload (part of Matt's GSoC project) over from the gsoc-2008 repository diffstat: 3 files changed, 312 insertions(+), 14 deletions(-) language/english.php | 24 +++ language/english_utf-8.php | 24 +++ public_html/admin/plugins.php | 278 +++++++++++++++++++++++++++++++++++++++-- diffs (truncated from 392 to 300 lines): diff -r 8a105009ba6e -r 527b34a8095b language/english.php --- a/language/english.php Sun Oct 05 00:26:16 2008 +0200 +++ b/language/english.php Sun Oct 05 15:35:41 2008 +0200 @@ -1023,7 +1023,24 @@ 35 => 'Edit', 36 => 'Code', 37 => 'Data', - 38 => 'Update!' + 38 => 'Update!', + 39 => 'Upload a plugin', + 40 => 'You can upload a plugin archive (.tar.gz, .tgz, .zip) directly here:', + 41 => 'Upload', + + // to match the PHP error constants, + // http://www.php.net/manual/en/features.file-upload.errors.php + // TBD: move to a separate $LANG array + 99 => 'An unknown error occured', + 100 => 'Ok.', + 101 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', + 102 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', + 103 => 'The uploaded file was only partially uploaded.', + 104 => 'No file was uploaded.', + 105 => '(undefined error)', + 106 => 'Missing a temporary folder.', + 107 => 'Failed to write file to disk.', + 108 => 'File upload stopped by extension.' ); ############################################################################### @@ -1182,7 +1199,10 @@ 94 => 'Backup Failed: Filesize less than 1kb', 95 => 'There was an error.', 96 => 'Sorry, you do not have access to the configuration administration page. Please note that all attempts to access unauthorized features are logged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.' ); ############################################################################### diff -r 8a105009ba6e -r 527b34a8095b language/english_utf-8.php --- a/language/english_utf-8.php Sun Oct 05 00:26:16 2008 +0200 +++ b/language/english_utf-8.php Sun Oct 05 15:35:41 2008 +0200 @@ -1023,7 +1023,24 @@ 35 => 'Edit', 36 => 'Code', 37 => 'Data', - 38 => 'Update!' + 38 => 'Update!', + 39 => 'Upload a plugin', + 40 => 'You can upload a plugin archive (.tar.gz, .tgz, .zip) directly here:', + 41 => 'Upload', + + // to match the PHP error constants, + // http://www.php.net/manual/en/features.file-upload.errors.php + // TBD: move to a separate $LANG array + 99 => 'An unknown error occured', + 100 => 'Ok.', + 101 => 'The uploaded file exceeds the upload_max_filesize directive in php.ini.', + 102 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.', + 103 => 'The uploaded file was only partially uploaded.', + 104 => 'No file was uploaded.', + 105 => '(undefined error)', + 106 => 'Missing a temporary folder.', + 107 => 'Failed to write file to disk.', + 108 => 'File upload stopped by extension.' ); ############################################################################### @@ -1182,7 +1199,10 @@ 94 => 'Backup Failed: Filesize less than 1kb', 95 => 'There was an error.', 96 => 'Sorry, you do not have access to the configuration administration page. Please note that all attempts to access unauthorized features are logged.', - 97 => 'Not all required fields have been passed validation - default custom membership message' + 97 => 'Not all required fields have been passed validation - default custom membership message', + 98 => 'The plugin was successfully uploaded.', + 99 => 'The plugin already exists.', + 100 => 'The plugin file you uploaded was not a GZip or Zip compressed archive.' ); ############################################################################### diff -r 8a105009ba6e -r 527b34a8095b public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sun Oct 05 00:26:16 2008 +0200 +++ b/public_html/admin/plugins.php Sun Oct 05 15:35:41 2008 +0200 @@ -14,6 +14,7 @@ // | Mark Limburg - mlimburg AT users DOT sourceforge DOT net | // | Jason Whittenburg - jwhitten AT securitygeeks DOT com | // | Dirk Haun - dirk AT haun-online DOT de | +// | Matt West - matt AT mattdanger DOT net | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | @@ -42,10 +43,10 @@ // the data being passed in a POST operation // echo COM_debug($_POST); -// Number of plugins to list per page -// We use 25 here instead of the 50 entries in other lists to leave room -// for the list of uninstalled plugins. -define ('PLUGINS_PER_PAGE', 25); +// define upload error codes introduced in later PHP versions +if (!defined('UPLOAD_ERR_NO_TMP_DIR')) { define('UPLOAD_ERR_NO_TMP_DIR', 6); } +if (!defined('UPLOAD_ERR_CANT_WRITE')) { define('UPLOAD_ERR_CANT_WRITE', 7); } +if (!defined('UPLOAD_ERR_EXTENSION')) { define('UPLOAD_ERR_EXTENSION', 8); } $display = ''; @@ -433,6 +434,264 @@ return $retval; } +/** + * Check if an error occured while uploading a file + * + * @param array $mFile $_FILE['uploaded_file'] + * @return mixed Returns the error string if an error occured, + * returns false if no error occured + * + */ +function plugin_getUploadError($mFile) +{ + global $LANG32; + + $retval = ''; + + if (isset($mFile['error']) && ($mFile['error'] !== UPLOAD_ERR_OK)) { // If an error occured while uploading the file. + + if ($mFile['error'] > UPLOAD_ERR_EXTENSION) { // If the error code isn't known + + $retval = $LANG32[99]; // Unknown error + + } else { + + $retval = $LANG32[$mFile['error'] + 100]; // Print the error + + } + + } else { // If no upload error occurred + + $retval = false; + + } + + return $retval; +} + +/** +* Check if uploads are possible +* +* @return boolean true: uploads possible; false: not possible +* +*/ +function plugin_upload_enabled() +{ + global $_CONF; + + // If 'file_uploads' is enabled in php.ini + // and the plugin directories are writable by the web server. + $upload_enabled = (ini_get('file_uploads') + && is_writable($_CONF['path'] . 'plugins/') + && is_writable($_CONF['path_html']) + && is_writable($_CONF['path_html'] . 'admin/plugins/')) + ? true + : false; + + return $upload_enabled; +} + +/** +* Display upload form +* +* @return string HTML for the upload form +* +*/ +function plugin_show_uploadform($token) +{ + global $_CONF, $LANG28, $LANG32; + + $retval = ''; + + $retval .= COM_startBlock($LANG32[39], '', + COM_getBlockTemplate('_admin_block', 'header')); + + // Show the upload form + $retval .= '

' . $LANG32[40] . '

' . LB + . '
' . LB + . '
' . $LANG28[29] . ': ' + . ' ' . LB + . '' . LB + . '' . '
' . LB . '' . LB; + + $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); + + return $retval; +} + +/** +* Handle uploaded plugin +* +* @return string HTML: redirect or main plugin screen + error message +* +*/ +function plugin_upload() +{ + global $_CONF; + + $retval = ''; + + // Check if a plugin file was uploaded + $upload_success = false; + if (isset($_FILES['plugin'])) { + + // If an error occured while uploading the file. + $error_msg = plugin_getUploadError($_FILES['plugin']); + if (!empty($error_msg)) { + + $retval .= plugin_main($error_msg); + + } else { + + $plugin_file = $_CONF['path_data'] . $_FILES['plugin']['name']; // Name the plugin file + + if ($_FILES['plugin']['type'] == 'application/zip') { + + // Zip + require_once 'Archive/Zip.php'; // import Archive_Zip library + $archive = new Archive_Zip($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Zip to extract the package + + } else { + + // Tarball + require_once 'Archive/Tar.php'; // import Archive_Tar library + $archive = new Archive_Tar($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Tar to extract the package + + } + $tmp = $archive->listContent(); // Grab the contents of the tarball to see what the plugin name is + $dirname = preg_replace('/\/.*$/', '', $tmp[0]['filename']); + + if (empty($dirname)) { // If $dirname is blank it's probably because the user uploaded a non Tarball file. + + $retval = COM_refresh($_CONF['site_admin_url'] . '/plugins.php?msg=100'); + + } else if (file_exists($_CONF['path'] . 'plugins/' . $dirname)) { // If plugin directory already exists + + $retval = COM_refresh($_CONF['site_admin_url'] . '/plugins.php?msg=99'); + + } else { + + /** + * Install the plugin + * This doesn't work if the public_html & public_html/admin/plugins directories aren't 777 + */ + + // Extract the tarball to data so we can get the $pi_name name from admin/install.php + if ($_FILES['plugin']['type'] == 'application/zip') { + + // Zip + $archive->extract(array('add_path' => $_CONF['path'] . 'data/', + 'by_name' => $dirname . '/admin/install.php')); + + } else { + + // Tarball + $archive->extractList(array($dirname . '/admin/install.php'), $_CONF['path'] . 'data/'); + + } + $plugin_inst = $_CONF['path'] . 'data/' . $dirname . '/admin/install.php'; + $fhandle = fopen($plugin_inst, 'r'); + $fdata = fread($fhandle, filesize($plugin_inst)); + fclose($fhandle); + + // Remove the plugin from data/ + require_once 'System.php'; + @System::rm('-rf ' . $_CONF['path'] . 'data/' . $dirname); + + /** + * One time I wanted to install a muffler on my car and + * needed to match up the outside diameter of the car's + * exhaust pipe to the inside diameter of the muffler. + * Unfortunately, when I went to the auto parts store they + * didn't have a coupling adapter that would perfectly + * match the two pipes, only a bunch of smaller adapters. + * I ended up using about 4 small adapters to step down + * one size at a time to the size of the muffler's input. + * + * It's kind of like this regular expression: + * + */ + $fdata = preg_replace('/\n/', '', $fdata); + $fdata = preg_replace('/ /', '', $fdata); + $pi_name = preg_replace('/^.*\$pi\_name=\'/', '', $fdata); + $pi_name = preg_replace('/\'.*$/', '', $pi_name); + + // Some plugins don't have $pi_name set in their install.php file, + // This means our regex won't work and we should just use $dirname + if (preg_match('/\<\?php/', $pi_name) || preg_match('/--/', $pi_name)) { From geeklog-cvs at lists.geeklog.net Sun Oct 5 10:46:37 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Oct 2008 10:46:37 -0400 Subject: [geeklog-cvs] geeklog: Handle plugins that don't have a public_html directory Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/69001156092c changeset: 6427:69001156092c user: Dirk Haun date: Sun Oct 05 16:46:26 2008 +0200 description: Handle plugins that don't have a public_html directory diffstat: 1 file changed, 3 insertions(+), 1 deletion(-) public_html/admin/plugins.php | 4 +++- diffs (14 lines): diff -r 527b34a8095b -r 69001156092c public_html/admin/plugins.php --- a/public_html/admin/plugins.php Sun Oct 05 15:35:41 2008 +0200 +++ b/public_html/admin/plugins.php Sun Oct 05 16:46:26 2008 +0200 @@ -641,7 +641,9 @@ } if ($upload_success) { - rename($_CONF['path'] . 'plugins/' . $pi_name . '/public_html', $_CONF['path_html'] . $pi_name); + if (file_exists($_CONF['path'] . 'plugins/' . $pi_name . '/public_html')) { + rename($_CONF['path'] . 'plugins/' . $pi_name . '/public_html', $_CONF['path_html'] . $pi_name); + } rename($_CONF['path'] . 'plugins/' . $pi_name . '/admin', $_CONF['path_html'] . 'admin/plugins/' . $pi_name); } From geeklog-cvs at lists.geeklog.net Sun Oct 5 10:54:19 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Oct 2008 10:54:19 -0400 Subject: [geeklog-cvs] geeklog: Allow overwriting the block title for COM_showMessageText Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/740473084c93 changeset: 6428:740473084c93 user: Dirk Haun date: Sun Oct 05 16:54:06 2008 +0200 description: Allow overwriting the block title for COM_showMessageText diffstat: 1 file changed, 6 insertions(+), 2 deletions(-) public_html/lib-common.php | 8 ++++++-- diffs (28 lines): diff -r 69001156092c -r 740473084c93 public_html/lib-common.php --- a/public_html/lib-common.php Sun Oct 05 16:46:26 2008 +0200 +++ b/public_html/lib-common.php Sun Oct 05 16:54:06 2008 +0200 @@ -4466,18 +4466,22 @@ * Displays a message text in a "System Message" block * * @param string $message Message text; may contain HTML +* @param string $title (optional) alternative block title * @return string HTML block with message * */ -function COM_showMessageText($message) +function COM_showMessageText($message, $title = '') { global $_CONF, $MESSAGE, $_IMAGE_TYPE; $retval = ''; if (!empty($message)) { + if (empty($title)) { + $title = $MESSAGE[40]; + } $timestamp = strftime($_CONF['daytime']); - $retval .= COM_startBlock($MESSAGE[40] . ' - ' . $timestamp, '', + $retval .= COM_startBlock($title . ' - ' . $timestamp, '', COM_getBlockTemplate('_msg_block', 'header')) . '

details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f41761b1c244 changeset: 6429:f41761b1c244 user: Dirk Haun date: Sun Oct 05 18:24:06 2008 +0200 description: Minor code cleanup diffstat: 1 file changed, 7 insertions(+), 13 deletions(-) public_html/admin/install/index.php | 20 +++++++------------- diffs (48 lines): diff -r 740473084c93 -r f41761b1c244 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sun Oct 05 16:54:06 2008 +0200 +++ b/public_html/admin/install/index.php Sun Oct 05 18:24:06 2008 +0200 @@ -82,17 +82,11 @@ if (@mysql_connect($_DB_host, $_DB_user, $_DB_pass) === false) { return false; } - $mysqlv = ''; - // mysql_get_server_info() is only available as of PHP 4.0.5 - $phpv = php_v (); - if (($phpv[0] > 4) || (($phpv[0] == 4) && ($phpv[1] > 0)) || - (($phpv[0] == 4) && ($phpv[1] == 0) && ($phpv[2] > 4))) { - $mysqlv = @mysql_get_server_info(); - } + $mysqlv = @mysql_get_server_info(); - if (!empty ($mysqlv)) { - preg_match ('/^([0-9]+).([0-9]+).([0-9]+)/', $mysqlv, $match); + if (!empty($mysqlv)) { + preg_match('/^([0-9]+).([0-9]+).([0-9]+)/', $mysqlv, $match); $mysqlmajorv = $match[1]; $mysqlminorv = $match[2]; $mysqlrev = $match[3]; @@ -101,9 +95,9 @@ $mysqlminorv = 0; $mysqlrev = 0; } - @mysql_close (); + @mysql_close(); - return array ($mysqlmajorv, $mysqlminorv, $mysqlrev); + return array($mysqlmajorv, $mysqlminorv, $mysqlrev); } @@ -202,9 +196,9 @@ } if (!empty($version) && ($version != VERSION) && - (substr($version, 0, 4) == '1.5.')) { + (version_compare($version, '1.5.0') >= 0)) { - // this is a 1.5.x version, so upgrade directly + // current version is at least 1.5.0, so upgrade directly $req_string = 'index.php?mode=upgrade&step=3' . '&dbconfig_path=' . $dbconfig_path . '&version=' . $version; From geeklog-cvs at lists.geeklog.net Sun Oct 5 14:33:45 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Oct 2008 14:33:45 -0400 Subject: [geeklog-cvs] geeklog: Fixed SQL error when poll questions contained single qu... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c2aa8411a3f6 changeset: 6430:c2aa8411a3f6 user: Dirk Haun date: Sun Oct 05 20:33:33 2008 +0200 description: Fixed SQL error when poll questions contained single quotes (bug #0000756) diffstat: 2 files changed, 15 insertions(+), 8 deletions(-) public_html/admin/plugins/polls/index.php | 21 +++++++++++++-------- public_html/docs/history | 2 ++ diffs (43 lines): diff -r f41761b1c244 -r c2aa8411a3f6 public_html/admin/plugins/polls/index.php --- a/public_html/admin/plugins/polls/index.php Sun Oct 05 18:24:06 2008 +0200 +++ b/public_html/admin/plugins/polls/index.php Sun Oct 05 20:33:33 2008 +0200 @@ -250,14 +250,19 @@ $k = 0; // set up a counter to make sure we do assign a straight line of question id's $v = 0; // re-count votes sine they might have been changed // first dimension of array are the questions - for ($i=0; $i 0) { // only insert questions that exist - DB_save ($_TABLES['pollquestions'], 'qid, pid, question', "'$k', '$pid', '$Q[$i]'"); - // within the questions, we have another dimensions with answers, votes and remarks - for ($j=0; $j 0) { // only insert answers etc that exist + $num_questions = sizeof($Q); + for ($i = 0; $i < $num_questions; $i++) { + $Q[$i] = COM_stripslashes($Q[$i]); + if (strlen($Q[$i]) > 0) { // only insert questions that exist + $Q[$i] = addslashes($Q[$i]); + DB_save($_TABLES['pollquestions'], 'qid, pid, question', + "'$k', '$pid', '$Q[$i]'"); + // within the questions, we have another dimensions with answers, + // votes and remarks + $num_answers = sizeof($A[$i]); + for ($j = 0; $j < $num_answers; $j++) { + $A[$i][$j] = COM_stripslashes($A[$i][$j]); + if (strlen($A[$i][$j]) > 0) { // only insert answers etc that exist if (!is_numeric($V[$i][$j])) { $V[$i][$j] = "0"; } diff -r f41761b1c244 -r c2aa8411a3f6 public_html/docs/history --- a/public_html/docs/history Sun Oct 05 18:24:06 2008 +0200 +++ b/public_html/docs/history Sun Oct 05 20:33:33 2008 +0200 @@ -39,6 +39,8 @@ Polls plugin ------------ +- Fixed SQL error when poll questions contained single quotes (bug #0000756) + [Dirk] - Fixed handling of poll IDs in Polls editor (bug #0000753) [Dirk] Static Pages plugin From geeklog-cvs at lists.geeklog.net Sun Oct 5 15:49:57 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 05 Oct 2008 15:49:57 -0400 Subject: [geeklog-cvs] geeklog: Ensure consistent spelling of function get_SP_ver Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/01b06f597904 changeset: 6431:01b06f597904 user: Dirk Haun date: Sun Oct 05 21:49:47 2008 +0200 description: Ensure consistent spelling of function get_SP_ver diffstat: 1 file changed, 4 insertions(+), 4 deletions(-) public_html/admin/install/index.php | 8 ++++---- diffs (39 lines): diff -r c2aa8411a3f6 -r 01b06f597904 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sun Oct 05 20:33:33 2008 +0200 +++ b/public_html/admin/install/index.php Sun Oct 05 21:49:47 2008 +0200 @@ -109,7 +109,7 @@ * Note: Needed for upgrades from old versions - don't remove. * */ -function get_SP_Ver() +function get_SP_ver() { global $_TABLES; @@ -1357,7 +1357,7 @@ INST_updateDB($_SQL); // upgrade Static Pages plugin - $spversion = get_SP_ver (); + $spversion = get_SP_ver(); if ($spversion == 1) { // original version DB_query ("ALTER TABLE {$_TABLES['staticpage']} " . "ADD COLUMN group_id mediumint(8) unsigned DEFAULT '1'," @@ -1431,7 +1431,7 @@ DB_query ("INSERT INTO {$_TABLES['syndication']} (title, description, limits, content_length, filename, charset, language, is_enabled, updated, update_info) VALUES ('{$sitename}', '{$siteslogan}', '{$_CONF['rdf_limit']}', {$_CONF['rdf_storytext']}, '{$filename}', '{$_CONF['default_charset']}', '{$_CONF['rdf_language']}', {$_CONF['backend']}, '0000-00-00 00:00:00', NULL)"); // upgrade static pages plugin - $spversion = get_SP_ver (); + $spversion = get_SP_ver(); if ($spversion > 0) { if ($spversion < 4) { if (!isset ($_SP_CONF['in_block'])) { @@ -1499,7 +1499,7 @@ } } - $spversion = get_SP_ver (); + $spversion = get_SP_ver(); if ($spversion > 0) { // no database changes this time, but set new version number DB_query ("UPDATE {$_TABLES['plugins']} SET pi_version = '1.4.1', pi_gl_version = '1.3.10' WHERE pi_name = 'staticpages'"); From geeklog-cvs at lists.geeklog.net Mon Oct 6 14:15:11 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Mon, 06 Oct 2008 14:15:11 -0400 Subject: [geeklog-cvs] geeklog: Use {site_admin_url} in form action (Thanks, Tony!) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/ae1de14979cf changeset: 6432:ae1de14979cf user: Dirk Haun date: Mon Oct 06 20:14:58 2008 +0200 description: Use {site_admin_url} in form action (Thanks, Tony!) diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) public_html/layout/professional/admin/config/configuration.thtml | 4 ++-- diffs (20 lines): diff -r 01b06f597904 -r ae1de14979cf public_html/layout/professional/admin/config/configuration.thtml --- a/public_html/layout/professional/admin/config/configuration.thtml Sun Oct 05 21:49:47 2008 +0200 +++ b/public_html/layout/professional/admin/config/configuration.thtml Mon Oct 06 20:14:58 2008 +0200 @@ -1,6 +1,6 @@ -
+ @@ -16,7 +16,7 @@ {change_block} - + From geeklog-cvs at lists.geeklog.net Sat Oct 11 07:32:37 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Oct 2008 07:32:37 -0400 Subject: [geeklog-cvs] geeklog: Fixed my fix (Prevent overwriting existing links when c... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/f26f5f57925d changeset: 6433:f26f5f57925d user: Dirk Haun date: Sat Oct 11 13:32:25 2008 +0200 description: Fixed my fix (Prevent overwriting existing links when changing the link ID) diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) public_html/admin/plugins/links/index.php | 2 +- diffs (12 lines): diff -r ae1de14979cf -r f26f5f57925d public_html/admin/plugins/links/index.php --- a/public_html/admin/plugins/links/index.php Mon Oct 06 20:14:58 2008 +0200 +++ b/public_html/admin/plugins/links/index.php Sat Oct 11 13:32:25 2008 +0200 @@ -273,7 +273,7 @@ $perm_anon = 2; } - $lid = COM_sanitizeID($old_lid); + $lid = COM_sanitizeID($lid); $old_lid = COM_sanitizeID($old_lid); if (empty($lid)) { if (empty($old_lid)) { From geeklog-cvs at lists.geeklog.net Sat Oct 11 12:56:23 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Oct 2008 12:56:23 -0400 Subject: [geeklog-cvs] geeklog: Set version number to 1.5.2 Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/9fe12b441d71 changeset: 6434:9fe12b441d71 user: Dirk Haun date: Sat Oct 11 18:56:13 2008 +0200 description: Set version number to 1.5.2 diffstat: 4 files changed, 10 insertions(+), 5 deletions(-) public_html/admin/install/index.php | 9 +++++++-- public_html/siteconfig.php.dist | 2 +- sql/mssql_tableanddata.php | 2 +- sql/mysql_tableanddata.php | 2 +- diffs (69 lines): diff -r f26f5f57925d -r 9fe12b441d71 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sat Oct 11 13:32:25 2008 +0200 +++ b/public_html/admin/install/index.php Sat Oct 11 18:56:13 2008 +0200 @@ -50,7 +50,7 @@ define("LB", "\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.1'); + define('VERSION', '1.5.2'); } if (!defined('XHTML')) { define('XHTML', ' /'); @@ -576,7 +576,7 @@ . '

' . $LANG_INSTALL[91] . '

'; } else { - $old_versions = array('1.2.5-1','1.3','1.3.1','1.3.2','1.3.2-1','1.3.3','1.3.4','1.3.5','1.3.6','1.3.7','1.3.8','1.3.9','1.3.10','1.3.11','1.4.0','1.4.1','1.5.0'); + $old_versions = array('1.2.5-1','1.3','1.3.1','1.3.2','1.3.2-1','1.3.3','1.3.4','1.3.5','1.3.6','1.3.7','1.3.8','1.3.9','1.3.10','1.3.11','1.4.0','1.4.1','1.5.0','1.5.1'); if (empty($curv)) { // If we were unable to determine the current GL // version is then ask the user what it is @@ -1631,6 +1631,11 @@ $_SQL = ''; break; + case '1.5.1': + $current_gl_version = '1.5.2'; + $_SQL = ''; + break; + default: $done = true; } diff -r f26f5f57925d -r 9fe12b441d71 public_html/siteconfig.php.dist --- a/public_html/siteconfig.php.dist Sat Oct 11 13:32:25 2008 +0200 +++ b/public_html/siteconfig.php.dist Sat Oct 11 18:56:13 2008 +0200 @@ -38,7 +38,7 @@ define('LB',"\n"); } if (!defined('VERSION')) { - define('VERSION', '1.5.1'); + define('VERSION', '1.5.2hg'); } ?> diff -r f26f5f57925d -r 9fe12b441d71 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sat Oct 11 13:32:25 2008 +0200 +++ b/sql/mssql_tableanddata.php Sat Oct 11 18:56:13 2008 +0200 @@ -1735,7 +1735,7 @@ $_SQL[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('lastemailedstories','')"; $_SQL[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('last_scheduled_run','')"; $_SQL[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('spamx.counter','0')"; -$_SQL[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('database_version','1.5.1')"; +$_SQL[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('database_version','1.5.2')"; $_SQL[] = "INSERT INTO {$_TABLES['trackbackcodes']} (code, name) VALUES (0,'Trackback Enabled')"; $_SQL[] = "INSERT INTO {$_TABLES['trackbackcodes']} (code, name) VALUES (-1,'Trackback Disabled')"; diff -r f26f5f57925d -r 9fe12b441d71 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sat Oct 11 13:32:25 2008 +0200 +++ b/sql/mysql_tableanddata.php Sat Oct 11 18:56:13 2008 +0200 @@ -982,7 +982,7 @@ $_DATA[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('lastemailedstories','') "; $_DATA[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('last_scheduled_run','') "; $_DATA[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('spamx.counter','0') "; -$_DATA[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('database_version','1.5.1') "; +$_DATA[] = "INSERT INTO {$_TABLES['vars']} (name, value) VALUES ('database_version','1.5.2') "; $_DATA[] = "INSERT INTO {$_TABLES['trackbackcodes']} (code, name) VALUES (0,'Trackback Enabled') "; $_DATA[] = "INSERT INTO {$_TABLES['trackbackcodes']} (code, name) VALUES (-1,'Trackback Disabled') "; From geeklog-cvs at lists.geeklog.net Sat Oct 11 13:23:16 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Oct 2008 13:23:16 -0400 Subject: [geeklog-cvs] geeklog: Ported updated install script over from Matt's GSoC 200... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0102c409a695 changeset: 6435:0102c409a695 user: Dirk Haun date: Sat Oct 11 19:22:54 2008 +0200 description: Ported updated install script over from Matt's GSoC 2008 project. diffstat: 8 files changed, 3339 insertions(+), 1222 deletions(-) public_html/admin/install/bigdump.php | 395 +++++ public_html/admin/install/index.php | 1792 +++++++++--------------- public_html/admin/install/install-plugins.php | 529 +++++++ public_html/admin/install/language/english.php | 134 + public_html/admin/install/layout/style.css | 296 ++- public_html/admin/install/lib-install.php | 758 ++++++++++ public_html/admin/install/migrate.php | 637 ++++++++ public_html/admin/install/success.php | 20 diffs (truncated from 5029 to 300 lines): diff -r 9fe12b441d71 -r 0102c409a695 public_html/admin/install/bigdump.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public_html/admin/install/bigdump.php Sat Oct 11 19:22:54 2008 +0200 @@ -0,0 +1,395 @@ +' . $LANG_ERROR[10]); + $error=true; + } + if (!$error && $db_connection_charset!=='') + @mysql_query("SET NAMES $db_connection_charset", $dbconnection); +} else { + $dbconnection = false; +} + +// Single file mode +if (!$error && !isset ($_REQUEST["fn"]) && $filename!="") { + echo '

' . $LANG_BIGDUMP[0] . '' . $LANG_BIGDUMP[1] . $filename . $LANG_BIGDUMP[2] . $db_name . $LANG_BIGDUMP[3] . $db_server . LB; +} + + +// Open the file +if (!$error && isset($_REQUEST["start"])) { + // Set current filename ($filename overrides $_REQUEST["fn"] if set) + if ($filename != "") + $curfilename = $filename; + else if (isset($_REQUEST["fn"])) + $curfilename = urldecode($_REQUEST["fn"]); + else + $curfilename = ""; + + // Recognize GZip filename + if (eregi("\.gz$",$curfilename)) + $gzipmode = true; + else + $gzipmode = false; + + if ((!$gzipmode && !$file=@fopen($curfilename,"rt")) || ($gzipmode && !$file=@gzopen($curfilename,"rt"))) { + echo INST_getAlertMsg($LANG_BIGDUMP[5] . $curfilename . $LANG_BIGDUMP[6]); + $error = true; + } + + // Get the file size (can't do it fast on gzipped files, no idea how) + else if ((!$gzipmode && @fseek($file, 0, SEEK_END)==0) || ($gzipmode && @gzseek($file, 0)==0)) { + if (!$gzipmode) $filesize = ftell($file); + else $filesize = gztell($file); // Always zero, ignore + } else { + echo INST_getAlertMsg($LANG_BIGDUMP[4] . $curfilename); + $error = true; + } +} + +// ******************************************************************************************* +// START IMPORT SESSION HERE +// ******************************************************************************************* + +if (!$error && isset($_REQUEST["start"]) && isset($_REQUEST["foffset"]) && eregi("(\.(sql|gz|csv))$",$curfilename)) { + + // Check start and foffset are numeric values + if (!is_numeric($_REQUEST["start"]) || !is_numeric($_REQUEST["foffset"])) { + echo INST_getAlertMsg($LANG_BIGDUMP[7]); + $error=true; + } + + if (!$error) { + $_REQUEST["start"] = floor($_REQUEST["start"]); + $_REQUEST["foffset"] = floor($_REQUEST["foffset"]); + echo '

' . $LANG_BIGDUMP[8] . ' ' . $curfilename . '

' . LB; + } + + // Check $_REQUEST["foffset"] upon $filesize (can't do it on gzipped files) + if (!$error && !$gzipmode && $_REQUEST["foffset"]>$filesize) { + echo INST_getAlertMsg($LANG_BIGDUMP[9]); + $error=true; + } + + // Set file pointer to $_REQUEST["foffset"] + if (!$error && ((!$gzipmode && fseek($file, $_REQUEST["foffset"])!=0) || ($gzipmode && gzseek($file, $_REQUEST["foffset"])!=0))) { + echo INST_getAlertMsg($LANG_BIGDUMP[10] . $_REQUEST["foffset"]); + $error = true; + } + + // Start processing queries from $file + if (!$error) { + $query=""; + $queries=0; + $totalqueries=$_REQUEST["totalqueries"]; + $linenumber=$_REQUEST["start"]; + $querylines=0; + $inparents=false; + + // Stay processing as long as the $linespersession is not reached or the query is still incomplete + while ($linenumber<$_REQUEST["start"]+$linespersession || $query!="") { + + // Read the whole next line + $dumpline = ""; + while (!feof($file) && substr ($dumpline, -1) != "\n") { + if (!$gzipmode) + $dumpline .= fgets($file, DATA_CHUNK_LENGTH); + else + $dumpline .= gzgets($file, DATA_CHUNK_LENGTH); + } + if ($dumpline==="") break; + + // Stop if csv file is used, but $csv_insert_table is not set + if (($csv_insert_table == "") && (eregi("(\.csv)$",$curfilename))) { + echo INST_getAlertMsg($LANG_BIGDUMP[11] . $linenumber . $LANG_BIGDUMP[12] . $csv_insert_table . $LANG_BIGDUMP[13]); + $error=true; + break; + } + + // Create an SQL query from CSV line + if (($csv_insert_table != "") && (eregi("(\.csv)$",$curfilename))) + $dumpline = 'INSERT INTO '.$csv_insert_table.' VALUES ('.$dumpline.');'; + + // Handle DOS and Mac encoded linebreaks (I don't know if it will work on Win32 or Mac Servers) + $dumpline=str_replace("\r\n", "\n", $dumpline); + $dumpline=str_replace("\r", "\n", $dumpline); + + // Skip comments and blank lines only if NOT in parents + if (!$inparents){ + $skipline=false; + reset($comment); + foreach ($comment as $comment_value) { + if (!$inparents && (trim($dumpline)=="" || strpos ($dumpline, $comment_value) === 0)) { + $skipline=true; + break; + } + } + if ($skipline) { + $linenumber++; + continue; + } + } + + // Remove double back-slashes from the dumpline prior to count the quotes ('\\' can only be within strings) + $dumpline_deslashed = str_replace ("\\\\","",$dumpline); + + // Count ' and \' in the dumpline to avoid query break within a text field ending by ; + // Please don't use double quotes ('"')to surround strings, it wont work + $parents=substr_count ($dumpline_deslashed, "'")-substr_count ($dumpline_deslashed, "\\'"); + if ($parents % 2 != 0) + $inparents=!$inparents; + + // Add the line to query + $query .= $dumpline; + + // Don't count the line if in parents (text fields may include unlimited linebreaks) + if (!$inparents) + $querylines++; + + // Stop if query contains more lines as defined by MAX_QUERY_LINES + if ($querylines>MAX_QUERY_LINES) { + echo INST_getAlertMsg($LANG_BIGDUMP[14] . $linenumber . $LANG_BIGDUMP[15] . MAX_QUERY_LINES . $LANG_BIGDUMP[16]); + $error=true; + break; + } + + // Execute query if end of query detected (; as last character) AND NOT in parents + if (ereg(";$",trim($dumpline)) && !$inparents) { + if (!TESTMODE && !mysql_query(trim($query), $dbconnection)) { + echo INST_getAlertMsg($LANG_BIGDUMP[17] . $linenumber . ': ' . trim($dumpline) . '.
' . $LANG_BIGDUMP[18] . trim(nl2br(htmlentities($query))) . '
' . $LANG_BIGDUMP[19] . mysql_error()); + $error=true; + break; + } + $totalqueries++; + $queries++; + $query=""; + $querylines=0; + } + $linenumber++; + } + } + + // Get the current file position + if (!$error) { + if (!$gzipmode) + $foffset = ftell($file); + else + $foffset = gztell($file); + if (!$foffset) { + echo INST_getAlertMsg($LANG_BIGDUMP[20]); + $error = true; + } + } + +// Print statistics + + if (!$error) { + $lines_this = $linenumber-$_REQUEST["start"]; + $lines_done = $linenumber-1; From geeklog-cvs at lists.geeklog.net Sat Oct 11 16:25:18 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 11 Oct 2008 16:25:18 -0400 Subject: [geeklog-cvs] geeklog: Delete a feed's file when deleting a feed (bug #0000758) Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fa6bf49fe93d changeset: 6436:fa6bf49fe93d user: Dirk Haun date: Sat Oct 11 22:25:08 2008 +0200 description: Delete a feed's file when deleting a feed (bug #0000758) diffstat: 2 files changed, 17 insertions(+), 8 deletions(-) public_html/admin/syndication.php | 24 ++++++++++++++++-------- public_html/docs/history | 1 + diffs (59 lines): diff -r 0102c409a695 -r fa6bf49fe93d public_html/admin/syndication.php --- a/public_html/admin/syndication.php Sat Oct 11 19:22:54 2008 +0200 +++ b/public_html/admin/syndication.php Sat Oct 11 22:25:08 2008 +0200 @@ -529,18 +529,23 @@ * @return string HTML redirect * */ -function deletefeed ($fid) +function deletefeed($fid) { global $_CONF, $_TABLES; if ($fid > 0) { - DB_delete ($_TABLES['syndication'], 'fid', $fid); + $feedfile = DB_getItem($_TABLES['syndication'], 'filename', + "fid = $fid"); + if (!empty($feedfile)) { + @unlink(SYND_getFeedPath($feedfile)); + } + DB_delete($_TABLES['syndication'], 'fid', $fid); - return COM_refresh ($_CONF['site_admin_url'] - . '/syndication.php?msg=59'); + return COM_refresh($_CONF['site_admin_url'] + . '/syndication.php?msg=59'); } - return COM_refresh ($_CONF['site_admin_url'] . '/syndication.php'); + return COM_refresh($_CONF['site_admin_url'] . '/syndication.php'); } @@ -577,9 +582,12 @@ { $display .= savefeed($_POST); } -elseif (($mode == $LANG_ADMIN['delete']) && !empty($LANG_ADMIN['delete']) && SEC_checkToken()) -{ - $display .= deletefeed(COM_applyFilter($_REQUEST['fid'])); +elseif (($mode == $LANG_ADMIN['delete']) && !empty($LANG_ADMIN['delete']) && SEC_checkToken()) { + $fid = 0; + if (isset($_POST['fid'])) { + $fid = COM_applyFilter($_POST['fid'], true); + } + $display .= deletefeed($fid); } else { diff -r 0102c409a695 -r fa6bf49fe93d public_html/docs/history --- a/public_html/docs/history Sat Oct 11 19:22:54 2008 +0200 +++ b/public_html/docs/history Sat Oct 11 22:25:08 2008 +0200 @@ -3,6 +3,7 @@ ??? ??, 2008 (1.5.2) ------------ +- Delete a feed's file when deleting a feed (bug #0000758) [Dirk] - The {start_storylink_anchortag} variable in the story templates was missing a '>' (reported by Michael Brusletten) [Dirk] - Display a "Service" column in the Admin's list of users when remote auth is From geeklog-cvs at lists.geeklog.net Sun Oct 12 02:40:19 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 02:40:19 -0400 Subject: [geeklog-cvs] geeklog: .hgignore file for stuff that won't go into the reposit... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8daaba43629e changeset: 6437:8daaba43629e user: Dirk Haun date: Sun Oct 12 08:40:08 2008 +0200 description: .hgignore file for stuff that won't go into the repository anyway diffstat: 1 file changed, 19 insertions(+) .hgignore | 19 +++++++++++++++++++ diffs (23 lines): diff -r fa6bf49fe93d -r 8daaba43629e .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Sun Oct 12 08:40:08 2008 +0200 @@ -0,0 +1,19 @@ +system/pear/Archive +system/pear/Console +system/pear/Date +system/pear/HTTP +system/pear/Mail +system/pear/Net +system/pear/OS +system/pear/PEAR +system/pear/PHP +system/pear/System.php +system/pear/Text +system/pear/XML +system/pear/scripts + +db-config.php +public_html/siteconfig.php + +syntax: glob +backups/*.sql From geeklog-cvs at lists.geeklog.net Sun Oct 12 02:55:08 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 02:55:08 -0400 Subject: [geeklog-cvs] geeklog: Source code cosmetics (mostly whitespaces) - no change ... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e99d95caff64 changeset: 6438:e99d95caff64 user: Dirk Haun date: Sun Oct 12 08:54:54 2008 +0200 description: Source code cosmetics (mostly whitespaces) - no change in functionality diffstat: 2 files changed, 58 insertions(+), 57 deletions(-) system/classes/downloader.class.php | 87 +++++++++++++++++------------------ system/classes/upload.class.php | 28 +++++------ diffs (299 lines): diff -r 8daaba43629e -r e99d95caff64 system/classes/downloader.class.php --- a/system/classes/downloader.class.php Sun Oct 12 08:40:08 2008 +0200 +++ b/system/classes/downloader.class.php Sun Oct 12 08:54:54 2008 +0200 @@ -32,8 +32,9 @@ // $Id: downloader.class.php,v 1.15 2008/08/11 14:11:21 dhaun Exp $ /** -* This class allows you to download a file from outside the web tree. Many hooks -* around security and file types have been added for customization within any app +* This class allows you to download a file from outside the web tree. Many +* hooks around security and file types have been added for customization within +* any app. * * @author Tony Bibbs * @@ -85,7 +86,7 @@ * @access private */ var $_limitByIP; // Boolean - + /** * Constructor * @@ -105,7 +106,7 @@ $this->_setAvailableExtensions (); } - + // PRIVATE METHODS /** @@ -124,7 +125,7 @@ $this->_logItem('Warning',$warningText); } } - + /** * Adds an error that was encountered * @@ -158,7 +159,7 @@ $this->_logItem('Debug',$debugText); } } - + /** * Logs an item to the log file * @@ -181,7 +182,7 @@ fclose($file); return true; } - + /** * Defines superset of available Mime types. * @@ -193,30 +194,30 @@ if (sizeof($extensions) == 0) { $this->_availableMimeTypes = array( - 'tgz' => 'application/x-gzip-compressed', - 'gz' => 'application/x-gzip-compressed', - 'zip' => 'application/x-zip-compresseed', - 'tar' => 'application/x-tar', - 'php' => 'text/plain', + 'tgz' => 'application/x-gzip-compressed', + 'gz' => 'application/x-gzip-compressed', + 'zip' => 'application/x-zip-compresseed', + 'tar' => 'application/x-tar', + 'php' => 'text/plain', 'phps' => 'text/plain', - 'txt' => 'text/plain', + 'txt' => 'text/plain', 'html' => 'text/html', - 'htm' => 'text/html', - 'bmp' => 'image/bmp', - 'ico' => 'image/bmp', - 'gif' => 'image/gif', - 'jpg' => 'image/jpeg', + 'htm' => 'text/html', + 'bmp' => 'image/bmp', + 'ico' => 'image/bmp', + 'gif' => 'image/gif', + 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', - 'png' => 'image/png', - 'png' => 'image/x-png', - 'mp3' => 'audio/mpeg', - 'wav' => 'audio/wav', - 'pdf' => 'application/pdf', - 'swf' => 'application/x-shockwave-flash', - 'doc' => 'application/msword', - 'xls' => 'application/vnd.ms-excel', - 'exe' => 'application/octet-stream', - 'sql' => 'text/plain' + 'png' => 'image/png', + 'png' => 'image/x-png', + 'mp3' => 'audio/mpeg', + 'wav' => 'audio/wav', + 'pdf' => 'application/pdf', + 'swf' => 'application/x-shockwave-flash', + 'doc' => 'application/msword', + 'xls' => 'application/vnd.ms-excel', + 'exe' => 'application/octet-stream', + 'sql' => 'text/plain' ); } else { $this->_availableMimeTypes = $extensions; @@ -227,9 +228,9 @@ $this->_availableExtensions[] = $ext; } } - + // Public Methods - + /** * Extra security option that forces all attempts to upload a file to be done * so from a set of VERY specific IP's. This is only good for those who are @@ -250,7 +251,7 @@ return false; } } - + /** * Sets log file * @@ -269,7 +270,7 @@ $this->_logFile = $logFile; return true; } - + /** * Enables/disables logging of errors and warnings * @@ -298,7 +299,7 @@ { return $this->_doLogging; } - + /** * Will force the debug messages in this class to be * printed @@ -316,7 +317,7 @@ $this->_debug = false; } } - + /** * This function will print any errors out. This is useful in debugging * @@ -341,7 +342,7 @@ return $retval; } } - + /** * This function will print any warnings out. This is useful in debugging * @@ -357,7 +358,7 @@ } } } - + /** * This function will print any debmug messages out. * @@ -373,7 +374,7 @@ } } } - + /** * Returns if any errors have been encountered thus far * @@ -388,7 +389,7 @@ return false; } } - + /** * Sets allowed mime types for this instance * @@ -408,7 +409,7 @@ } $this->_allowedExtensions = $validExtensions; } - + /** * Gets allowed mime types for this instance * @@ -419,7 +420,7 @@ { return $this->_allowedExtensions; } - + /** * Checks to see that mime type for current file is allowed for upload * @@ -436,7 +437,7 @@ return true; } } - + /** * Sets file upload path * @@ -460,7 +461,7 @@ return true; } - + /** * Returns directory to upload to * @@ -471,7 +472,7 @@ { return $this->_sourceDirectory; } - + /** * Attempts to dowload a file * diff -r 8daaba43629e -r e99d95caff64 system/classes/upload.class.php --- a/system/classes/upload.class.php Sun Oct 12 08:40:08 2008 +0200 +++ b/system/classes/upload.class.php Sun Oct 12 08:54:54 2008 +0200 @@ -2,16 +2,16 @@ /* Reminder: always indent with 4 spaces (no tabs). */ // +---------------------------------------------------------------------------+ -// | Geeklog 1.4 | +// | Geeklog 1.5 | // +---------------------------------------------------------------------------+ // | upload.class.php | // | | // | Geeklog file upload class library. | // +---------------------------------------------------------------------------+ -// | Copyright (C) 2002-2006 by the following authors: | +// | Copyright (C) 2002-2008 by the following authors: | // | | -// | Authors: Tony Bibbs - tony at tonybibbs.com | -// | Dirk Haun - dirk at haun-online.de | +// | Authors: Tony Bibbs - tony AT tonybibbs DOT com | +// | Dirk Haun - dirk AT haun-online DOT de | // +---------------------------------------------------------------------------+ // | | // | This program is free software; you can redistribute it and/or | @@ -259,23 +259,23 @@ $this->_availableMimeTypes = array( 'application/x-gzip-compressed' => '.tar.gz,.tgz', - 'application/x-zip-compressed' => '.zip', - 'application/x-tar' => '.tar', + 'application/x-zip-compressed' => '.zip', + 'application/x-tar' => '.tar', 'text/plain' => '.phps,.txt,.inc', - 'text/html' => '.html,.htm', + 'text/html' => '.html,.htm', 'image/bmp' => '.bmp,.ico', 'image/gif' => '.gif', - 'image/pjpeg' => '.jpg,.jpeg', + 'image/pjpeg' => '.jpg,.jpeg', 'image/jpeg' => '.jpg,.jpeg', - 'image/png' => '.png', - 'image/x-png' => '.png', + 'image/png' => '.png', + 'image/x-png' => '.png', 'audio/mpeg' => '.mp3', - 'audio/wav' => '.wav', - 'application/pdf' => '.pdf', + 'audio/wav' => '.wav', + 'application/pdf' => '.pdf', 'application/x-shockwave-flash' => '.swf', 'application/msword' => '.doc', - 'application/vnd.ms-excel' => '.xls', - 'application/octet-stream' => '.fla,.psd' + 'application/vnd.ms-excel' => '.xls', + 'application/octet-stream' => '.fla,.psd' ); } else { $this->_availableMimeTypes = $mimeTypes; From geeklog-cvs at lists.geeklog.net Sun Oct 12 03:02:34 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 03:02:34 -0400 Subject: [geeklog-cvs] geeklog: 'msg' parameter will only come in through a GET request... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/10d8a479cde9 changeset: 6439:10d8a479cde9 user: Dirk Haun date: Sun Oct 12 09:02:24 2008 +0200 description: 'msg' parameter will only come in through a GET request anyway diffstat: 1 file changed, 5 insertions(+), 5 deletions(-) public_html/admin/plugins/links/index.php | 10 +++++----- diffs (24 lines): diff -r e99d95caff64 -r 10d8a479cde9 public_html/admin/plugins/links/index.php --- a/public_html/admin/plugins/links/index.php Sun Oct 12 08:54:54 2008 +0200 +++ b/public_html/admin/plugins/links/index.php Sun Oct 12 09:02:24 2008 +0200 @@ -534,15 +534,15 @@ } $display .= COM_siteFooter (); } else { // 'cancel' or no mode at all - $display .= COM_siteHeader ('menu', $LANG_LINKS_ADMIN[11]); - if (isset ($_REQUEST['msg'])) { - $msg = COM_applyFilter ($_REQUEST['msg'], true); + $display .= COM_siteHeader('menu', $LANG_LINKS_ADMIN[11]); + if (isset($_GET['msg'])) { + $msg = COM_applyFilter($_GET['msg'], true); if ($msg > 0) { - $display .= COM_showMessage ($msg, 'links'); + $display .= COM_showMessage($msg, 'links'); } } $display .= listlinks(); - $display .= COM_siteFooter (); + $display .= COM_siteFooter(); } echo $display; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:28 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:28 -0400 Subject: [geeklog-cvs] geeklog: Removed Spam-X group and permission Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/4729f3d6cd6b changeset: 6441:4729f3d6cd6b user: Dirk Haun date: Sun Oct 12 09:45:22 2008 +0200 description: Removed Spam-X group and permission diffstat: 2 files changed, 8 deletions(-) sql/mssql_tableanddata.php | 4 ---- sql/mysql_tableanddata.php | 4 ---- diffs (70 lines): diff -r 5383766e37f5 -r 4729f3d6cd6b sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 09:42:22 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 09:45:22 2008 +0200 @@ -1183,7 +1183,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (17,14)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (18,14)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (23,15)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18)"; @@ -1270,7 +1269,6 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22,'staticpages.PHP','Ability use PHP in static pages',0) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (23,'spamx.admin', 'Full access to Spam-X plugin', 0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'links.moderate','Ability to moderate pending links',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'links.edit','Access to links editor',0) @@ -1324,7 +1322,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (14,NULL,1)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (15,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1)"; @@ -1346,7 +1343,6 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14,'Static Page Admin','Can administer static pages',0) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (15,'spamx Admin', 'Users in this group can administer the Spam-X plugin',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) diff -r 5383766e37f5 -r 4729f3d6cd6b sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 09:42:22 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 09:45:22 2008 +0200 @@ -512,7 +512,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (17,14) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (18,14) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (23,15) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18) "; @@ -587,7 +586,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20,'links.submit','May skip the links submission queue',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22,'staticpages.PHP','Ability use PHP in static pages',0) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (23,'spamx.admin', 'Full access to Spam-X plugin', 0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) "; @@ -632,7 +630,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (14,NULL,1) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (15,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1) "; @@ -650,7 +647,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14,'Static Page Admin','Can administer static pages',0) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (15,'spamx Admin', 'Users in this group can administer the Spam-X plugin',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:28 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:28 -0400 Subject: [geeklog-cvs] geeklog: Removed plugins: Tables, default data, plugin registration Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5383766e37f5 changeset: 6440:5383766e37f5 user: Dirk Haun date: Sun Oct 12 09:42:22 2008 +0200 description: Removed plugins: Tables, default data, plugin registration diffstat: 2 files changed, 8 insertions(+), 611 deletions(-) sql/mssql_tableanddata.php | 330 -------------------------------------------- sql/mysql_tableanddata.php | 289 -------------------------------------- diffs (truncated from 731 to 300 lines): diff -r 10d8a479cde9 -r 5383766e37f5 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 09:02:24 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 09:42:22 2008 +0200 @@ -431,226 +431,6 @@ ) ON [PRIMARY] "; -// Tables used by the bundled plugins - -// Calendar plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['events']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [postmode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [datestart] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [dateend] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [numeric](8, 0) NULL , - [owner_id] [numeric](8, 0) NULL , - [group_id] [numeric](8, 0) NULL , - [perm_owner] [tinyint] NULL , - [perm_group] [tinyint] NULL , - [perm_members] [tinyint] NULL , - [perm_anon] [tinyint] NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timestart] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timeend] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['eventsubmission']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [datestart] [smalldatetime] NULL , - [dateend] [smalldatetime] NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NOT NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [timestart] [smalldatetime] NULL , - [timeend] [smalldatetime] NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['personal_events']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [datestart] [smalldatetime] NULL , - [dateend] [smalldatetime] NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [postmode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL , - [uid] [int] NOT NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timestart] [smalldatetime] NULL , - [timeend] [smalldatetime] NULL -) ON [PRIMARY] -"; - -// Links plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['linkcategories']}] ( - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [pid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [category] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [tid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [created] [datetime] NULL , - [modified] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['links']}] ( - [lid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [title] [varchar] (96) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [int] NOT NULL , - [date] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['linksubmission']}] ( - [lid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [title] [varchar] (96) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [int] NULL , - [date] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL -) ON [PRIMARY] -"; - -// Polls plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [qid] [int] NOT NULL , - [aid] [tinyint] NOT NULL , - [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [votes] [numeric](8, 0) NULL , - [remark] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] ( - [qid] [int] NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['polltopics']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [topic] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [voters] [numeric](8, 0) NULL , - [questions] [int] NOT NULL , - [date] [datetime] NULL , - [display] [tinyint] NOT NULL , - [is_open] [tinyint] NOT NULL , - [hideresults] [tinyint] NOT NULL , - [commentcode] [smallint] NOT NULL , - [statuscode] [smallint] NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] ( - [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [date] [numeric](10, 0) NULL -) ON [PRIMARY] -"; - -// Spam-X plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['spamx']}] ( - [name] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [value] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) ON [PRIMARY] -"; - -// Static Pages plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['staticpage']}] ( - [sp_id] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_uid] [int] NOT NULL , - [sp_title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_content] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_hits] [numeric](8, 0) NOT NULL , - [sp_date] [datetime] NOT NULL , - [sp_format] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_onmenu] [tinyint] NOT NULL , - [sp_label] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [commentcode] [smallint] NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL , - [sp_centerblock] [tinyint] NOT NULL , - [sp_help] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [sp_tid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_where] [tinyint] NOT NULL , - [sp_php] [tinyint] NOT NULL , - [sp_nf] [tinyint] NULL , - [sp_inblock] [tinyint] NULL , - [postmode] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) ON [PRIMARY] -"; - $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['access']}] ADD CONSTRAINT [PK_{$_TABLES['access']}] PRIMARY KEY CLUSTERED @@ -772,44 +552,10 @@ ) ON [PRIMARY] "; -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['linkcategories']}] ADD - CONSTRAINT [PK_{$_TABLES['linkcategories']}] PRIMARY KEY CLUSTERED - ( - [pid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['links']}] ADD - CONSTRAINT [DF_{$_TABLES['links']}_perm_group] DEFAULT (3) FOR [perm_group], - CONSTRAINT [DF_{$_TABLES['links']}_perm_anon] DEFAULT (2) FOR [perm_anon], - CONSTRAINT [DF_{$_TABLES['links']}_perm_members] DEFAULT (2) FOR [perm_members], - CONSTRAINT [DF_{$_TABLES['links']}_perm_owner] DEFAULT (3) FOR [perm_owner], - CONSTRAINT [DF_{$_TABLES['links']}_hits] DEFAULT (0) FOR [hits], - CONSTRAINT [PK_{$_TABLES['links']}] PRIMARY KEY CLUSTERED - ( - [lid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['linksubmission']}] ADD - CONSTRAINT [PK_{$_TABLES['linksubmission']}] PRIMARY KEY CLUSTERED - ( - [lid] - ) ON [PRIMARY] -"; - $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['maillist']}] ADD CONSTRAINT [PK_{$_TABLES['maillist']}] PRIMARY KEY CLUSTERED ( [code] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['personal_events']}] ADD - CONSTRAINT [PK_{$_TABLES['personal_events']}] PRIMARY KEY CLUSTERED - ( - [eid], - [uid] ) ON [PRIMARY] "; @@ -824,39 +570,6 @@ CONSTRAINT [PK_{$_TABLES['plugins']}] PRIMARY KEY CLUSTERED ( [pi_name] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD - CONSTRAINT [PK_{$_TABLES['pollanswers']}] PRIMARY KEY CLUSTERED - ( - [qid], - [aid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD - CONSTRAINT [DF_{$_TABLES['pollanswers']}_qid] DEFAULT ('0') FOR [qid] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollquestions']}] ADD - CONSTRAINT [PK_{$_TABLES['pollquestions']}] PRIMARY KEY CLUSTERED - ( - [qid] - ) ON [PRIMARY] -"; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:29 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:29 -0400 Subject: [geeklog-cvs] geeklog: Removed Static Pages group and permissions Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1832c87da839 changeset: 6442:1832c87da839 user: Dirk Haun date: Sun Oct 12 09:49:43 2008 +0200 description: Removed Static Pages group and permissions diffstat: 2 files changed, 14 deletions(-) sql/mssql_tableanddata.php | 7 ------- sql/mysql_tableanddata.php | 7 ------- diffs (81 lines): diff -r 4729f3d6cd6b -r 1832c87da839 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 09:45:22 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 09:49:43 2008 +0200 @@ -1181,8 +1181,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (17,14)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (18,14)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18)"; @@ -1264,11 +1262,8 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (14,'group.edit','Ability to edit groups',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'staticpages.edit','Ability to edit a static page',0) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'staticpages.delete','Ability to delete static pages',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22,'staticpages.PHP','Ability use PHP in static pages',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'links.moderate','Ability to moderate pending links',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'links.edit','Access to links editor',0) @@ -1321,7 +1316,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (14,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1)"; @@ -1342,7 +1336,6 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14,'Static Page Admin','Can administer static pages',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) diff -r 4729f3d6cd6b -r 1832c87da839 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 09:45:22 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 09:49:43 2008 +0200 @@ -510,8 +510,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (17,14) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (18,14) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18) "; @@ -580,12 +578,9 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (14,'group.edit','Ability to edit groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (17,'staticpages.edit','Ability to edit a static page',0) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (18,'staticpages.delete','Ability to delete static pages',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20,'links.submit','May skip the links submission queue',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (22,'staticpages.PHP','Ability use PHP in static pages',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) "; @@ -629,7 +624,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (14,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1) "; @@ -646,7 +640,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (14,'Static Page Admin','Can administer static pages',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:29 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:29 -0400 Subject: [geeklog-cvs] geeklog: Removed polls group and permissions Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/0d16c24ad5f1 changeset: 6443:0d16c24ad5f1 user: Dirk Haun date: Sun Oct 12 10:15:49 2008 +0200 description: Removed polls group and permissions diffstat: 2 files changed, 12 deletions(-) sql/mssql_tableanddata.php | 6 ------ sql/mysql_tableanddata.php | 6 ------ diffs (102 lines): diff -r 1832c87da839 -r 0d16c24ad5f1 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 09:49:43 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 10:15:49 2008 +0200 @@ -1176,7 +1176,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,7)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (12,8)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11)"; @@ -1268,7 +1267,6 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'links.moderate','Ability to moderate pending links',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'links.edit','Access to links editor',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20,'links.submit','May skip the links submission queue',0) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (12,'polls.edit','Access to polls editor',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) @@ -1287,7 +1285,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (11,NULL,1)"; @@ -1297,7 +1294,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,12)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,10)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,8)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,5)"; @@ -1308,7 +1304,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,11)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,2,NULL)"; @@ -1330,7 +1325,6 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Links Admin','Has full access to links features',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (8,'Polls Admin','Has full access to polls features',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) diff -r 1832c87da839 -r 0d16c24ad5f1 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 09:49:43 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 10:15:49 2008 +0200 @@ -505,7 +505,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,7) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (12,8) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11) "; @@ -573,7 +572,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (9,'calendar.edit','Access to event editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (10,'block.edit','Access to block editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (11,'topic.edit','Access to topic editor',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (12,'polls.edit','Access to polls editor',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (13,'plugin.edit','Access to plugin editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (14,'group.edit','Ability to edit groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) "; @@ -595,7 +593,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (11,NULL,1) "; @@ -605,7 +602,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,12) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,10) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,8) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,5) "; @@ -616,7 +612,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,11) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,2,NULL) "; @@ -634,7 +629,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Links Admin','Has full access to links features',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',0) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (8,'Polls Admin','Has full access to polls features',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:31 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:31 -0400 Subject: [geeklog-cvs] geeklog: Removed Links group and permissions Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/556c852a5ace changeset: 6444:556c852a5ace user: Dirk Haun date: Sun Oct 12 10:23:17 2008 +0200 description: Removed Links group and permissions diffstat: 2 files changed, 18 deletions(-) sql/mssql_tableanddata.php | 9 --------- sql/mysql_tableanddata.php | 9 --------- diffs (115 lines): diff -r 0d16c24ad5f1 -r 556c852a5ace sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 10:15:49 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 10:23:17 2008 +0200 @@ -1165,8 +1165,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (1,3)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (2,3)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (3,5)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,5)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,9)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9)"; @@ -1264,9 +1262,6 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'links.moderate','Ability to moderate pending links',0) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'links.edit','Access to links editor',0) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20,'links.submit','May skip the links submission queue',0) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) @@ -1282,7 +1277,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,NULL,1)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1)"; @@ -1296,7 +1290,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,5)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,4)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,3)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (12,NULL,1)"; @@ -1306,7 +1299,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL)"; @@ -1322,7 +1314,6 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (2,'All Users','Group that a typical user is added to',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Links Admin','Has full access to links features',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) diff -r 0d16c24ad5f1 -r 556c852a5ace sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 10:15:49 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 10:23:17 2008 +0200 @@ -494,8 +494,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (1,3) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (2,3) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (3,5) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,5) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,9) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9) "; @@ -563,8 +561,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (1,'story.edit','Access to story editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (2,'story.moderate','Ability to moderate pending stories',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'links.moderate','Ability to moderate pending links',0) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'links.edit','Access to links editor',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (5,'user.edit','Access to user editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (6,'user.delete','Ability to delete a user',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (7,'user.mail','Ability to send email to members',1) "; @@ -577,7 +573,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (20,'links.submit','May skip the links submission queue',0) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) "; @@ -590,7 +585,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,NULL,1) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1) "; @@ -604,7 +598,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,5) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,4) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,3) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (12,NULL,1) "; @@ -614,7 +607,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL) "; @@ -626,7 +618,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (2,'All Users','Group that a typical user is added to',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Links Admin','Has full access to links features',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:28 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:28 -0400 Subject: [geeklog-cvs] geeklog: Removed plugins: Tables, default data, plugin registration Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/5383766e37f5 changeset: 6440:5383766e37f5 user: Dirk Haun date: Sun Oct 12 09:42:22 2008 +0200 description: Removed plugins: Tables, default data, plugin registration diffstat: 2 files changed, 8 insertions(+), 611 deletions(-) sql/mssql_tableanddata.php | 330 -------------------------------------------- sql/mysql_tableanddata.php | 289 -------------------------------------- diffs (truncated from 731 to 300 lines): diff -r 10d8a479cde9 -r 5383766e37f5 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 09:02:24 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 09:42:22 2008 +0200 @@ -431,226 +431,6 @@ ) ON [PRIMARY] "; -// Tables used by the bundled plugins - -// Calendar plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['events']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [postmode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [datestart] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [dateend] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [numeric](8, 0) NULL , - [owner_id] [numeric](8, 0) NULL , - [group_id] [numeric](8, 0) NULL , - [perm_owner] [tinyint] NULL , - [perm_group] [tinyint] NULL , - [perm_members] [tinyint] NULL , - [perm_anon] [tinyint] NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timestart] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timeend] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['eventsubmission']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [datestart] [smalldatetime] NULL , - [dateend] [smalldatetime] NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NOT NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [timestart] [smalldatetime] NULL , - [timeend] [smalldatetime] NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['personal_events']}] ( - [eid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [event_type] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [datestart] [smalldatetime] NULL , - [dateend] [smalldatetime] NULL , - [address1] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [address2] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [city] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [state] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [zipcode] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [allday] [smallint] NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [postmode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL , - [uid] [int] NOT NULL , - [location] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [timestart] [smalldatetime] NULL , - [timeend] [smalldatetime] NULL -) ON [PRIMARY] -"; - -// Links plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['linkcategories']}] ( - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [pid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [category] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [tid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [created] [datetime] NULL , - [modified] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['links']}] ( - [lid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [title] [varchar] (96) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [int] NOT NULL , - [date] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['linksubmission']}] ( - [lid] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [cid] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [url] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [title] [varchar] (96) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [hits] [int] NULL , - [date] [datetime] NULL , - [owner_id] [numeric](8, 0) NOT NULL -) ON [PRIMARY] -"; - -// Polls plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollanswers']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [qid] [int] NOT NULL , - [aid] [tinyint] NOT NULL , - [answer] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [votes] [numeric](8, 0) NULL , - [remark] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollquestions']}] ( - [qid] [int] NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [question] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['polltopics']}] ( - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [topic] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [voters] [numeric](8, 0) NULL , - [questions] [int] NOT NULL , - [date] [datetime] NULL , - [display] [tinyint] NOT NULL , - [is_open] [tinyint] NOT NULL , - [hideresults] [tinyint] NOT NULL , - [commentcode] [smallint] NOT NULL , - [statuscode] [smallint] NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL -) ON [PRIMARY] -"; - -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['pollvoters']}] ( - [id] [numeric](10, 0) IDENTITY (1, 1) NOT NULL , - [pid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [ipaddress] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [date] [numeric](10, 0) NULL -) ON [PRIMARY] -"; - -// Spam-X plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['spamx']}] ( - [name] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [value] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) ON [PRIMARY] -"; - -// Static Pages plugin -$_SQL[] = " -CREATE TABLE [dbo].[{$_TABLES['staticpage']}] ( - [sp_id] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_uid] [int] NOT NULL , - [sp_title] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_content] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_hits] [numeric](8, 0) NOT NULL , - [sp_date] [datetime] NOT NULL , - [sp_format] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_onmenu] [tinyint] NOT NULL , - [sp_label] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [commentcode] [smallint] NOT NULL , - [owner_id] [numeric](8, 0) NOT NULL , - [group_id] [numeric](8, 0) NOT NULL , - [perm_owner] [tinyint] NOT NULL , - [perm_group] [tinyint] NOT NULL , - [perm_members] [tinyint] NOT NULL , - [perm_anon] [tinyint] NOT NULL , - [sp_centerblock] [tinyint] NOT NULL , - [sp_help] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , - [sp_tid] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , - [sp_where] [tinyint] NOT NULL , - [sp_php] [tinyint] NOT NULL , - [sp_nf] [tinyint] NULL , - [sp_inblock] [tinyint] NULL , - [postmode] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL -) ON [PRIMARY] -"; - $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['access']}] ADD CONSTRAINT [PK_{$_TABLES['access']}] PRIMARY KEY CLUSTERED @@ -772,44 +552,10 @@ ) ON [PRIMARY] "; -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['linkcategories']}] ADD - CONSTRAINT [PK_{$_TABLES['linkcategories']}] PRIMARY KEY CLUSTERED - ( - [pid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['links']}] ADD - CONSTRAINT [DF_{$_TABLES['links']}_perm_group] DEFAULT (3) FOR [perm_group], - CONSTRAINT [DF_{$_TABLES['links']}_perm_anon] DEFAULT (2) FOR [perm_anon], - CONSTRAINT [DF_{$_TABLES['links']}_perm_members] DEFAULT (2) FOR [perm_members], - CONSTRAINT [DF_{$_TABLES['links']}_perm_owner] DEFAULT (3) FOR [perm_owner], - CONSTRAINT [DF_{$_TABLES['links']}_hits] DEFAULT (0) FOR [hits], - CONSTRAINT [PK_{$_TABLES['links']}] PRIMARY KEY CLUSTERED - ( - [lid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['linksubmission']}] ADD - CONSTRAINT [PK_{$_TABLES['linksubmission']}] PRIMARY KEY CLUSTERED - ( - [lid] - ) ON [PRIMARY] -"; - $_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['maillist']}] ADD CONSTRAINT [PK_{$_TABLES['maillist']}] PRIMARY KEY CLUSTERED ( [code] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['personal_events']}] ADD - CONSTRAINT [PK_{$_TABLES['personal_events']}] PRIMARY KEY CLUSTERED - ( - [eid], - [uid] ) ON [PRIMARY] "; @@ -824,39 +570,6 @@ CONSTRAINT [PK_{$_TABLES['plugins']}] PRIMARY KEY CLUSTERED ( [pi_name] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD - CONSTRAINT [PK_{$_TABLES['pollanswers']}] PRIMARY KEY CLUSTERED - ( - [qid], - [aid] - ) ON [PRIMARY] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollanswers']}] ADD - CONSTRAINT [DF_{$_TABLES['pollanswers']}_qid] DEFAULT ('0') FOR [qid] -"; - -$_SQL[] = "ALTER TABLE [dbo].[{$_TABLES['pollquestions']}] ADD - CONSTRAINT [PK_{$_TABLES['pollquestions']}] PRIMARY KEY CLUSTERED - ( - [qid] - ) ON [PRIMARY] -"; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:32 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:32 -0400 Subject: [geeklog-cvs] geeklog: Removed Calendar group and permissions Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/30a21fd07b98 changeset: 6445:30a21fd07b98 user: Dirk Haun date: Sun Oct 12 10:33:27 2008 +0200 description: Removed Calendar group and permissions diffstat: 2 files changed, 18 deletions(-) sql/mssql_tableanddata.php | 9 --------- sql/mysql_tableanddata.php | 9 --------- diffs (122 lines): diff -r 556c852a5ace -r 30a21fd07b98 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 10:23:17 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 10:33:27 2008 +0200 @@ -1170,8 +1170,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES(7,12)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,7)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,7)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10)"; @@ -1251,8 +1249,6 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (5,'user.edit','Access to user editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (6,'user.delete','Ability to delete a user',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (7,'user.mail','Ability to send email to members',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (8,'calendar.moderate','Ability to moderate pending events',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (9,'calendar.edit','Access to event editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (10,'block.edit','Access to block editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (11,'topic.edit','Access to topic editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (13,'plugin.edit','Access to plugin editor',1) @@ -1260,7 +1256,6 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) @@ -1278,7 +1273,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,NULL,1)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (11,NULL,1)"; @@ -1288,7 +1282,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,12)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,10)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,4)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,3)"; @@ -1297,7 +1290,6 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,11)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL)"; @@ -1315,7 +1307,6 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) diff -r 556c852a5ace -r 30a21fd07b98 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 10:23:17 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 10:33:27 2008 +0200 @@ -499,8 +499,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES(7,12) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,7) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,7) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10) "; @@ -564,8 +562,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (5,'user.edit','Access to user editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (6,'user.delete','Ability to delete a user',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (7,'user.mail','Ability to send email to members',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (8,'calendar.moderate','Ability to moderate pending events',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (9,'calendar.edit','Access to event editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (10,'block.edit','Access to block editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (11,'topic.edit','Access to topic editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (13,'plugin.edit','Access to plugin editor',1) "; @@ -573,7 +569,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (21,'calendar.submit','May skip the event submission queue',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) "; @@ -586,7 +581,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,NULL,1) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,NULL,1) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (11,NULL,1) "; @@ -596,7 +590,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,12) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,10) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,9) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,7) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,6) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,4) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,3) "; @@ -605,7 +598,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,NULL,11) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (10,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (9,2,NULL) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (7,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (6,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (4,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL) "; @@ -619,7 +611,6 @@ $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Calendar Admin','Has full access to calendar features',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:33 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:33 -0400 Subject: [geeklog-cvs] geeklog: Fill gaps in feature ids left after removing the plugins Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d49e335b8465 changeset: 6446:d49e335b8465 user: Dirk Haun date: Sun Oct 12 12:43:07 2008 +0200 description: Fill gaps in feature ids left after removing the plugins diffstat: 2 files changed, 14 insertions(+), 14 deletions(-) sql/mssql_tableanddata.php | 14 +++++++------- sql/mysql_tableanddata.php | 14 +++++++------- diffs (80 lines): diff -r 30a21fd07b98 -r d49e335b8465 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 10:33:27 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 12:43:07 2008 +0200 @@ -1176,9 +1176,9 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,17)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,18)"; $_SQL[] = " set identity_insert {$_TABLES['blocks']} on; @@ -1246,19 +1246,19 @@ INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (1,'story.edit','Access to story editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (2,'story.moderate','Ability to moderate pending stories',1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'story.submit','May skip the story submission queue',1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (5,'user.edit','Access to user editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (6,'user.delete','Ability to delete a user',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (7,'user.mail','Ability to send email to members',1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (8,'syndication.edit', 'Access to Content Syndication', 1) +INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (9,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (10,'block.edit','Access to block editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (11,'topic.edit','Access to topic editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (13,'plugin.edit','Access to plugin editor',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (14,'group.edit','Ability to edit groups',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) -INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) set identity_insert {$_TABLES['features']} off "; diff -r 30a21fd07b98 -r d49e335b8465 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 10:33:27 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 12:43:07 2008 +0200 @@ -505,9 +505,9 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (24,3) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (25,17) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (26,18) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,17) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,18) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (1,1,'user_block','gldefault','User Functions','all',2,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (2,1,'admin_block','gldefault','Admins Only','all',1,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; @@ -559,19 +559,19 @@ $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (1,'story.edit','Access to story editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (2,'story.moderate','Ability to moderate pending stories',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (3,'story.submit','May skip the story submission queue',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (4,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (5,'user.edit','Access to user editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (6,'user.delete','Ability to delete a user',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (7,'user.mail','Ability to send email to members',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (8,'syndication.edit', 'Access to Content Syndication', 1) "; +$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (9,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (10,'block.edit','Access to block editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (11,'topic.edit','Access to topic editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (13,'plugin.edit','Access to plugin editor',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (14,'group.edit','Ability to edit groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (15,'group.delete','Ability to delete groups',1) "; $_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (16,'block.delete','Ability to delete a block',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (19,'story.submit','May skip the story submission queue',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (24,'story.ping', 'Ability to send pings, pingbacks, or trackbacks for stories', 1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (25,'syndication.edit', 'Access to Content Syndication', 1) "; -$_DATA[] = "INSERT INTO {$_TABLES['features']} (ft_id, ft_name, ft_descr, ft_gl_core) VALUES (26,'webservices.atompub', 'May use Atompub Webservices (if restricted)', 1) "; $_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (0,'Show Only in Topic') "; $_DATA[] = "INSERT INTO {$_TABLES['frontpagecodes']} (code, name) VALUES (1,'Show on Front Page') "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:35 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:35 -0400 Subject: [geeklog-cvs] geeklog: Fill gaps in group ids left after removing the plugin g... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/1f90378e366e changeset: 6447:1f90378e366e user: Dirk Haun date: Sun Oct 12 13:03:31 2008 +0200 description: Fill gaps in group ids left after removing the plugin groups diffstat: 2 files changed, 18 insertions(+), 16 deletions(-) sql/mssql_tableanddata.php | 17 +++++++++-------- sql/mysql_tableanddata.php | 17 +++++++++-------- diffs (108 lines): diff -r d49e335b8465 -r 1f90378e366e sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 12:43:07 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 13:03:31 2008 +0200 @@ -1169,7 +1169,7 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES(7,12)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (7,12)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10)"; @@ -1177,8 +1177,8 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,17)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,18)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8)"; $_SQL[] = " set identity_insert {$_TABLES['blocks']} on; @@ -1295,10 +1295,11 @@ $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL)"; $_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1)"; -$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1)"; +$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1)"; +$_SQL[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,NULL,1)"; +// Traditionally, grp_id 1 = Root, 2 = All Users, 13 = Logged-In Users $_SQL[] = " set identity_insert {$_TABLES['groups']} on @@ -1306,15 +1307,15 @@ INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (2,'All Users','Group that a typical user is added to',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) +INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Syndication Admin', 'Can create and modify web feeds for the site',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) +INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) +INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (8,'Webservices Users', 'Can use the Webservices API (if restricted)',0) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) -INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) set identity_insert {$_TABLES['groups']} off "; diff -r d49e335b8465 -r 1f90378e366e sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 12:43:07 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 13:03:31 2008 +0200 @@ -498,7 +498,7 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES(7,12) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (7,12) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10) "; @@ -506,8 +506,8 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,17) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,18) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (1,1,'user_block','gldefault','User Functions','all',2,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (2,1,'admin_block','gldefault','Admins Only','all',1,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; @@ -603,22 +603,23 @@ $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (3,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (2,2,NULL) "; $_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (1,2,NULL) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (17,NULL,1) "; -$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (18,NULL,1) "; +$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (5,NULL,1) "; +$_DATA[] = "INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id, ug_uid, ug_grp_id) VALUES (8,NULL,1) "; +// Traditionally, grp_id 1 = Root, 2 = All Users, 13 = Logged-In Users $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (1,'Root','Has full access to the site',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (2,'All Users','Group that a typical user is added to',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (3,'Story Admin','Has full access to story features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (4,'Block Admin','Has full access to block features',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (5,'Syndication Admin', 'Can create and modify web feeds for the site',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (6,'Topic Admin','Has full access to topic features',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (7,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) "; +$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (8,'Webservices Users', 'Can use the Webservices API (if restricted)',0) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (9,'User Admin','Has full access to user features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (10,'Plugin Admin','Has full access to plugin features',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (11,'Group Admin','Is a User Admin with access to groups, too',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (12,'Mail Admin','Can use Mail Utility',1) "; $_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (13,'Logged-in Users','All registered members',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (16,'Remote Users', 'Users in this group can have authenticated against a remote server.',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (17,'Syndication Admin', 'Can create and modify web feeds for the site',1) "; -$_DATA[] = "INSERT INTO {$_TABLES['groups']} (grp_id, grp_name, grp_descr, grp_gl_core) VALUES (18,'Webservices Users', 'Can use the Webservices API (if restricted)',0) "; $_DATA[] = "INSERT INTO {$_TABLES['maillist']} (code, name) VALUES (0,'Don\'t Email') "; $_DATA[] = "INSERT INTO {$_TABLES['maillist']} (code, name) VALUES (1,'Email Headlines Each Night') "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:39 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:39 -0400 Subject: [geeklog-cvs] geeklog: Fixed nested comments, a path, and problems with $langu... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/01151c4788c3 changeset: 6450:01151c4788c3 user: Dirk Haun date: Sun Oct 12 16:12:08 2008 +0200 description: Fixed nested comments, a path, and problems with $language being overwritten in lib-common.php diffstat: 1 file changed, 6 insertions(+), 4 deletions(-) public_html/admin/install/install-plugins.php | 10 ++++++---- diffs (34 lines): diff -r 3eced35867ba -r 01151c4788c3 public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Oct 12 15:39:38 2008 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Oct 12 16:12:08 2008 +0200 @@ -37,11 +37,11 @@ // | Main | // +---------------------------------------------------------------------------+ -require_once "lib-install.php"; require_once '../../lib-common.php'; +require_once 'lib-install.php'; // Set some vars -$html_path = str_replace('admin/install/migrate.php', '', str_replace('admin\install\migrate.php', '', str_replace('\\', '/', __FILE__))); +$html_path = str_replace('admin/install/install-plugins.php', '', str_replace('admin\install\install-plugins.php', '', str_replace('\\', '/', __FILE__))); $siteconfig_path = '../../siteconfig.php'; if ($_CONF['path'] == '/path/to/Geeklog/') { // If the Geeklog path has not been defined. @@ -456,12 +456,14 @@ /* foreach ($_POST['plugins'] as $plugin) { - if ($plugin['install'] == 'on') { // If the plugin was selected to be installed - + // If the plugin was selected to be installed + if (isset($plugin['install']) && ($plugin['install'] == 'on')) { +*/ /** * Install the plugin by including & executing the database queries for each plugin * Start by looking for the database install file. */ +/* $plugin_sql = ''; if (file_exists($_CONF['path'] . 'plugins/' . $plugin['name'] . '/sql/' . $_DB_dbms . '_install.php')) { From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:37 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:37 -0400 Subject: [geeklog-cvs] geeklog: Disable plugin install for now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3eced35867ba changeset: 6449:3eced35867ba user: Dirk Haun date: Sun Oct 12 15:39:38 2008 +0200 description: Disable plugin install for now diffstat: 1 file changed, 2 insertions(+), 1 deletion(-) public_html/admin/install/install-plugins.php | 3 ++- diffs (20 lines): diff -r b46a2e7f3eb3 -r 3eced35867ba public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Oct 12 13:15:01 2008 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Oct 12 15:39:38 2008 +0200 @@ -453,6 +453,7 @@ case 2: $error = 0; +/* foreach ($_POST['plugins'] as $plugin) { if ($plugin['install'] == 'on') { // If the plugin was selected to be installed @@ -512,7 +513,7 @@ } } - +*/ // Done! // $display .= '

Done doing stuff

' . LB; header('Location: success.php?language=' . $language); From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:36 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:36 -0400 Subject: [geeklog-cvs] geeklog: Sort initialization order of gl_access table by acc_ft_id Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/b46a2e7f3eb3 changeset: 6448:b46a2e7f3eb3 user: Dirk Haun date: Sun Oct 12 13:15:01 2008 +0200 description: Sort initialization order of gl_access table by acc_ft_id diffstat: 2 files changed, 6 insertions(+), 6 deletions(-) sql/mssql_tableanddata.php | 6 +++--- sql/mysql_tableanddata.php | 6 +++--- diffs (54 lines): diff -r 1f90378e366e -r b46a2e7f3eb3 sql/mssql_tableanddata.php --- a/sql/mssql_tableanddata.php Sun Oct 12 13:03:31 2008 +0200 +++ b/sql/mssql_tableanddata.php Sun Oct 12 13:15:01 2008 +0200 @@ -1165,20 +1165,20 @@ $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (1,3)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (2,3)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,9)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (7,12)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5)"; +$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11)"; $_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5)"; -$_SQL[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8)"; $_SQL[] = " set identity_insert {$_TABLES['blocks']} on; diff -r 1f90378e366e -r b46a2e7f3eb3 sql/mysql_tableanddata.php --- a/sql/mysql_tableanddata.php Sun Oct 12 13:03:31 2008 +0200 +++ b/sql/mysql_tableanddata.php Sun Oct 12 13:15:01 2008 +0200 @@ -494,20 +494,20 @@ $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (1,3) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (2,3) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,9) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (5,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,9) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (6,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (7,12) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5) "; +$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (10,4) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (11,6) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (13,10) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (14,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (15,11) "; $_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (16,4) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (4,3) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (8,5) "; -$_DATA[] = "INSERT INTO {$_TABLES['access']} (acc_ft_id, acc_grp_id) VALUES (9,8) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (1,1,'user_block','gldefault','User Functions','all',2,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; $_DATA[] = "INSERT INTO {$_TABLES['blocks']} (bid, is_enabled, name, type, title, tid, blockorder, content, rdfurl, rdfupdated, onleft, phpblockfn, group_id, owner_id, perm_owner, perm_group, perm_members, perm_anon) VALUES (2,1,'admin_block','gldefault','Admins Only','all',1,'','','0000-00-00 00:00:00',1,'',4,2,3,3,2,2) "; From geeklog-cvs at lists.geeklog.net Sun Oct 12 10:17:37 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 10:17:37 -0400 Subject: [geeklog-cvs] geeklog: Disable plugin install for now Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3eced35867ba changeset: 6449:3eced35867ba user: Dirk Haun date: Sun Oct 12 15:39:38 2008 +0200 description: Disable plugin install for now diffstat: 1 file changed, 2 insertions(+), 1 deletion(-) public_html/admin/install/install-plugins.php | 3 ++- diffs (20 lines): diff -r b46a2e7f3eb3 -r 3eced35867ba public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Oct 12 13:15:01 2008 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Oct 12 15:39:38 2008 +0200 @@ -453,6 +453,7 @@ case 2: $error = 0; +/* foreach ($_POST['plugins'] as $plugin) { if ($plugin['install'] == 'on') { // If the plugin was selected to be installed @@ -512,7 +513,7 @@ } } - +*/ // Done! // $display .= '

Done doing stuff

' . LB; header('Location: success.php?language=' . $language); From geeklog-cvs at lists.geeklog.net Sun Oct 12 13:14:49 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 13:14:49 -0400 Subject: [geeklog-cvs] geeklog: Fixed PEAR handling and a missing global declaration Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/fa12aa529516 changeset: 6451:fa12aa529516 user: Dirk Haun date: Sun Oct 12 19:14:39 2008 +0200 description: Fixed PEAR handling and a missing global declaration diffstat: 2 files changed, 88 insertions(+), 91 deletions(-) public_html/admin/install/install-plugins.php | 177 ++++++++++++------------- public_html/admin/install/lib-install.php | 2 diffs (216 lines): diff -r 01151c4788c3 -r fa12aa529516 public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Oct 12 16:12:08 2008 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Oct 12 19:14:39 2008 +0200 @@ -113,114 +113,109 @@ } else { $plugin_file = $_CONF['path_data'] . $_FILES['plugin']['name']; // Name the plugin file - if ($_CONF['have_pear'] !== false) { + if ($_FILES['plugin']['type'] == 'application/zip') { + + // Zip + require_once 'Archive/Zip.php'; // import Archive_Zip library + $archive = new Archive_Zip($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Zip to extract the package + + } else { + + // Tarball + require_once 'Archive/Tar.php'; // import Archive_Tar library + $archive = new Archive_Tar($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Tar to extract the package + + } + + $tmp = $archive->listContent(); // Grab the contents of the tarball to see what the plugin name is + $dirname = preg_replace('/\/.*$/', '', $tmp[0]['filename']); + + if (empty($dirname)) { // If $dirname is blank it's probably because the user uploaded a non Tarball file. + + $display .= '
' . $LANG_INSTALL[38] . ' The file you uploaded was not a GZip compressed plugin file.
' . LB; + + } else if (file_exists($_CONF['path'] . 'plugins/' . $dirname)) { // If plugin directory already exists + + $display .= '
' . $LANG_INSTALL[38] . ' The plugin you uploaded already exists!
' . LB; + + } else { + + /** + * Install the plugin + * This doesn't work if the public_html & public_html/admin/plugins directories aren't 777 + */ + + // Extract the archive to data so we can get the $pi_name name from admin/install.php if ($_FILES['plugin']['type'] == 'application/zip') { // Zip - require_once $_CONF['path_pear '] . 'Archive/Zip.php'; // import Archive_Zip library - $archive = new Archive_Zip($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Zip to extract the package + $archive->extract(array('add_path' => $_CONF['path'] . 'data/', + 'by_name' => $dirname . '/admin/install.php')); } else { // Tarball - require_once $_CONF['path_pear '] . 'Archive/Tar.php'; // import Archive_Tar library - $archive = new Archive_Tar($_FILES['plugin']['tmp_name']); // Use PEAR's Archive_Tar to extract the package + $archive->extractList(array($dirname . '/admin/install.php'), $_CONF['path'] . 'data/'); + + } + $plugin_inst = $_CONF['path'] . 'data/' . $dirname . '/admin/install.php'; + $fhandle = fopen($plugin_inst, 'r'); + $fdata = fread($fhandle, filesize($plugin_inst)); + fclose($fhandle); + + // Remove the plugin from data/ + require_once 'System.php'; + @System::rm('-rf ' . $_CONF['path'] . 'data/' . $dirname); + + /** + * One time I wanted to install a muffler on my car and + * needed to match up the outside diameter of the car's + * exhaust pipe to the inside diameter of the muffler. + * Unfortunately, when I went to the auto parts store they + * didn't have a coupling adapter that would perfectly + * match the two pipes, only a bunch of smaller adapters. + * I ended up using about 4 small adapters to step down + * one size at a time to the size of the muffler's input. + * + * It's kind of like this regular expression: + * + */ + $fdata = preg_replace('/\n/', '', $fdata); + $fdata = preg_replace('/ /', '', $fdata); + $pi_name = preg_replace('/^.*\$pi\_name=\'/', '', $fdata); + $pi_name = preg_replace('/\'.*$/', '', $pi_name); + + // Some plugins don't have $pi_name set in their install.php file, + // This means our regex won't work and we should just use $dirname + if (preg_match('/\<\?php/', $pi_name) || preg_match('/--/', $pi_name)) { + + $pi_name = $dirname; } - $tmp = $archive->listContent(); // Grab the contents of the tarball to see what the plugin name is - $dirname = preg_replace('/\/.*$/', '', $tmp[0]['filename']); - - if (empty($dirname)) { // If $dirname is blank it's probably because the user uploaded a non Tarball file. - - $display .= '
' . $LANG_INSTALL[38] . ' The file you uploaded was not a GZip compressed plugin file.
' . LB; - - } else if (file_exists($_CONF['path'] . 'plugins/' . $dirname)) { // If plugin directory already exists - - $display .= '
' . $LANG_INSTALL[38] . ' The plugin you uploaded already exists!
' . LB; + // Extract the uploaded archive to the plugins directory + if ($_FILES['plugin']['type'] == 'application/zip') { + + // Zip + $upload_success = $archive->extract(array('add_path' => $_CONF['path'] . 'plugins/')); } else { - /** - * Install the plugin - * This doesn't work if the public_html & public_html/admin/plugins directories aren't 777 - */ - - // Extract the archive to data so we can get the $pi_name name from admin/install.php - if ($_FILES['plugin']['type'] == 'application/zip') { - - // Zip - $archive->extract(array('add_path' => $_CONF['path'] . 'data/', - 'by_name' => $dirname . '/admin/install.php')); - - } else { - - // Tarball - $archive->extractList(array($dirname . '/admin/install.php'), $_CONF['path'] . 'data/'); - - } - $plugin_inst = $_CONF['path'] . 'data/' . $dirname . '/admin/install.php'; - $fhandle = fopen($plugin_inst, 'r'); - $fdata = fread($fhandle, filesize($plugin_inst)); - fclose($fhandle); - // Remove the plugin from data/ - @shell_exec('rm -fr ' . $_CONF['path'] . 'data/' . $dirname); - - /** - * One time I wanted to install a muffler on my car and - * needed to match up the outside diameter of the car's - * exhaust pipe to the inside diameter of the muffler. - * Unfortunately, when I went to the auto parts store they - * didn't have a coupling adapter that would perfectly - * match the two pipes, only a bunch of smaller adapters. - * I ended up using about 4 small adapters to step down - * one size at a time to the size of the muffler's input. - * - * It's kind of like this regular expression: - * - */ - $fdata = preg_replace('/\n/', '', $fdata); - $fdata = preg_replace('/ /', '', $fdata); - $pi_name = preg_replace('/^.*\$pi\_name=\'/', '', $fdata); - $pi_name = preg_replace('/\'.*$/', '', $pi_name); - - // Some plugins don't have $pi_name set in their install.php file, - // This?means our regex won't work and we should just use $dirname - if (preg_match('/\<\?php/', $pi_name) || preg_match('/--/', $pi_name)) { - - $pi_name = $dirname; - - } - - // Extract the uploaded archive to the plugins directory - if ($_FILES['plugin']['type'] == 'application/zip') { - - // Zip - $upload_success = $archive->extract(array('add_path' => $_CONF['path'] . 'plugins/')); - - } else { - - // Tarball - $upload_success = $archive->extract($_CONF['path'] . 'plugins/'); - - } - if ($upload_success) { - - if (file_exists($_CONF['path'] . 'plugins/' . $pi_name . '/public_html')) { - rename($_CONF['path'] . 'plugins/' . $pi_name . '/public_html', $_CONF['path_html'] . $pi_name); - } - rename($_CONF['path'] . 'plugins/' . $pi_name . '/admin', $_CONF['path_html'] . 'admin/plugins/' . $pi_name); - - } - - unset($archive); // Collect some garbage + // Tarball + $upload_success = $archive->extract($_CONF['path'] . 'plugins/'); } - - } else { + if ($upload_success) { - $display .= '
' . $LANG_INSTALL[38] . ' The install script was really hoping you had PEAR installed but, alas, it could not find it..
' . LB; + if (file_exists($_CONF['path'] . 'plugins/' . $pi_name . '/public_html')) { + rename($_CONF['path'] . 'plugins/' . $pi_name . '/public_html', $_CONF['path_html'] . $pi_name); + } + rename($_CONF['path'] . 'plugins/' . $pi_name . '/admin', $_CONF['path_html'] . 'admin/plugins/' . $pi_name); + + } + + unset($archive); // Collect some garbage } diff -r 01151c4788c3 -r fa12aa529516 public_html/admin/install/lib-install.php --- a/public_html/admin/install/lib-install.php Sun Oct 12 16:12:08 2008 +0200 +++ b/public_html/admin/install/lib-install.php Sun Oct 12 19:14:39 2008 +0200 @@ -565,6 +565,8 @@ */ function INST_getUploadError($mFile) { + global $LANG_ERROR; + $mRetval = ''; $mErrors = array( UPLOAD_ERR_INI_SIZE => $LANG_ERROR[0], From geeklog-cvs at lists.geeklog.net Sun Oct 12 14:13:39 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sun, 12 Oct 2008 14:13:39 -0400 Subject: [geeklog-cvs] geeklog: Fixed warnings, typos, and oddities Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e592515b56a0 changeset: 6452:e592515b56a0 user: Dirk Haun date: Sun Oct 12 20:13:29 2008 +0200 description: Fixed warnings, typos, and oddities diffstat: 2 files changed, 8 insertions(+), 2 deletions(-) public_html/admin/install/index.php | 8 +++++++- public_html/admin/install/install-plugins.php | 2 +- diffs (38 lines): diff -r fa12aa529516 -r e592515b56a0 public_html/admin/install/index.php --- a/public_html/admin/install/index.php Sun Oct 12 19:14:39 2008 +0200 +++ b/public_html/admin/install/index.php Sun Oct 12 20:13:29 2008 +0200 @@ -129,7 +129,13 @@ $site_admin_url = isset($_POST['site_admin_url']) ? $_POST['site_admin_url'] : 'http://' . $_SERVER['HTTP_HOST'] . preg_replace('/\/install.*/', '', $_SERVER['PHP_SELF']) ; $host_name = explode(':', $_SERVER['HTTP_HOST']); $host_name = $host_name[0]; + if (empty($_CONF['site_mail'])) { + $_CONF['site_mail'] = 'admin at example.com'; + } $site_mail = isset($_POST['site_mail']) ? $_POST['site_mail'] : ($_CONF['site_mail'] == 'admin at example.com' ? $_CONF['site_mail'] : 'admin@' . $host_name); + if (empty($_CONF['noreply_mail'])) { + $_CONF['noreply_mail'] = 'noreply at example.com'; + } $noreply_mail = isset($_POST['noreply_mail']) ? $_POST['noreply_mail'] : ($_CONF['noreply_mail'] == 'noreply at example.com' ? $_CONF['noreply_mail'] : 'noreply@' . $host_name); if (isset($_POST['utf8']) && ($_POST['utf8'] == 'on')) { $utf8 = true; @@ -1303,7 +1309,7 @@ } // Update the GL configuration with the correct paths. - $config->set('path_html', 0); + $config->set('path_html', $html_path); $config->set('path_log', $_CONF['path'] . 'logs/'); $config->set('path_language', $_CONF['path'] . 'language/'); $config->set('backup_path', $_CONF['path'] . 'backups/'); diff -r fa12aa529516 -r e592515b56a0 public_html/admin/install/install-plugins.php --- a/public_html/admin/install/install-plugins.php Sun Oct 12 19:14:39 2008 +0200 +++ b/public_html/admin/install/install-plugins.php Sun Oct 12 20:13:29 2008 +0200 @@ -413,7 +413,7 @@ . ($missing_public_html || $missing_admin ? '

Warning: This plugin is not fully installed. Check that the plugin has been correctly installed to:' . ($missing_public_html ? '' . $_CONF['path_html'] . '' : '') - . ($missing_admin ? '' . $admindir . '' : '') . '

' + . ($missing_admin ? '' . $admin_dir . '' : '') . '

' : '') . '' . LB . '
{lang_pollid}: {lang_donotusespaces} {lang_donotusespaces}
{lang_topic}: ' From geeklog-cvs at lists.geeklog.net Tue Oct 14 17:25:20 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Tue, 14 Oct 2008 17:25:20 -0400 Subject: [geeklog-cvs] geeklog: Saving a story tried to update a feed of type 'geeklog'... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/3c2463b7162f changeset: 6453:3c2463b7162f user: Dirk Haun date: Tue Oct 14 22:59:36 2008 +0200 description: Saving a story tried to update a feed of type 'geeklog' instead of 'article' (reported by Tom Homer) diffstat: 2 files changed, 3 insertions(+), 1 deletion(-) public_html/docs/history | 2 ++ system/lib-story.php | 2 +- diffs (24 lines): diff -r e592515b56a0 -r 3c2463b7162f public_html/docs/history --- a/public_html/docs/history Sun Oct 12 20:13:29 2008 +0200 +++ b/public_html/docs/history Tue Oct 14 22:59:36 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Saving a story tried to update a feed of type 'geeklog' instead of 'article' + (reported by Tom Homer) - Delete a feed's file when deleting a feed (bug #0000758) [Dirk] - The {start_storylink_anchortag} variable in the story templates was missing a '>' (reported by Michael Brusletten) [Dirk] diff -r e592515b56a0 -r 3c2463b7162f system/lib-story.php --- a/system/lib-story.php Sun Oct 12 20:13:29 2008 +0200 +++ b/system/lib-story.php Tue Oct 14 22:59:36 2008 +0200 @@ -1210,7 +1210,7 @@ } // update feed(s) and Older Stories block - COM_rdfUpToDateCheck ('geeklog', $story->DisplayElements('tid'), $sid); + COM_rdfUpToDateCheck('article', $story->DisplayElements('tid'), $sid); COM_olderStuff (); if ($story->type == 'submission') { From geeklog-cvs at lists.geeklog.net Sat Oct 18 10:05:18 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Oct 2008 10:05:18 -0400 Subject: [geeklog-cvs] geeklog: Removing an element from the middle of the censorlist c... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/32e4014e6a01 changeset: 6454:32e4014e6a01 user: Dirk Haun date: Sat Oct 18 16:05:06 2008 +0200 description: Removing an element from the middle of the censorlist caused the censoring to act up (bug #0000763) diffstat: 2 files changed, 7 insertions(+), 4 deletions(-) public_html/docs/history | 2 ++ public_html/lib-common.php | 9 +++++---- diffs (31 lines): diff -r 3c2463b7162f -r 32e4014e6a01 public_html/docs/history --- a/public_html/docs/history Tue Oct 14 22:59:36 2008 +0200 +++ b/public_html/docs/history Sat Oct 18 16:05:06 2008 +0200 @@ -3,6 +3,8 @@ ??? ??, 2008 (1.5.2) ------------ +- Removing an element from the middle of the censorlist caused the censoring + to act up (bug #0000763) [Dirk] - Saving a story tried to update a feed of type 'geeklog' instead of 'article' (reported by Tom Homer) - Delete a feed's file when deleting a feed (bug #0000758) [Dirk] diff -r 3c2463b7162f -r 32e4014e6a01 public_html/lib-common.php --- a/public_html/lib-common.php Tue Oct 14 22:59:36 2008 +0200 +++ b/public_html/lib-common.php Sat Oct 18 16:05:06 2008 +0200 @@ -2869,10 +2869,11 @@ break; } - $censor_entries = count( $_CONF['censorlist'] ); - for( $i = 0; $i < $censor_entries; $i++ ) - { - $EditedMessage = MBYTE_eregi_replace( $RegExPrefix . $_CONF['censorlist'][$i] . $RegExSuffix, "\\1$Replacement\\2", $EditedMessage ); + foreach ($_CONF['censorlist'] as $c) { + if (!empty($c)) { + $EditedMessage = MBYTE_eregi_replace($RegExPrefix . $c + . $RegExSuffix, "\\1$Replacement\\2", $EditedMessage); + } } } } From geeklog-cvs at lists.geeklog.net Sat Oct 18 14:28:53 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Oct 2008 14:28:53 -0400 Subject: [geeklog-cvs] geeklog: Set {lang_attribute} only when in multi-language mode Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/bffd0ddf1fe6 changeset: 6457:bffd0ddf1fe6 user: Dirk Haun date: Sat Oct 18 19:27:24 2008 +0200 description: Set {lang_attribute} only when in multi-language mode diffstat: 1 file changed, 6 insertions(+), 2 deletions(-) public_html/article.php | 8 ++++++-- diffs (18 lines): diff -r e564c19446e3 -r bffd0ddf1fe6 public_html/article.php --- a/public_html/article.php Sat Oct 18 19:22:09 2008 +0200 +++ b/public_html/article.php Sat Oct 18 19:27:24 2008 +0200 @@ -227,8 +227,12 @@ } } } - $story_template->set_var( 'lang_id', $langId ); - $story_template->set_var( 'lang_attribute', $langAttr ); + $story_template->set_var('lang_id', $langId); + if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { + $story_template->set_var('lang_attribute', $langAttr); + } else { + $story_template->set_var('lang_attribute', ''); + } $story_template->parse ('output', 'article'); $display = $story_template->finish ($story_template->get_var('output')); From geeklog-cvs at lists.geeklog.net Sat Oct 18 14:28:52 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Oct 2008 14:28:52 -0400 Subject: [geeklog-cvs] geeklog: Set language direction in templates for printable versi... Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/2e64149d5578 changeset: 6455:2e64149d5578 user: Dirk Haun date: Sat Oct 18 19:17:03 2008 +0200 description: Set language direction in templates for printable versions of articles and static pages. Also set $LANG_DIRECTION to 'ltr' now if the language file does not already define it (bug #0000762) diffstat: 7 files changed, 88 insertions(+), 74 deletions(-) plugins/staticpages/functions.inc | 60 ++++++------ plugins/staticpages/templates/printable.thtml | 2 public_html/article.php | 70 ++++++++------- public_html/docs/history | 3 public_html/layout/professional/article/printable.thtml | 2 public_html/lib-common.php | 21 +--- public_html/staticpages/index.php | 4 diffs (271 lines): diff -r 32e4014e6a01 -r 2e64149d5578 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sat Oct 18 16:05:06 2008 +0200 +++ b/plugins/staticpages/functions.inc Sat Oct 18 19:17:03 2008 +0200 @@ -395,46 +395,50 @@ * @return string HTML for the static page * */ -function SP_printPage ($page, $A) +function SP_printPage($page, $A) { - global $_CONF, $LANG01, $_TABLES; + global $_CONF, $_TABLES, $LANG01, $LANG_DIRECTION; - $template_path = staticpages_templatePath (); - $print = new Template ($template_path); - $print->set_file (array ('print' => 'printable.thtml')); - $print->set_var ('site_url', $_CONF['site_url']); - $print->set_var ('site_name', $_CONF['site_name']); - $print->set_var ('site_slogan', $_CONF['site_slogan']); + $template_path = staticpages_templatePath(); + $print = new Template($template_path); + $print->set_file(array('print' => 'printable.thtml')); + $print->set_var('site_url', $_CONF['site_url']); + $print->set_var('site_admin_url', $_CONF['site_admin_url']); + $print->set_var('layout_url', $_CONF['layout_url']); + $print->set_var('site_name', $_CONF['site_name']); + $print->set_var('site_slogan', $_CONF['site_slogan']); - $print->set_var ('page_title', $_CONF['site_name'] . ' - ' - . stripslashes ($A['sp_title'])); - $sp_url = COM_buildUrl ($_CONF['site_url'] - . '/staticpages/index.php?page=' . $page); - $print->set_var ('sp_url', $sp_url); - $print->set_var ('sp_title', stripslashes ($A['sp_title'])); - $print->set_var ('sp_content', - SP_render_content (stripslashes ($A['sp_content']), $A['sp_php'])); - $print->set_var ('sp_hits', COM_numberFormat ($A['sp_hits'])); + $print->set_var('direction', $LANG_DIRECTION); + $print->set_var('page_title', $_CONF['site_name'] . ' - ' + . stripslashes($A['sp_title'])); + $sp_url = COM_buildUrl($_CONF['site_url'] + . '/staticpages/index.php?page=' . $page); + $print->set_var('sp_url', $sp_url); + $print->set_var('sp_title', stripslashes($A['sp_title'])); + $print->set_var('sp_content', + SP_render_content(stripslashes($A['sp_content']), $A['sp_php'])); + $print->set_var('sp_hits', COM_numberFormat($A['sp_hits'])); if ($A['commentcode'] >= 0) { $commentsUrl = $sp_url . '#comments'; $comments = DB_count($_TABLES['comments'], array('sid', 'type'), array($page, 'staticpages')); - $numComments = COM_numberFormat ($comments); - $print->set_var ('story_comments', $numComments); - $print->set_var ('comments_url', $commentsUrl); - $print->set_var ('comments_text', $numComments . ' ' . $LANG01[3]); - $print->set_var ('comments_count', $numComments); - $print->set_var ('lang_comments', $LANG01[3]); - $comments_with_count = sprintf ($LANG01[121], $numComments); + $numComments = COM_numberFormat($comments); + $print->set_var('story_comments', $numComments); + $print->set_var('comments_url', $commentsUrl); + $print->set_var('comments_text', $numComments . ' ' . $LANG01[3]); + $print->set_var('comments_count', $numComments); + $print->set_var('lang_comments', $LANG01[3]); + $comments_with_count = sprintf($LANG01[121], $numComments); if ($comments > 0) { - $comments_with_count = COM_createLink($comments_with_count, $commentsUrl); + $comments_with_count = COM_createLink($comments_with_count, + $commentsUrl); } - $print->set_var ('comments_with_count', $comments_with_count); + $print->set_var('comments_with_count', $comments_with_count); } - $print->parse ('output', 'print'); + $print->parse('output', 'print'); - return $print->finish ($print->get_var ('output')); + return $print->finish($print->get_var('output')); } /** diff -r 32e4014e6a01 -r 2e64149d5578 plugins/staticpages/templates/printable.thtml --- a/plugins/staticpages/templates/printable.thtml Sat Oct 18 16:05:06 2008 +0200 +++ b/plugins/staticpages/templates/printable.thtml Sat Oct 18 19:17:03 2008 +0200 @@ -3,7 +3,7 @@ {page_title} - +

{sp_title}

{sp_content}

diff -r 32e4014e6a01 -r 2e64149d5578 public_html/article.php --- a/public_html/article.php Sat Oct 18 16:05:06 2008 +0200 +++ b/public_html/article.php Sat Oct 18 19:17:03 2008 +0200 @@ -136,51 +136,57 @@ } elseif ( $output == STORY_INVALID_SID ) { $display .= COM_refresh($_CONF['site_url'] . '/index.php'); } elseif (($mode == 'print') && ($_CONF['hideprintericon'] == 0)) { - $story_template = new Template ($_CONF['path_layout'] . 'article'); - $story_template->set_file ('article', 'printable.thtml'); - $story_template->set_var ('xhtml', XHTML); - $story_template->set_var ('page_title', + $story_template = new Template($_CONF['path_layout'] . 'article'); + $story_template->set_file('article', 'printable.thtml'); + $story_template->set_var('xhtml', XHTML); + $story_template->set_var('direction', $LANG_DIRECTION); + $story_template->set_var('page_title', $_CONF['site_name'] . ': ' . $story->displayElements('title')); - $story_template->set_var ( 'story_title', $story->DisplayElements( 'title' ) ); - header ('Content-Type: text/html; charset=' . COM_getCharset ()); - $story_template->set_var ('story_date', $story->displayElements('date')); + $story_template->set_var('story_title', + $story->DisplayElements('title')); + header('Content-Type: text/html; charset=' . COM_getCharset()); + $story_template->set_var('story_date', $story->displayElements('date')); if ($_CONF['contributedbyline'] == 1) { - $story_template->set_var ('lang_contributedby', $LANG01[1]); - $authorname = COM_getDisplayName ($story->displayElements('uid')); - $story_template->set_var ('author', $authorname); - $story_template->set_var ('story_author', $authorname); - $story_template->set_var ('story_author_username', $story->DisplayElements('username')); + $story_template->set_var('lang_contributedby', $LANG01[1]); + $authorname = COM_getDisplayName($story->displayElements('uid')); + $story_template->set_var('author', $authorname); + $story_template->set_var('story_author', $authorname); + $story_template->set_var('story_author_username', + $story->DisplayElements('username')); } - $story_template->set_var ('story_introtext', - $story->DisplayElements('introtext')); - $story_template->set_var ('story_bodytext', - $story->DisplayElements('bodytext')); + $story_template->set_var('story_introtext', + $story->DisplayElements('introtext')); + $story_template->set_var('story_bodytext', + $story->DisplayElements('bodytext')); - $story_template->set_var ('site_url', $_CONF['site_url']); - $story_template->set_var ('layout_url', $_CONF['layout_url']); - $story_template->set_var ('site_name', $_CONF['site_name']); - $story_template->set_var ('site_slogan', $_CONF['site_slogan']); - $story_template->set_var ('story_id', $story->getSid()); - $articleUrl = COM_buildUrl ($_CONF['site_url'] - . '/article.php?story=' . $story->getSid()); + $story_template->set_var('site_url', $_CONF['site_url']); + $story_template->set_var('site_admin_url', $_CONF['site_admin_url']); + $story_template->set_var('layout_url', $_CONF['layout_url']); + $story_template->set_var('site_name', $_CONF['site_name']); + $story_template->set_var('site_slogan', $_CONF['site_slogan']); + $story_template->set_var('story_id', $story->getSid()); + $articleUrl = COM_buildUrl($_CONF['site_url'] + . '/article.php?story=' . $story->getSid()); if ($story->DisplayElements('commentcode') >= 0) { $commentsUrl = $articleUrl . '#comments'; $comments = $story->DisplayElements('comments'); - $numComments = COM_numberFormat ($comments); - $story_template->set_var ('story_comments', $numComments); - $story_template->set_var ('comments_url', $commentsUrl); - $story_template->set_var ('comments_text', + $numComments = COM_numberFormat($comments); + $story_template->set_var('story_comments', $numComments); + $story_template->set_var('comments_url', $commentsUrl); + $story_template->set_var('comments_text', $numComments . ' ' . $LANG01[3]); - $story_template->set_var ('comments_count', $numComments); - $story_template->set_var ('lang_comments', $LANG01[3]); - $comments_with_count = sprintf ($LANG01[121], $numComments); + $story_template->set_var('comments_count', $numComments); + $story_template->set_var('lang_comments', $LANG01[3]); + $comments_with_count = sprintf($LANG01[121], $numComments); if ($comments > 0) { - $comments_with_count = COM_createLink($comments_with_count, $commentsUrl); + $comments_with_count = COM_createLink($comments_with_count, + $commentsUrl); } - $story_template->set_var ('comments_with_count', $comments_with_count); + $story_template->set_var('comments_with_count', + $comments_with_count); } $story_template->set_var ('lang_full_article', $LANG08[33]); $story_template->set_var ('article_url', $articleUrl); diff -r 32e4014e6a01 -r 2e64149d5578 public_html/docs/history --- a/public_html/docs/history Sat Oct 18 16:05:06 2008 +0200 +++ b/public_html/docs/history Sat Oct 18 19:17:03 2008 +0200 @@ -3,6 +3,9 @@ ??? ??, 2008 (1.5.2) ------------ +- Set language direction in templates for printable versions of articles and + static pages. Also set $LANG_DIRECTION to 'ltr' now if the language file does + not already define it (bug #0000762) [Dirk] - Removing an element from the middle of the censorlist caused the censoring to act up (bug #0000763) [Dirk] - Saving a story tried to update a feed of type 'geeklog' instead of 'article' diff -r 32e4014e6a01 -r 2e64149d5578 public_html/layout/professional/article/printable.thtml --- a/public_html/layout/professional/article/printable.thtml Sat Oct 18 16:05:06 2008 +0200 +++ b/public_html/layout/professional/article/printable.thtml Sat Oct 18 19:17:03 2008 +0200 @@ -3,7 +3,7 @@ {page_title} - +

{story_title}

{story_date}

{lang_contributedby} {story_author} diff -r 32e4014e6a01 -r 2e64149d5578 public_html/lib-common.php --- a/public_html/lib-common.php Sat Oct 18 16:05:06 2008 +0200 +++ b/public_html/lib-common.php Sat Oct 18 19:17:03 2008 +0200 @@ -394,7 +394,12 @@ * */ -require_once( $_CONF['path_language'] . $_CONF['language'] . '.php' ); +require_once $_CONF['path_language'] . $_CONF['language'] . '.php'; + +if (empty($LANG_DIRECTION)) { + // default to left-to-right + $LANG_DIRECTION = 'ltr'; +} COM_switchLocaleSettings(); @@ -1047,7 +1052,7 @@ } } } - $header->set_var('lang_id', $langId ); + $header->set_var('lang_id', $langId); if (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) { $header->set_var('lang_attribute', $langAttr); } else { @@ -1084,16 +1089,8 @@ $header->set_var( 'css_url', $_CONF['layout_url'] . '/style.css' ); $header->set_var( 'theme', $_CONF['theme'] ); - $header->set_var( 'charset', COM_getCharset()); - if( empty( $LANG_DIRECTION )) - { - // default to left-to-right - $header->set_var( 'direction', 'ltr' ); - } - else - { - $header->set_var( 'direction', $LANG_DIRECTION ); - } + $header->set_var('charset', COM_getCharset()); + $header->set_var('direction', $LANG_DIRECTION); // Now add variables for buttons like e.g. those used by the Yahoo theme $header->set_var( 'button_home', $LANG_BUTTONS[1] ); diff -r 32e4014e6a01 -r 2e64149d5578 public_html/staticpages/index.php --- a/public_html/staticpages/index.php Sat Oct 18 16:05:06 2008 +0200 +++ b/public_html/staticpages/index.php Sat Oct 18 19:17:03 2008 +0200 @@ -75,6 +75,10 @@ $retval = SP_returnStaticpage($page, $display_mode, $comment_order, $comment_mode, $msg); +if ($display_mode == 'print') { + header('Content-Type: text/html; charset=' . COM_getCharset()); +} + echo $retval; ?> From geeklog-cvs at lists.geeklog.net Sat Oct 18 14:28:52 2008 From: geeklog-cvs at lists.geeklog.net (geeklog-cvs at lists.geeklog.net) Date: Sat, 18 Oct 2008 14:28:52 -0400 Subject: [geeklog-cvs] geeklog: {xhtml} wasn't set for the "printable" version Message-ID: details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/e564c19446e3 changeset: 6456:e564c19446e3 user: Dirk Haun date: Sat Oct 18 19:22:09 2008 +0200 description: {xhtml} wasn't set for the "printable" version diffstat: 1 file changed, 1 insertion(+) plugins/staticpages/functions.inc | 1 + diffs (11 lines): diff -r 2e64149d5578 -r e564c19446e3 plugins/staticpages/functions.inc --- a/plugins/staticpages/functions.inc Sat Oct 18 19:17:03 2008 +0200 +++ b/plugins/staticpages/functions.inc Sat Oct 18 19:22:09 2008 +0200 @@ -409,6 +409,7 @@ $print->set_var('site_slogan', $_CONF['site_slogan']); $print->set_var('direction', $LANG_DIRECTION); + $print->set_var('xhtml', XHTML); $print->set_var('page_title', $_CONF['site_name'] . ' - ' . stripslashes($A['sp_title'])); $sp_url = COM_buildUrl($_CONF['site_url']