Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue with double inclusion of a module #814

Closed
wants to merge 41 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9db7099
Update Phalcon_Http_RequestInterface
xboston May 7, 2013
ff9fa79
Fixing memory leak in PHQL cache
May 8, 2013
2b53039
Merge branch '1.1.0' of https://github.com/phalcon/cphalcon into 1.1.0
May 8, 2013
00b3853
Regenerating build 64bits [ci skip]
May 8, 2013
618ae13
Merge pull request #615 from phalcon/1.1.0
May 8, 2013
f9f9ded
Merge pull request #613 from xboston/master
May 8, 2013
ebd3d66
fix Validator\Uniqueness combination fields
xboston May 8, 2013
97b4ad4
Merge pull request #619 from xboston/master
niden May 8, 2013
2511ff2
Merge pull request #620 from marciopaiva/1.2.0-Oracle
May 9, 2013
bb06463
fix Phalcon_Mvc_Model_QueryInterface
xboston May 9, 2013
b8b1e93
fix Phalcon_EscaperInterface
xboston May 9, 2013
da4bf1c
fix Phalcon_Mvc_CollectionInterface
xboston May 9, 2013
0ad216e
fix Phalcon_DispatcherInterface
xboston May 9, 2013
406860d
fix Phalcon_Mvc_Model_MessageInterface
xboston May 9, 2013
0a55ef5
fix Phalcon_Events_ManagerInterface
xboston May 9, 2013
9e2f86b
fix Phalcon_Events_ManagerInterface2
xboston May 9, 2013
c3aaf69
fix Phalcon_Db_AdapterInterface
xboston May 9, 2013
79345bb
Merge pull request #625 from xboston/master
May 9, 2013
42f9c6d
Update install so it compiles with any libtool version
May 13, 2013
6e549d2
Merge pull request #630 from dalu/patch-1
niden May 13, 2013
4007bf5
Added conditional to allow compilation on mac os x
omissis May 14, 2013
2faa826
Merge pull request #636 from omissis/master
May 14, 2013
c2778ad
Fixing double tracking of variables in memory frame
May 16, 2013
0c0a927
Regenerating build 64bits [ci skip]
andresgutierrez May 16, 2013
290d2cc
fix Phalcon_DiInterface
xboston May 16, 2013
d64e2fd
Update Phalcon_Mvc_ModelInterface
xboston May 16, 2013
4c1e635
update Phalcon_Mvc_Model_Query_BuilderInterface & Phalcon_Mvc_Model_M…
xboston May 16, 2013
c490429
update Phalcon_DI from ArrayAccess interface
xboston May 16, 2013
14a3d9e
Merge pull request #644 from xboston/master
May 16, 2013
89c5a24
Add redirection based on a named route
xboston May 17, 2013
a311066
Merge pull request #645 from xboston/patch-1
May 17, 2013
12e18d7
Fix for assets css remote path
lantian May 20, 2013
e6dfdb3
Merge pull request #650 from lantian/master
niden May 20, 2013
68b6b40
Merge branch '1.2.0'
Jul 9, 2013
0a14616
Regenerating build 64bits [ci skip]
andresgutierrez Jul 9, 2013
02b3dfe
Creating missing unit-tests/cache/dummy
Jul 9, 2013
a0817f0
Fix for #812
sjinks Jul 9, 2013
1dbc01e
Added boolean type to database dialects.
lantian Jul 9, 2013
7dc4370
Merge pull request #816 from lantian/master
niden Jul 9, 2013
45ff525
Fix for #812
sjinks Jul 9, 2013
549bdc4
Merge branch 'issue-812' of github.com:sjinks/cphalcon into issue-812
sjinks Jul 10, 2013
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
10 changes: 9 additions & 1 deletion build/install
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,13 @@ if [ -f Makefile ]; then
phpize --clean
fi

LIBTOOLIZE_BIN="libtoolize"

#GNU 'libtoolize' on MAC OS X is called 'glibtoolize'
if [ `(uname -s) 2>/dev/null` == 'Darwin' ]
then
LIBTOOLIZE_BIN="glibtoolize"
fi

