1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Deactivate a function on a case by case basis

Discussion in 'XenForo Development Discussions' started by Marcus, Jul 19, 2013.

  1. Marcus

    Marcus Well-Known Member

    I want to deactivate a function on a case by case basis. If a parameter comes up, the function should be disabled. Currently I can only disable the function by deactivating it completely:
      public function canonicalizeRequestUrl($linkUrl)
    The idea is here, that my virtual forums are accessed by &virtual_node_id (forums/5/&virtual_node_id=10 and ControllerPublic_Forum::actionForum will redirect with the above function whenever I manipulate node_id:
    XenForo_Link::buildPublicLink('forums'$forum, array('page' => $page))
    Is there a way in php to deactivate a function on a case by case basis?
  2. EasyTarget

    EasyTarget Well-Known Member

    If (x == true)
    Do stuff
    // do nothing
  3. tyteen4a03

    tyteen4a03 Well-Known Member


    if (things) {

    No else clause necessary.

Share This Page