Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #17186: Remove in favor of MantisTouchRedirect plugin.
  • Loading branch information
vboctor committed Apr 16, 2014
1 parent 3c23897 commit 9bf455f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 153 deletions.
16 changes: 0 additions & 16 deletions config_defaults_inc.php
Expand Up @@ -4192,21 +4192,5 @@
'default_home_page', 'logout_redirect_page', 'manual_url', 'logo_url', 'wiki_engine_url',
);

/***************
* MantisTouch *
***************/

/**
* The MantisTouch URL to direct to. The %s will be replaced by the contents of $g_path.
* A blank value will disable redirection. The %s is not required when redirecting to
* MantisTouch instances that point to a single MantisBT instance and hence have a hard-coded URL.
*
* Following are three examples:
* - 'http://mantisbt.mobi?url=%s'
* - 'http://MyOwnMantisTouch.com/'
* - ''
*/
$g_mantistouch_url = file_exists( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . "m" ) ? $g_path . 'm/' : '';

# Temporary variables should not remain defined in global scope
unset( $t_protocol, $t_host, $t_hosts, $t_port, $t_self, $t_path );
25 changes: 0 additions & 25 deletions core.php
Expand Up @@ -175,31 +175,6 @@ function __autoload( $className ) {
# Register the autoload function to make it effective immediately
spl_autoload_register( '__autoload' );

require_api( 'mobile_api.php' );

if ( strlen( $GLOBALS['g_mantistouch_url'] ) > 0 && mobile_is_mobile_browser() ) {
$t_url = sprintf( $GLOBALS['g_mantistouch_url'], $GLOBALS['g_path'] );

$t_issue_id = '';
if ( strstr( $_SERVER['SCRIPT_NAME'], 'view.php' ) !== false ) {
$t_issue_id = (int)$_GET['id'];
}

if ( !empty( $t_issue_id ) ) {
if ( strstr( $t_url, 'url=' ) !== false ) {
$t_url .= '&issue_id=' . $t_issue_id;
} else {
$t_url .= '?issue_id=' . $t_issue_id;
}
}

header( 'Content-Type: text/html' );

header( "Location: $t_url" );

exit; # additional output can cause problems so let's just stop output here
}

# Load UTF8-capable string functions
define( 'UTF8', $g_library_path . 'utf8' );
require_lib( 'utf8/utf8.php' );
Expand Down
91 changes: 0 additions & 91 deletions core/mobile_api.php

This file was deleted.

1 change: 1 addition & 0 deletions core/obsolete.php
Expand Up @@ -170,4 +170,5 @@
config_obsolete( 'file_upload_ftp_server' );
config_obsolete( 'file_upload_ftp_user' );
config_obsolete( 'file_upload_ftp_pass' );
config_obsolete( 'mantistouch_url' );

21 changes: 0 additions & 21 deletions docbook/Admin_Guide/en-US/Configuration.xml
Expand Up @@ -3860,25 +3860,4 @@ LOG_ALL & ~LOG_DATABASE
<para>While the SOAP API will still be accessible, it will not allow users to retrieve or modify data.</para>
</section>
</section>

<section id="admin.config.mantistouch">
<title>MantisTouch</title>
<para>
These options are used to integrate with MantisTouch (http://www.mantistouch.org) to provide experience targeted to mobile devices.
</para>

<variablelist>
<varlistentry>
<term>$g_mantistouch_url</term>
<listitem>
<para>
The MantisTouch URL to direct to. The %s will be replaced by the contents of $g_path configuration option.
A blank value will disable redirection. The %s is not required when redirecting to
MantisTouch instances that point to a single MantisBT instance and hence have a hard-coded URL.
Examples include: '' (default), 'http://mantisbt.mobi?url=%s', and 'http://MyOwnMantisTouch.com/'.
</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</chapter>

0 comments on commit 9bf455f

Please sign in to comment.