:-(( Drupal still requires LOCK TABLE permission

On testing Drupal 4.7 I was saddened to see that 4.7 still requires LOCK TABLE permission - only this time it's harder to fix.

Previously, the sole fix was in db_next_id in database.mysql.inc - of course such fixes are hotly contested and largey unsupported.

Now, two new functions have been added, db_lock_table and db_unlock_table. These are called to lock the variables and the cache tables in bootstrap.inc.

So, where previously, an update to db_next_id in database.mysql.inc such as:

function db_next_id($name) {
  $name = db_prefix_tables($name);
  $id = db_result(db_query("SELECT id FROM {sequences} WHERE name = '%s' FOR UPDATE", $name)) + 1;
  db_query("REPLACE INTO {sequences} VALUES ('%s', %d)", $name, $id);

  return $id;
}

has now to be replicated to bootstrap.inc such as:

function variable_set($name, $value) {
  global $conf;

  db_query("SELECT name FROM {variable} WHERE name = '%s' FOR UPDATE", $name);
  db_query("REPLACE INTO {variable} (name, value) VALUES ('%s', '%s')", $name, serialize($value));
  if (!db_affected_rows()) {
    db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s') FOR UPDATE", $name, serialize($value));
  }

  cache_clear_all('variables');

  $conf[$name] = $value;
}

and


function cache_set($cid, $data, $expire = CACHE_PERMANENT, $headers = NULL) {
db_query("SELECT cid FROM {cache} WHERE cid = '%s' FOR UPDATE", $cid);

Xaraya -> Drupal

I'm trying to help provide an alternative to someone and was wondering if there is a script that will migrate users/articles from Xaraya 1.0.1 to Drupal 4.6/4.7? It's a private intranet site. Thanks!!

impossible to use drupal on forward url?

after a week of trying to solve an issue with drupal and a forward url of mine, I still didn't manage to create a working drupal ...

"www.myserver.com/drupal" is the installation path of my drupal installation, and when I go to that URL, everything works fine...
BUT: I want my drupal blog to be reached by the URL: www.mydrupal.net (this is a forward URL that goes to www.myserver.com/drupal)

4.7 expandable parts not working with onload="somejavascript()"

I'm developing a theme with a dynamic menu, this menu requires javascript to be loaded on page load.
(using phptemplate) code:

<body <?php theme("onload_attribute", "initjsDOMenu()");?> >

is this the correct way of doing onload javascript?

When doing it this way, the collapsible parts i.e. settings menu stops working.

I did see a mention of this being a 4.7 registered bug, but I could not find wheter it was corrected or not.

Please advice

Paid Projects

Looking for developer with experience in setting up taxonomy structure for website. Drupal 4.6 is already installed although would prefer moving to 4.7 beta version as the site is not live. If you are interested please email me using the contact form here and I will prompty respond. Looking for someone who can begin work quickly. Can be either a one time project or if interested, have several other paid Drupal projects as well if you are looking for regular ongoing Drupal type work.

How to get and display information from a new table?

Hi. I am a beginer to drupal and php.
The databse is DrupalDB and I added a table called "images" which will store relative url pathes of images i want to display in a block I added to the right sidebar. All images are in the files directory like files/pic1.jpg.

I inserted the url of two images into the table like :
ID ImageURL
---------------
1 files/pic1.jpg
2 files/pic2.jpg

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.7.x