Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
code/log/app.log
10 changes: 1 addition & 9 deletions code/.htaccess
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
php_flag zend.ze1_compatibility_mode On
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
php_flag allow_call_time_pass_reference On
php_value error_reporting "E_ALL ^ E_DEPRECATED"
php_value error_reporting "E_ALL"

DirectoryIndex index.php
Options -Indexes

<FilesMatch "^(\.svn|entries)$">
Deny from all
</FilesMatch>

RewriteEngine On
RewriteRule ^(it|en)\/?$ index.php?_current_lang=$1 [L,QSA]
2 changes: 1 addition & 1 deletion code/config/app.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ newsletter_files_max_total_size = 104857600

# Debug
########
log.debug_level = DL_ERROR
log.debug_level = DL_INFO
log.max_filesize = 1048576
log.truncate_always = 0

Expand Down
4 changes: 2 additions & 2 deletions code/include/__sample_app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class SampleApp extends CustomApp {

function SampleApp() {
parent::CustomApp("SampleApp", "_sample_app");
function __construct() {
parent::__construct("SampleApp", "_sample_app");

$e = array("roles" => array("guest"));

Expand Down
4 changes: 2 additions & 2 deletions code/include/custom_app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class CustomApp extends App {

function CustomApp($app_class_name, $app_name) {
parent::App($app_class_name, $app_name);
function __construct($app_class_name, $app_name) {
parent::__construct($app_class_name, $app_name);
}
//
function action_get_security_image() {
Expand Down
14 changes: 7 additions & 7 deletions code/include/lib/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class App extends AppObject {
var $action_params;

function App($app_class_name, $app_name) {
parent::AppObject();
parent::__construct();

$this->set_class_name($app_class_name);
$this->app_name = $app_name;
Expand Down Expand Up @@ -67,7 +67,7 @@ function create_core_objects() {
}

function create_config() {
$this->config =& new Config();
$this->config = new Config();
$this->config->read("config/app.cfg");
}

Expand All @@ -80,7 +80,7 @@ function create_session() {
}

function create_db() {
$sql_config =& new Config();
$sql_config = new Config();
$sql_config->read("config/sql.cfg");

$this->db =& $this->create_object(
Expand Down Expand Up @@ -123,7 +123,7 @@ function init_lang_vars() {
// Sentry redirect
if ($this->use_cur_lang_from_cgi) {
if (is_null($this->get_current_lang_from_cgi())) {
$redirect_response =& new RedirectResponse(
$redirect_response = new RedirectResponse(
create_self_full_url(
array(),
$this->lang
Expand Down Expand Up @@ -207,8 +207,8 @@ function &_create_object(
}
}

$obj =& new $class_name();
if (is_subclass_of($obj, "Object")) {
$obj = new $class_name();
if (is_subclass_of($obj, "BaseAppObject")) {
$obj->set_class_name($class_name_without_suffix, $class_name_suffix);
$init_obj_params = get_param_value($class_info, "params", null);
if (!is_null($init_obj_params)) {
Expand Down Expand Up @@ -271,7 +271,7 @@ function run() {
$this->create_current_user();

// Read action name
$this->action = trim(param("action"));
$this->action = trim((string) param("action"));
if ($this->action == "") {
$this->action = $this->get_default_action_name();
}
Expand Down
10 changes: 5 additions & 5 deletions code/include/lib/app_object.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

class Object {
class BaseAppObject {

var $_class_name;
var $_class_name_without_suffix;

function Object() {
function __construct() {
}

function _init($params) {
Expand All @@ -26,12 +26,12 @@ function get_class_name_without_suffix() {

}

class AppObject extends Object {
class AppObject extends BaseAppObject {

var $app;

function AppObject() {
parent::Object();
function __construct() {
parent::__construct();
}

function _init($params) {
Expand Down
2 changes: 1 addition & 1 deletion code/include/lib/components/xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function parse($xml_data_str) {

// Create parser
$parser = xml_parser_create($this->charset);
xml_set_object($parser, &$this);
xml_set_object($parser, $this);
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
xml_set_element_handler($parser, "tag_open", "tag_close");
xml_set_character_data_handler($parser, "cdata");
Expand Down
8 changes: 4 additions & 4 deletions code/include/lib/global.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function v($var, $dump_all = false) {
$var_to_dump = array();
foreach ($var->_fields as $field_name => $field_info) {
if ($field_info["create"]) {
$var_to_dump[$field_name] = $var->{$field_name};
$var_to_dump[$field_name] = $var->$field_name;
}
}
}
Expand Down Expand Up @@ -575,7 +575,7 @@ function parse_date_by_format($format, $value) {
$p = 1;
$format_len = strlen($format);
for ($i = 0; $i < $format_len; $i++) {
$format_char = $format{$i};
$format_char = $format[$i];
switch ($format_char) {
case "Y":
$date_parts["year"] = (int) $date_parts_unordered[$p++];
Expand Down Expand Up @@ -655,7 +655,7 @@ function create_date_regexp_by_format($format) {
$res = "/";
$format_len = strlen($format);
for ($i = 0; $i < $format_len; $i++) {
$format_char = $format{$i};
$format_char = $format[$i];
switch ($format_char) {
case "Y":
$res .= '(\d{1,4})';
Expand Down Expand Up @@ -718,7 +718,7 @@ function create_date_by_format($format, $date_parts, $date_if_unknown) {
$res = "";
$format_len = strlen($format);
for ($i = 0; $i < $format_len; $i++) {
$format_char = $format{$i};
$format_char = $format[$i];
switch ($format_char) {
case "Y":
$res .= sprintf("%04d", $date_parts["year"]);
Expand Down
4 changes: 2 additions & 2 deletions code/include/lib/http_response.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class HttpResponse {
var $headers;
var $cookies;

function HttpResponse() {
function __construct() {
$this->headers = array();
$this->cookies = array();
}
Expand All @@ -82,7 +82,7 @@ function push_header($header) {
}

function push_headers($headers) {
$this->headers = array_merge($headers, $this->headers);
$this->headers = array_merge($headers, (array) $this->headers);
}

function add_no_cache_headers() {
Expand Down
4 changes: 2 additions & 2 deletions code/include/setup_app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

class SetupApp extends CustomApp {

function SetupApp() {
parent::CustomApp("SetupApp", "setup_app");
function __construct() {
parent::__construct("SetupApp", "setup_app");

$a = array("roles" => array("admin"));

Expand Down
4 changes: 2 additions & 2 deletions code/include/user_app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ class UserApp extends CustomApp {
// Current logged in user
var $user;

function UserApp() {
parent::CustomApp("UserApp", "user_app");
function __construct() {
parent::__construct("UserApp", "user_app");

$this->use_cur_lang_from_cgi = true;

Expand Down
2 changes: 1 addition & 1 deletion code/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_once("include/_init.php");
require_once("include/user_app.php");

$app =& new UserApp();
$app = new UserApp();
$app->init();
$app->run();

Expand Down
Empty file modified code/log/make_log.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion code/sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_once("include/_init.php");
require_once("include/__sample_app.php");

$app =& new SampleApp();
$app = new SampleApp();
$app->init();
$app->run();

Expand Down
2 changes: 1 addition & 1 deletion code/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_once("include/_init.php");
require_once("include/setup_app.php");

$app =& new SetupApp();
$app = new SetupApp();
$app->init();
$app->run();

Expand Down