The sql_save function cannot take arguments by reference since it is called
by call_user_func_array()
Replace use of isset($cache->sql_rowset[$query_id]) with $cache->sql_exists
Replace $cache->cache_dir with $cache->get_driver()->cache_dir
PHPBB3-10875
The changes to the cache drivers added an interface, which requires many
cache functions exist. For these, we can remove the method_exists() check
PHPBB3-10875
SQL Cache and other functions using the check
method_exists($cache,
failed because of the changes to the cache system.
method_exists($cache has been changed to
method_exists($cache->get_driver()
PHPBB3-10875
By Andreas Fischer
via Andreas Fischer (1) and Nils Adermann (1)
* develop-olympus:
[ticket/10751] Use sql_lower_text() in view_log(). log_data is a text column.
[ticket/10751] Add sql_lower_text() to database abstraction layer.
Conflicts:
phpBB/includes/db/dbal.php
On MSSQL, LOWER() can only be called on bounded strings (i.e. varchar or char).
So, in order to use it on a text column, we have to convert it to an
appropriate type. We do so using the SUBSTRING function.
PHPBB3-10751
Because the existing cache is global, there is no way to differentiate between
each of two databases which may be two different DBAL objects pointing to
servers with wildly different versions of an RDBMS. phpBB only has this
situation in the UCF, thus only one file changed outside the DBAL. I have
added a second optional parameter, $use_cache to each of the implementations
of dbal::sql_server_info()
PHPBB3-9637
Store it on installation too - allows us to check the db version used on installation and used currently to warn the user about incompatibilities
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8814 89ea8834-ac86-4346-8a33-228a782c2dd0
- clean up firebird, I will consider changing it to use fetch array instead of fetch object. it's identity code already uses this method as of right... now :D
- fix a tiny bug in MySQL's driver (remember to pass the connect id to all DBAL functions)
- add new_link as a new param for sql_connect. This allows you to make connections that are not dependant on each other. This is done for our friends mysql, mssql, postgresql and oracle. Now for everybody else.. (I said this was clever ;) MySQLi and SQLite should always spawn a new connection when you call it while mssql_odbc and firebird both will create new links if you give them different params (different creds) than the previous connection(s). Thus we can always promise new links :D
- fixed a bug in the converter
- cleaned up the dbal a little
git-svn-id: file:///svn/phpbb/trunk@7009 89ea8834-ac86-4346-8a33-228a782c2dd0
Closing tags converted using Oleg's script.
remove-php-end-tags.py -a .
Trailing newlines added using the following where $ext is file extension.
find . -type f -name "*.$ext" -print | xargs printf "e %s\nw\n" | ed -s;
Extensions: php, css, html, js, xml.
PHPBB3-9556
- new method sql_multi_insert to circumvent db-specific hacks
(hopefully not introduced any parsing errors)
git-svn-id: file:///svn/phpbb/trunk@6497 89ea8834-ac86-4346-8a33-228a782c2dd0
- sql_fetchfield now in dbal.php
- check query id correctly as well as other tiny fixes
git-svn-id: file:///svn/phpbb/trunk@6439 89ea8834-ac86-4346-8a33-228a782c2dd0
- MSSQL now works :P (sans UTF-8 support)
- The current schema files work well enough to install, etc. but must be tightened. Will get to it when I get some time...
git-svn-id: file:///svn/phpbb/trunk@6381 89ea8834-ac86-4346-8a33-228a782c2dd0
well, the super fast, ultra efficient, massively huge BBCode handling system was implemented differently on each DBMS. Although this provided the best performance, the solution was a bit hacky.
So what does this new thing do? We use base64 encoding to make everything nice and shiny, it turns into nice, safe characters that we can just jam into varchars on essentially any database. This has two implications: we must decode every bitfield we get AND we have slightly fewer IDs to work with. It goes down from 2040 BBCodes to 1512. We lose like a quarter of them :P
P.S. I hope nothing broke :P
git-svn-id: file:///svn/phpbb/trunk@6263 89ea8834-ac86-4346-8a33-228a782c2dd0
- all dbals adjusted to use the cache in sql_fetchfield, sql_rowseek, sql_numrows and sql_freeresult [Bug #2451]
- use include_once for dbal.php to at least theoretically allow connections to multiple databases at once
- added a space to an SQL query [Bug #3506]
- detailed information on adding friends/foes [Bugs #2509, #2499]
- e modifier stands for evil, so I removed it ;-)
- corrected progress_bar image filename in imageset.cfg [Bug #3374]
git-svn-id: file:///svn/phpbb/trunk@6225 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit should increase the total number of BBCodes from 31 to 2040. Some things to watch out for:
Each database likes to deal with binary data in its own, special way. They are, quite frankly, too cool for school.
MySQL, MSSQL and Oracle all allow me to send in a default value for their binary column using a hex number. However, MSSQL forces me to send the specific data as a hex number and thus we must CAST it.
PostgreSQL allows me to set a binary column, but with a twist. It demands that the default be in _octal_ and its datatype allows somewhere around a gigabyte's worth of BBCodes ( PGSQL users, we shut you down to 2040 for your own good! )
Firebird has no decent mechanism for allowing me to shuttle in binary data so I must force my way in. By virtue of triggers and a UDF, we ram in our default values.
SQLite is the most bizarre of them all. They have no mechanism for turning an ASCII code into a ASCII character. Because of this, we have a trigger and a UDF (just like Firebird!) but with a twist! The UDF is defined on the PHP side of things instead of SQL. SQLite also demands that it's data be encoded before being sent off.
Other notes:
- SQLite installs again :D
- Firebird nearly installs again :P
- Database backup is not screwed up :P
P.S.
I hope nothing broke :D
git-svn-id: file:///svn/phpbb/trunk@6209 89ea8834-ac86-4346-8a33-228a782c2dd0