Skip to content

Commit

Permalink
version 0.4 imported
Browse files Browse the repository at this point in the history
  • Loading branch information
pinhead84 committed Nov 26, 2014
1 parent 9c7e288 commit 62a6035
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 25 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OpenEstate-PHP-Wrapper for CMSms 0.3
OpenEstate-PHP-Wrapper for CMSms 0.4
====================================

This module integrates [OpenEstate-PHP-Export](https://github.com/OpenEstate/OpenEstate-PHP-Export)
Expand Down Expand Up @@ -70,10 +70,19 @@ Webseite integriert werden.
ein Formular, mit dessen Hilfe ein Smarty-Tag inkl. Parameter erzeugt werden
kann.


Changelog
---------

### 0.4

- Show an error message on the website, if *OpenEstate-ImmoTool* is currently
exporting properties to the webspace.
(see [Bug-Tracker #594](http://tracker.openestate.org/view.php?id=594))
- Improved handling of search engine optimized URL's.
(see [CMSms-Wiki](http://wiki.cmsmadesimple.org/index.php/User_Handbook/Installation/Optional_Settings))
- Take `$config['url_rewriting']` into account.
- Take `$config['query_var']` into account.

### 0.3

- Some smaller improvements.
Expand Down
6 changes: 3 additions & 3 deletions src/OpenEstatePhpWrapper.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Modul-Klasse, siehe http://www.cmsmadesimple.org/api/class_cms_module.html
* $Id: OpenEstatePhpWrapper.module.php 594 2010-12-12 01:37:49Z andy $
* $Id: OpenEstatePhpWrapper.module.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down Expand Up @@ -61,7 +61,7 @@ function GetFriendlyName() {
* @return string version number (can be something like 1.4rc1)
*/
function GetVersion() {
return '0.3';
return '0.4';
}

/**
Expand Down
29 changes: 23 additions & 6 deletions src/action.default.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@
/**
* PHP-Wrapper für CMSms.
* Darstellung der Wrapper-Ausgabe auf der Webseite.
* $Id: action.default.php 594 2010-12-12 01:37:49Z andy $
* $Id: action.default.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

if (!isset($gCms)) exit;
//echo '<pre>'; print_r($_SERVER); echo '</pre>';
//echo '<pre>'; print_r($config); echo '</pre>';

$cmsQueryVar = $config['query_var'];
$cmsUrlRewriting = $config['url_rewriting'];
$immotoolBasePath = trim( $this->GetPreference('wrap_path','') );
if ($immotoolBasePath[strlen($immotoolBasePath)-1]!='/') $immotoolBasePath .= '/';
$immotoolBaseUrl = trim( $this->GetPreference('wrap_url','') );
if ($immotoolBaseUrl[strlen($immotoolBaseUrl)-1]!='/') $immotoolBaseUrl .= '/';

// setup environment
if (is_file($immotoolBasePath . 'immotool.php.lock')) {
echo $this->Lang('error_update_is_running');
return;
}
if (!defined('IMMOTOOL_BASE_PATH'))
define( 'IMMOTOOL_BASE_PATH', $immotoolBasePath ); // Server-Pfad zu den ImmoTool-Skripten
if (!defined('IMMOTOOL_BASE_URL'))
Expand Down Expand Up @@ -143,11 +151,20 @@
$stylesheets[] = $setup->AdditionalStylesheet;

// Ausgabe erzeugen
$baseUrl = $_SERVER['SCRIPT_NAME'];
$baseUrl = null;
$hiddenParams = array();
if (isset($_REQUEST['page'])) {
$baseUrl .= '?page='.$_REQUEST['page'];
$hiddenParams['page'] = $_REQUEST['page'];
if ($cmsUrlRewriting=='internal') {
$baseUrl = $_SERVER['PHP_SELF'];
}
else if ($cmsUrlRewriting=='mod_rewrite') {
$requestUrl = explode('?', $_SERVER['REQUEST_URI']);
$baseUrl = $requestUrl[0];
}
else {
$baseUrl = $_SERVER['SCRIPT_NAME'];
if (isset($_REQUEST[$cmsQueryVar])) {
$baseUrl .= '?'.$cmsQueryVar.'='.$_REQUEST[$cmsQueryVar];
}
}
echo immotool_functions::wrap_page( $page, $wrap, $baseUrl, IMMOTOOL_BASE_URL, $stylesheets, $hiddenParams );
?>
4 changes: 2 additions & 2 deletions src/action.defaultadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Darstellung des Formulars im Administrationsbereich.
* $Id: action.defaultadmin.php 50 2010-03-25 02:44:21Z andy $
* $Id: action.defaultadmin.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down
4 changes: 2 additions & 2 deletions src/action.save_admin_prefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Eingaben im Administrationsbereich übernehmen.
* $Id: action.save_admin_prefs.php 50 2010-03-25 02:44:21Z andy $
* $Id: action.save_admin_prefs.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down
5 changes: 3 additions & 2 deletions src/lang/de_DE.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Sprachdatei, deutsch
* $Id: de_DE.php 595 2010-12-12 01:40:46Z andy $
* $Id: de_DE.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down Expand Up @@ -95,4 +95,5 @@
$lang['error_invalid_path'] = 'Bitte tragen Sie einen gültigen Skript-Pfad ein!';
$lang['error_file_not_found'] = 'Die erforderlichte Datei \'%s\' befindet sich nicht im Skript-Pfad!';
$lang['error_version_not_found'] = 'Die Skript-Version konnte nicht ermittelt werden!';
$lang['error_update_is_running'] = '<h3>Der Immobilienbestand wird momentan aktualisiert!</h3><p>Bitte besuchen Sie diese Seite in wenigen Minuten erneut.</p>';
?>
5 changes: 3 additions & 2 deletions src/lang/en_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Sprachdatei, englisch
* $Id: en_US.php 595 2010-12-12 01:40:46Z andy $
* $Id: en_US.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down Expand Up @@ -95,4 +95,5 @@
$lang['error_invalid_path'] = 'Please enter a valid server-path!';
$lang['error_file_not_found'] = 'The required file \'%s\' was not in the server-path!';
$lang['error_version_not_found'] = 'The script-version was not found!';
$lang['error_update_is_running'] = '<h3>The properties are currently updated!</h3><p>Please revisit this page after some minutes.</p>';
?>
4 changes: 2 additions & 2 deletions src/method.install.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Installation des Moduls.
* $Id: method.install.php 50 2010-03-25 02:44:21Z andy $
* $Id: method.install.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down
4 changes: 2 additions & 2 deletions src/method.uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Deinstallation des Moduls.
* $Id: method.uninstall.php 50 2010-03-25 02:44:21Z andy $
* $Id: method.uninstall.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down
4 changes: 2 additions & 2 deletions src/method.upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* PHP-Wrapper für CMSms.
* Aktualisierung des Moduls.
* $Id: method.upgrade.php 50 2010-03-25 02:44:21Z andy $
* $Id: method.upgrade.php 897 2011-06-15 23:54:58Z andy $
*
* @author Andreas Rudolph & Walter Wagner
* @copyright 2009, OpenEstate.org
* @copyright 2009-2011, OpenEstate.org
* @license http://www.gnu.org/licenses/gpl-3.0.txt
*/

Expand Down

0 comments on commit 62a6035

Please sign in to comment.