Page 1 of 1

hdesk on intranet

Posted: Wed Jan 07, 2009 10:16 am
by hassonook
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:
hi i'm installed hdesk it is very good script in all feature i would install it on intranet (local domain) and we use outlook email, on setting it reject email & URL because was not end by (.com, .net ,etc.....) please help me to solve this problem i well thank you.

Posted: Wed Jan 07, 2009 4:05 pm
by Klemen
Hi,

Open admin_settings_save.php in a text editor (Notepad, Wordpad) and change all hesk_validateEmail and hesk_validateURL to hesk_input

Posted: Sun Jan 11, 2009 9:57 am
by hassonook
Hi
thank for your reply but it didn't success .
the email that i want to use is local email (outlook) (name@domain name) without (.com , .net) please help me i am waiting you .
than again.

Posted: Sun Jan 11, 2009 9:59 am
by Klemen
Oh, you mean the entire help desk, not just admin settings. In this case do the same as above also in these files:
- submit_ticket.php
- profile.php
- manage_users.php

Posted: Mon Jan 12, 2009 5:41 am
by hassonook
Hi
thank you very much
but also is didn't success
if you have entire network test on it.

Posted: Fri Jan 16, 2009 11:51 am
by Klemen
Well it has to work because if you did change all instances of the above code Hesk will not check for valid emails ur URLs.

Another (simpler) way of trying this would be if you change this code in inc/common.inc.php file:

Code: Select all

/***************************
Function hesk_validateEmail()
***************************/
function hesk_validateEmail($address,$error,$required=1) {

    $address = trim($address);

    if (preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/",$address))
    {
        return $address;
    }

    if ($required) {
        hesk_error($error);
    } else {
        return '';
    }

} // END hesk_validateEmail()
to something like

Code: Select all

/***************************
Function hesk_validateEmail()
***************************/
function hesk_validateEmail($address,$error,$required=1) {

	return hesk_input($address,$required);

} // END hesk_validateEmail()
And in the same file change

Code: Select all

/***************************
Function hesk_validateURL()
***************************/
function hesk_validateURL($url,$error) {

    $url = trim($url);

    if (preg_match("/^(https?:\/\/+[\w\-]+\.[\w\-]+)/i",$url))
    {
        return $url;
    }

    hesk_error($error);

} // END hesk_validateURL()
to

Code: Select all

/***************************
Function hesk_validateURL()
***************************/
function hesk_validateURL($url,$error) {

    return hesk_input($url,$error);

} // END hesk_validateURL()