#Perform the compilation
phpize && ./configure --enable-phalcon && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"
phpize && aclocal && $LIBTOOLIZE_BIN --force && autoheader && autoconf && ./configure --enable-phalcon && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"
7 changes: 6 additions & 1 deletion ext/db/dialect/mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Mysql, getColumnDefinition){
}

break;


case 8:
PHALCON_INIT_VAR(column_sql);
ZVAL_STRING(column_sql, "TINYINT(1)", 1);
break;

default:
PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "Unrecognized MySQL data type");
return;
Expand Down
7 changes: 6 additions & 1 deletion ext/db/dialect/oracle.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,12 @@ PHP_METHOD(Phalcon_Db_Dialect_Oracle, getColumnDefinition){
PHALCON_INIT_NVAR(column_sql);
PHALCON_CONCAT_SVSVS(column_sql, "FLOAT(", size, ",", scale, ")");
break;


case 8:
PHALCON_INIT_VAR(column_sql);
ZVAL_STRING(column_sql, "TINYINT(1)", 1);
break;

default:
PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "Unrecognized Oracle data type");
return;
Expand Down
5 changes: 5 additions & 0 deletions ext/db/dialect/postgresql.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ PHP_METHOD(Phalcon_Db_Dialect_Postgresql, getColumnDefinition){
PHALCON_INIT_NVAR(column_sql);
ZVAL_STRING(column_sql, "FLOAT", 1);
break;

case 8:
PHALCON_INIT_VAR(column_sql);
ZVAL_STRING(column_sql, "SMALLINT(1)", 1);
break;

default:
PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "Unrecognized PostgreSQL data type");
Expand Down
5 changes: 5 additions & 0 deletions ext/db/dialect/sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ PHP_METHOD(Phalcon_Db_Dialect_Sqlite, getColumnDefinition){
PHALCON_INIT_NVAR(column_sql);
ZVAL_STRING(column_sql, "FLOAT", 1);
break;

case 8:
PHALCON_INIT_VAR(column_sql);
ZVAL_STRING(column_sql, "TINYINT(1)", 1);
break;

default:
PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "Unrecognized SQLite data type");
Expand Down
36 changes: 19 additions & 17 deletions ext/mvc/application.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,23 +356,7 @@ PHP_METHOD(Phalcon_Mvc_Application, handle){
* An array module definition contains a path to a module definition class
*/
if (Z_TYPE_P(module) == IS_ARRAY) {
if (phalcon_array_isset_string(module, SS("path"))) {

PHALCON_OBS_VAR(path);
phalcon_array_fetch_string(&path, module, SL("path"), PH_NOISY_CC);
if (phalcon_file_exists(path TSRMLS_CC) == SUCCESS) {
if (phalcon_require(path TSRMLS_CC) == FAILURE) {
return;
}
} else {
PHALCON_INIT_NVAR(exception_msg);
PHALCON_CONCAT_SVS(exception_msg, "Module definition path '", path, "' doesn't exist");
PHALCON_THROW_EXCEPTION_ZVAL(phalcon_mvc_application_exception_ce, exception_msg);
return;
}
}

/**
/**
* Class name used to load the module definition
*/
if (phalcon_array_isset_string(module, SS("className"))) {
Expand All @@ -382,6 +366,24 @@ PHP_METHOD(Phalcon_Mvc_Application, handle){
PHALCON_INIT_NVAR(class_name);
ZVAL_STRING(class_name, "Module", 1);
}

if (!phalcon_class_exists(class_name TSRMLS_CC)) {
if (phalcon_array_isset_string(module, SS("path"))) {

PHALCON_OBS_VAR(path);
phalcon_array_fetch_string(&path, module, SL("path"), PH_NOISY_CC);
if (phalcon_file_exists(path TSRMLS_CC) == SUCCESS) {
if (phalcon_require(path TSRMLS_CC) == FAILURE) {
return;
}
} else {
PHALCON_INIT_NVAR(exception_msg);
PHALCON_CONCAT_SVS(exception_msg, "Module definition path '", path, "' doesn't exist");
PHALCON_THROW_EXCEPTION_ZVAL(phalcon_mvc_application_exception_ce, exception_msg);
return;
}
}
}

phalcon_call_method_p1(module_object, dependency_injector, "get", class_name);

Expand Down