Categories
Uncategorized

Mails

What’s going wrong here? I suppose these mails are enogh for one day. Even though the average inform­a­tion content is near zero: bounces…

My inbox today
Categories
Uncategorized

WordPress hack … just a note to myself

Hack for classes.php in line 315 (1.5.2). It allows two (sub-)pages to have the same name (slug):

    $temp = dirname(
        str_replace(
            '%2F',
            '/',
            urlencode($q['pagename'])));

    $names = explode('/', $temp);
    $parent = null;

    foreach ($names as $name) {
        $name = sanitize_title($name);
        $query = "SELECT ID " .
            "FROM $wpdb->posts " .
            "WHERE post_name='$name'" .
            (isset($parent) ?
                " AND post_parent=$parent" :
                "");

        $parent = null;
        $parent = $wpdb->get_var($query);

        if (!isset($parent)) {
            // an error occured, continue as normal
            $parent = null;
            break;
        }
    }

    $q['pagename'] = sanitize_title(
        basename(
            str_replace(
                '%2F',
                '/',
                urlencode($q['pagename']))));
    $q['name'] = $q['pagename'];
    $where .=
        " AND post_name = '" .
        $q['pagename'] .
        "'" .
        (isset($parent) ?
            " AND post_parent=$parent" :
            "");

Another hack: allow users with user level >= 5 to edit other user’s posts/pages. This was required for our depart­ment’s website. post-functions.php functions-post.php line 352 (1.5.2):

    if ((($user_id == $post_author_data->ID) &&
         !($post->post_status == 'publish' &&
            $author_data->user_level  2)) ||
         ($author_data->user_level >
             $post_author_data->user_level) ||
         (($author_data->user_level >=
             $post_author_data->user_level) &&
          ($author_data->user_level >= 5)) ||
         ($author_data->user_level >= 10) )
    {
        return true;
    } else {
        return false;
    }
Categories
Uncategorized

Open Root Server Network

I tent­at­ively switched my nameserv­ers to the Open Root Server Network (OSRN) root servers. Seems to be a promising choice, so let’s give it a try.

Categories
Uncategorized

Note to myself

Ubuntu Breezy AMD64 and VMware 5.5.0:

GNOME\_PATH=/usr/lib32/
GTK\_PATH=/usr/lib32/gtk-2.0/
PANGO\_RC\_FILE=/etc/pango32/pangorc
GDK\_PIXBUF\_MODULE\_FILE=/etc/gtk-2.0/gdk-pixbuf.loaders32