1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Various small updates for contact form, linkwords URL length, download log readback

This commit is contained in:
e107steved 2008-01-11 22:13:43 +00:00
parent eea27e083d
commit 778d207f39
5 changed files with 51 additions and 16 deletions

View File

@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/contact.php,v $
| $Revision: 1.4 $
| $Date: 2007-09-09 07:05:06 $
| $Author: e107coders $
| $Revision: 1.5 $
| $Date: 2008-01-11 22:13:43 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
require_once("class2.php");
@ -90,7 +90,7 @@ if(isset($_POST['send-contactus'])){
if(!$error)
{
$body .= "\n\nIP:\t".USERIP."\n";
if(USERID !== FALSE)
if (USER)
{
$body .= "User:\t#".USERID." ".USERNAME."\n";
}

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $
| $Revision: 1.6 $
| $Date: 2007-12-22 23:03:52 $
| $Revision: 1.7 $
| $Date: 2008-01-11 22:13:43 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -238,7 +238,8 @@ CREATE TABLE download_requests (
download_request_datestamp int(10) unsigned NOT NULL default '0',
PRIMARY KEY (download_request_id),
KEY download_request_userid (download_request_userid),
KEY download_request_download_id (download_request_download_id)
KEY download_request_download_id (download_request_download_id),
KEY download_request_datestamp (download_request_datestamp)
) TYPE=MyISAM;
# --------------------------------------------------------

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $
| $Revision: 1.16 $
| $Date: 2008-01-06 22:31:33 $
| $Revision: 1.17 $
| $Date: 2008-01-11 22:13:43 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -254,7 +254,7 @@ function update_706_to_800($type='')
catch_error();
}
//change menu_path for sitebutton_menu
//change menu_path for sitebutton_menu
if($sql->db_Select("menus", "menu_path", "menu_path='sitebutton_menu' || menu_path='sitebutton_menu/'"))
{
if ($just_check) return update_needed();
@ -307,10 +307,29 @@ function update_706_to_800($type='')
}
if ($sql -> db_Query("SHOW INDEX FROM ".MPREFIX."download_requests"))
{
$found = FALSE;
while ($row = $sql -> db_Fetch())
{ // One index per field
if (in_array('download_request_datestamp', $row))
{
$found = TRUE;
break;
}
}
if (!$found)
{
if ($just_check) return update_needed();
mysql_query("ALTER TABLE `".MPREFIX."download_requests` ADD INDEX `download_request_datestamp` (`download_request_datestamp`);");
}
}
// Front page prefs (logic has changed)
if (!isset($pref['frontpage_force']))
{ // Just set basic options; no real method of converting the existing
if ($just_check) return update_needed();
if ($just_check) return update_needed('Change front page prefs');
$pref['frontpage_force'] = array(e_UC_PUBLIC => '');
$pref['frontpage'] = array(e_UC_PUBLIC => 'news.php');
$do_save = TRUE;
@ -322,13 +341,28 @@ function update_706_to_800($type='')
{
if (isset($pref[$p]))
{
if ($just_check) return update_needed();
if ($just_check) return update_needed('Remove obsolete prefs');
unset($pref[$p]);
$do_save = TRUE;
}
}
if (mysql_table_exists('linkwords'))
{ // Need to extend field linkword_link varchar(200) NOT NULL default ''
if ($sql -> db_Query("SHOW FIELDS FROM ".MPREFIX."linkwords LIKE 'linkword_link'"))
{
$row = $sql -> db_Fetch();
if (str_replace('varchar', 'char', strtolower($row['Type'])) != 'char(200)')
{
if ($just_check) return update_needed('Update linkwords field definition');
mysql_query("ALTER TABLE `".MPREFIX."linkwords` MODIFY `linkword_link` VARCHAR(200) NOT NULL DEFAULT '' ");
catch_error();
}
}
}
// Tables defined in core_sql.php
//---------------------------------

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $
| $Revision: 1.5 $
| $Date: 2007-07-23 21:02:35 $
| $Revision: 1.6 $
| $Date: 2008-01-11 22:13:43 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@ -165,7 +165,7 @@ $text = "
<tr>
<td style='width:50%' class='forumheader3'>".LWLAN_6."</td>
<td style='width:50%' class='forumheader3'>
<input class='tbox' type='text' name='linkword_link' size='60' value='".$linkword_link."' maxlength='150' />
<input class='tbox' type='text' name='linkword_link' size='60' value='".$linkword_link."' maxlength='200' />
</td>
</tr>

View File

@ -2,6 +2,6 @@ CREATE TABLE linkwords (
linkword_id INT(10) UNSIGNED NOT NULL auto_increment,
linkword_active tinyint(1) unsigned NOT NULL default '0',
linkword_word varchar(100) NOT NULL default '',
linkword_link varchar(150) NOT NULL default '',
linkword_link varchar(200) NOT NULL default '',
PRIMARY KEY (linkword_id)
) TYPE=MyISAM AUTO_INCREMENT=1;